Library-Mutsumi/ccip
0
CCIP
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.
Usage
Using CCIP with imgutils
Calculuate character similarity between images:
from imgutils.metrics import ccip_batch_differences
ccip_batch_differences(['ccip/1.jpg', 'ccip/2.jpg', 'ccip/6.jpg', 'ccip/7.jpg'])
array([[6.5350548e-08, 1.6583106e-01, 4.2947042e-01, 4.0375218e-01],
[1.6583106e-01, 9.8025822e-08, 4.3715334e-01, 4.0748104e-01],
[4.2947042e-01, 4.3715334e-01, 3.2675274e-08, 3.9229470e-01],
[4.0375218e-01, 4.0748104e-01, 3.9229470e-01, 6.5350548e-08]],
dtype=float32)Performence
- The calculation of
F1 Score,Precision, andRecallconsiders "the characters in both images are the same" as a positive case.Thresholdis determined by finding the maximum value on the F1 Score curve. Cluster_2represents the approximate optimal clustering solution obtained by tuning the eps value in DBSCAN clustering algorithm with minsamples set to `2`, and evaluating the similarity between the obtained clusters and the true distribution using the `randomadjust_score`.Cluster_Freerepresents the approximate optimal solution obtained by tuning themax_epsandmin_samplesvalues in the OPTICS clustering algorithm, and evaluating the similarity between the obtained clusters and the true distribution using therandom_adjust_score.
Citation
@misc{CCIP,
title={Contrastive Anime Character Image Pre-Training},
author={Ziyi Dong and narugo1992},
year={2024},
howpublished={\url{https://huggingface.co/deepghs/ccip}}
}