Plana-Archive commited on
Commit
a39778c
·
verified ·
1 Parent(s): bd2ddc6

Migrasi otomatis

Browse files
README.md ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - deepghs/character_similarity
4
+ - deepghs/character_index
5
+ metrics:
6
+ - f1
7
+ - adjust_random_score
8
+ language:
9
+ - en
10
+ - ja
11
+ - zh
12
+ pipeline_tag: zero-shot-image-classification
13
+ library_name: dghs-imgutils
14
+ tags:
15
+ - art
16
+ - anime
17
+ - character
18
+ license: openrail
19
+ ---
20
+
21
+ # CCIP
22
+ CCIP(Contrastive Anime Character Image Pre-Training) is a model to calculuate the visual similarity between anime characters in two images. (limited to images containing only a single anime character). More similar the characters between two images are, higher score it should have.
23
+
24
+ # Usage
25
+ Using CCIP with [imgutils](https://dghs-imgutils.deepghs.org/main/tutorials/installation/index.html)
26
+
27
+ ![](https://dghs-imgutils.deepghs.org/main/_images/ccip_small.plot.py.svg)
28
+ Calculuate character similarity between images:
29
+ ```
30
+ from imgutils.metrics import ccip_batch_differences
31
+
32
+ ccip_batch_differences(['ccip/1.jpg', 'ccip/2.jpg', 'ccip/6.jpg', 'ccip/7.jpg'])
33
+ array([[6.5350548e-08, 1.6583106e-01, 4.2947042e-01, 4.0375218e-01],
34
+ [1.6583106e-01, 9.8025822e-08, 4.3715334e-01, 4.0748104e-01],
35
+ [4.2947042e-01, 4.3715334e-01, 3.2675274e-08, 3.9229470e-01],
36
+ [4.0375218e-01, 4.0748104e-01, 3.9229470e-01, 6.5350548e-08]],
37
+ dtype=float32)
38
+ ```
39
+
40
+ [More detailed instruction](https://dghs-imgutils.deepghs.org/main/api_doc/metrics/ccip.html)
41
+
42
+ # Performence
43
+ | Model | F1 Score | Precision | Recall | Threshold | Cluster_2 | Cluster_Free |
44
+ |:-----------------------------------:|:----------:|:-----------:|:--------:|:-----------:|:-----------:|:--------------:|
45
+ | ccip-caformer_b36-24 | 0.940925 | 0.938254 | 0.943612 | 0.213231 | 0.89508 | 0.957017 |
46
+ | ccip-caformer-24-randaug-pruned | 0.917211 | 0.933481 | 0.901499 | 0.178475 | 0.890366 | 0.922375 |
47
+ | ccip-v2-caformer_s36-10 | 0.906422 | 0.932779 | 0.881513 | 0.207757 | 0.874592 | 0.89241 |
48
+ | ccip-caformer-6-randaug-pruned_fp32 | 0.878403 | 0.893648 | 0.863669 | 0.195122 | 0.810176 | 0.897904 |
49
+ | ccip-caformer-5_fp32 | 0.864363 | 0.90155 | 0.830121 | 0.183973 | 0.792051 | 0.862289 |
50
+ | ccip-caformer-4_fp32 | 0.844967 | 0.870553 | 0.820842 | 0.18367 | 0.795565 | 0.868133 |
51
+ | ccip-caformer_query-12 | 0.823928 | 0.871122 | 0.781585 | 0.141308 | 0.787237 | 0.809426 |
52
+ | ccip-caformer-23_randaug_fp32 | 0.81625 | 0.854134 | 0.781585 | 0.136797 | 0.745697 | 0.8068 |
53
+ | ccip-caformer-2-randaug-pruned_fp32 | 0.78561 | 0.800148 | 0.771592 | 0.171053 | 0.686617 | 0.728195 |
54
+ | ccip-caformer-2_fp32 | 0.755125 | 0.790172 | 0.723055 | 0.141275 | 0.64977 | 0.718516 |
55
+
56
+ * The calculation of `F1 Score`, `Precision`, and `Recall` considers "the characters in both images are the same" as a positive case. `Threshold` is determined by finding the maximum value on the F1 Score curve.
57
+ * `Cluster_2` represents the approximate optimal clustering solution obtained by tuning the eps value in DBSCAN clustering algorithm with min_samples set to `2`, and evaluating the similarity between the obtained clusters and the true distribution using the `random_adjust_score`.
58
+ * `Cluster_Free` represents the approximate optimal solution obtained by tuning the `max_eps` and `min_samples` values in the OPTICS clustering algorithm, and evaluating the similarity between the obtained clusters and the true distribution using the `random_adjust_score`.
59
+
60
+ ![operations benchmark](https://dghs-imgutils.deepghs.org/main/_images/ccip_benchmark.plot.py.svg)
61
+
62
+ # Citation
63
+ ```bibtex
64
+ @misc{CCIP,
65
+ title={Contrastive Anime Character Image Pre-Training},
66
+ author={Ziyi Dong and narugo1992},
67
+ year={2024},
68
+ howpublished={\url{https://huggingface.co/deepghs/ccip}}
69
+ }
70
+ ```
ccip-caformer-2-randaug-pruned_fp16.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:efb8b17f420d6a40e56406dbe47ea221213b2aa94e30f75f22a136433319fcfb
3
+ size 77154839
ccip-caformer-2-randaug-pruned_fp32.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:54e852a076b8a83b5d391498397769d5061b4f5d5406e161e3b1fcc62980a593
3
+ size 154254927
ccip-caformer-23_randaug_fp16.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e4519af27fcb1e7fb7107514c4b30402f6e8038061677cec0cd8ec53a7455d5
3
+ size 77154839
ccip-caformer-23_randaug_fp32.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d4be57ea1c6da3775ce4bcab3b63a27da5eb66a33a7ff2c015a4b8e0360e48e
3
+ size 154171415
ccip-caformer-24-randaug-pruned.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c5fdd52d208617ab6d93c39865db2caf71192176aa944b7dd69df98896ee170d
3
+ size 154255334
ccip-caformer-2_fp16.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ca83203b344509a92af0940984400528b46e6865d9e92baabdf81aefc2ccf99
3
+ size 77154839
ccip-caformer-2_fp32.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da3f2259194ff9aa877f3dc7e02a1eadd26df6654cd6e88193d4e47a3d2676a6
3
+ size 154171415
ccip-caformer-4_fp16.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d4aa56c157c64811851ccad6a5a874ed9d077ebfc92b66a4de8a840ecfb652e
3
+ size 77154839
ccip-caformer-4_fp32.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:20358dc5056562b9c827e7e645831e00f3121d1976e383ec8439786adb37124a
3
+ size 154171415
ccip-caformer-5_fp16.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5dd61b908be1957e14be8ea66890b639d3b65eb1242cf44202f9fade8e8a3e90
3
+ size 77154839
ccip-caformer-5_fp32.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d81470ab074bb72a7accd0dbb716b7a3208c4fb3ae6c4750de20f72d3565d1c
3
+ size 154171415
ccip-caformer-6-randaug-pruned_fp16.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:61d724f74babf1d127c374eefef10e139718410ac956801e95a4bfb931cb1b87
3
+ size 77154839
ccip-caformer-6-randaug-pruned_fp32.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:30379b07430480849d062eb8e409f3ec56936951ccdc02da68be7499ca9033b3
3
+ size 154171415
ccip-caformer_b36-24.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:59697c30407e1ce894dfb476fa59f935065cbad98d59909dc94c09eec228bc6e
3
+ size 392865538
ccip-caformer_query-12.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0dca380c0895b32773fc514267d877b2a08207b933d279c9d3dfbbd22bc7a0f8
3
+ size 158499314
ccip-v2-caformer_s36-10.ckpt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:04e5c6636cdb1cbce6f0e699d93f1601700822b8098ceb9ac1b2be6f5455a410
3
+ size 154256962