Fuyucchi commited on
Commit
802903e
·
verified ·
1 Parent(s): 50be874

Upload 19 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ demo/comparison/test_priconne.png filter=lfs diff=lfs merge=lfs -text
37
+ demo/comparison/test_uma.png filter=lfs diff=lfs merge=lfs -text
38
+ demo/comparison/yolov8_animeface/test_priconne.png filter=lfs diff=lfs merge=lfs -text
39
+ demo/comparison/yolov8_animeface/test_uma.png filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,73 @@
1
- ---
2
- license: agpl-3.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # yolov8_animeface
2
+ Anime Face Detection using YOLOv8
3
+
4
+ ## Dataset
5
+ Dataset was made created with 10 000 images manually annotated from safebooru. Split was train 70, val 20, test 10.
6
+
7
+ ## Performance
8
+
9
+ This model is based on yolov8x6. It has been trained on the said dataset for 300 epoch at 1280px*1280px. It took ~110 hours to train on a RTX A4000.
10
+
11
+ On my dataset, the model performs particularly well with the default parameters.
12
+
13
+ ```
14
+ Images Instances Box(P R mAP50 mAP50-95):
15
+ 1002 1562 0.957 0.924 0.955 0.534
16
+ Speed: 1.3ms preprocess, 81.9ms inference, 0.0ms loss, 0.8ms postprocess per image
17
+ ```
18
+
19
+ While it doesn't provide a huge mAP50-95, its predictions are always correct on the files I've tested. Confidence could be higher, but the model is very precise.
20
+
21
+ ![](./demo/val/confusion_matrix.png "Confusion Matrix")
22
+ *Confusion matrix of the model, generated on the test set*
23
+
24
+ ![](./demo/val/PR_curve.png "PR curve")
25
+ *PR curve of the model, generated on the test set*
26
+
27
+ Other metrics are available in the `./demo/val` subfolder.
28
+
29
+ ## Demo
30
+
31
+ Manual annotation | yolov8_animeface
32
+ :-------------------------:|:-------------------------:
33
+ ![](./demo/val/val_batch1_labels.jpg "1st batch labels") | ![](./demo/val/val_batch1_pred.jpg "Prediction made by yolov8_animeface")
34
+ ![](./demo/val/val_batch2_labels.jpg "2nd batch labels") | ![](./demo/val/val_batch2_pred.jpg "Prediction made by yolov8_animeface")
35
+
36
+
37
+ ## Comparison with an existing model
38
+
39
+ While we can argue about the comparison between two models from different generations, I believe it is interesting to compare this model with [zymk9's model](https://github.com/zymk9/yolov5_anime), based on yolov5. They both have the same purpose and were trained in the same fashion.
40
+
41
+ On the same dataset with the same parameters (conf=0.001 & iou=0.6), yolov8x6-animeface produces better metrics than the one on yolov5x.
42
+
43
+ yolov8-animeface:
44
+ ```
45
+ Images Instances Box(P R mAP50 mAP50-95):
46
+ 1002 1562 0.956 0.919 0.953 0.532
47
+ Speed: 1.2ms preprocess, 81.2ms inference, 0.0ms loss, 1.0ms postprocess per image
48
+ ```
49
+
50
+ yolov5-anime:
51
+
52
+ ```
53
+ Images Instances Box(P R mAP50 mAP50-95):
54
+ 1003 1566 0.778 0.685 0.633 0.232
55
+ Speed: 1.5ms pre-process, 85.5ms inference, 1.4ms NMS per image at shape (32, 3, 1280, 1280)
56
+ ```
57
+
58
+ yolov5-anime provides better results when images are resized at 640px, but it still is inferior to yolov8-animeface with the same parameters.
59
+ Surprisingly enough, yolov5 is way more confident that yolov8. However, it also has way more false positives.
60
+
61
+
62
+ Yolov8_animeface | Yolov5_anime
63
+ :-------------------------:|:-------------------------:
64
+ ![](./demo/comparison/yolov8_animeface/test_priconne.png "Test on Priconne with yolov8") | ![](./demo/comparison/yolov5_anime/test_priconne.jpg "Test on Priconne with yolov5")
65
+ ![](./demo/comparison/yolov8_animeface/test_uma.png "Test on Uma with yolov8") | ![](./demo/comparison/yolov5_anime/test_uma.jpg "Test on Uma with yolov5")
66
+
67
+
68
+ ## Conclusion
69
+
70
+ While this model performs greatly on my dataset, my metrics can differ from yours. One lighter model might be released on a later occasion.
71
+
72
+ Based on YOLOv8 by
73
+ Jocher, G., Chaurasia, A., & Qiu, J. (2023). Ultralytics YOLO (Version 8.0.0) [Computer software]. https://github.com/ultralytics/ultralytics
demo/comparison/credits.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ Yolov5 model used created by zymk9 can be found here https://github.com/zymk9/yolov5_anime
2
+
3
+ Picture 1 used for comparison: test_priconne.png, credits to CyGames.
4
+
5
+ Picture 2 used for comparison: test_uma.png, credits to CyGames.
demo/comparison/test_priconne.png ADDED

Git LFS Details

  • SHA256: c066a9b0f5f8a59f30936bac4b5f905fbaedfebff6edda981ab4408820a39d16
  • Pointer size: 132 Bytes
  • Size of remote file: 1.43 MB
demo/comparison/test_uma.png ADDED

Git LFS Details

  • SHA256: 259cce507e3313b598cc9c79885bfed3ae990084d630421595cef17253446d7e
  • Pointer size: 132 Bytes
  • Size of remote file: 2.31 MB
demo/comparison/yolov5_anime/test_priconne.jpg ADDED
demo/comparison/yolov5_anime/test_uma.jpg ADDED
demo/comparison/yolov8_animeface/test_priconne.png ADDED

Git LFS Details

  • SHA256: 1f2d7aa11026d053cc858a4e5cdd0ec6857ae0f8aeaafcc02ec49d78e720bcac
  • Pointer size: 132 Bytes
  • Size of remote file: 1.56 MB
demo/comparison/yolov8_animeface/test_uma.png ADDED

Git LFS Details

  • SHA256: d85eb0823e883bb3adb774953c08661d724b5291b6e6285f6dfea4fb4b65c596
  • Pointer size: 132 Bytes
  • Size of remote file: 2.24 MB
demo/val/F1_curve.png ADDED
demo/val/PR_curve.png ADDED
demo/val/P_curve.png ADDED
demo/val/R_curve.png ADDED
demo/val/confusion_matrix.png ADDED
demo/val/confusion_matrix_normalized.png ADDED
demo/val/val_batch1_labels.jpg ADDED
demo/val/val_batch1_pred.jpg ADDED
demo/val/val_batch2_labels.jpg ADDED
demo/val/val_batch2_pred.jpg ADDED
yolov8x6_animeface.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f3cdc1a6266347322439fd9b3c8f5a1222668eb10c8adf00e17b28c48b95213c
3
+ size 195372753