File size: 5,268 Bytes
3d05bd2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24823ff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18b8791
 
cdafd8b
18b8791
 
 
 
 
 
 
cdafd8b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
datasets:
- deepghs/real_head_detection
- deepghs/anime_head_detection
pipeline_tag: object-detection
library_name: dghs-imgutils
tags:
- art
- anime
- photo
- head
---

These models are trained on [deepghs/anime_head_detection](https://huggingface.co/deepghs/anime_head_detection) and open-sourced real photos datasets.

So both anime and photos are supported.

Use this with `dghs-realutils`

```shell
pip install dghs-realutils
```

```python
from realutils.detect import detect_heads

print(detect_heads('yolo/solo.jpg'))
# [((162, 47, 305, 210), 'head', 0.7701659202575684)]
print(detect_heads('yolo/2girls.jpg'))
# [((683, 48, 1199, 754), 'head', 0.8410779237747192), ((105, 91, 570, 734), 'head', 0.8339194059371948)]
print(detect_heads('yolo/3+cosplay.jpg'))
# [((329, 194, 426, 309), 'head', 0.8123012781143188), ((359, 20, 448, 122), 'head', 0.8047150373458862), ((185, 81, 265, 166), 'head', 0.7797152996063232)]
print(detect_heads('yolo/multiple.jpg'))
# [((867, 259, 1084, 527), 'head', 0.8264595866203308), ((1364, 448, 1583, 724), 'head', 0.8254891633987427), ((480, 201, 781, 565), 'head', 0.8191508054733276), ((1189, 175, 1398, 412), 'head', 0.8097156286239624), ((1028, 671, 1277, 992), 'head', 0.8084591627120972)]
```

For more information, see [documentation of realutils](https://dghs-realutils.deepghs.org/main/api_doc/detect/head.html).

|         Model         |  Type  |  FLOPS  |  Params  |  F1 Score  |  Threshold  |  precision(B)  |  recall(B)  |  mAP50(B)  |  mAP50-95(B)  |                                                 F1 Plot                                                 |                                                            Confusion                                                            |  Labels  |
|:---------------------:|:------:|:-------:|:--------:|:----------:|:-----------:|:--------------:|:-----------:|:----------:|:-------------:|:-------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------:|:--------:|
| head_detect_v0_l_yv11 |  yolo  |  87.3G  |  25.3M   |    0.81    |    0.199    |    0.90226     |   0.72872   |  0.81049   |    0.5109     | [plot](https://huggingface.co/deepghs/real_head_detection/blob/main/head_detect_v0_l_yv11/F1_curve.png) | [confusion](https://huggingface.co/deepghs/real_head_detection/blob/main/head_detect_v0_l_yv11/confusion_matrix_normalized.png) |  `head`  |
| head_detect_v0_m_yv11 |  yolo  |  68.2G  |  20.1M   |    0.8     |    0.206    |    0.89855     |   0.72654   |  0.80704   |    0.50804    | [plot](https://huggingface.co/deepghs/real_head_detection/blob/main/head_detect_v0_m_yv11/F1_curve.png) | [confusion](https://huggingface.co/deepghs/real_head_detection/blob/main/head_detect_v0_m_yv11/confusion_matrix_normalized.png) |  `head`  |
| head_detect_v0_s_yv11 |  yolo  |  21.5G  |  9.43M   |    0.78    |    0.187    |    0.88726     |   0.69234   |  0.77518   |    0.47825    | [plot](https://huggingface.co/deepghs/real_head_detection/blob/main/head_detect_v0_s_yv11/F1_curve.png) | [confusion](https://huggingface.co/deepghs/real_head_detection/blob/main/head_detect_v0_s_yv11/confusion_matrix_normalized.png) |  `head`  |
| head_detect_v0_n_yv11 |  yolo  |  6.44G  |  2.59M   |    0.74    |    0.14     |    0.87359     |   0.64011   |  0.73393   |    0.44118    | [plot](https://huggingface.co/deepghs/real_head_detection/blob/main/head_detect_v0_n_yv11/F1_curve.png) | [confusion](https://huggingface.co/deepghs/real_head_detection/blob/main/head_detect_v0_n_yv11/confusion_matrix_normalized.png) |  `head`  |
|   head_detect_v0_l    |  yolo  |  165G   |  43.6M   |    0.81    |    0.234    |    0.89921     |   0.74092   |  0.81715   |    0.51615    |   [plot](https://huggingface.co/deepghs/real_head_detection/blob/main/head_detect_v0_l/F1_curve.png)    |   [confusion](https://huggingface.co/deepghs/real_head_detection/blob/main/head_detect_v0_l/confusion_matrix_normalized.png)    |  `head`  |
|   head_detect_v0_m    |  yolo  |  79.1G  |  25.9M   |    0.8     |    0.228    |    0.90006     |   0.72646   |  0.80614   |    0.50586    |   [plot](https://huggingface.co/deepghs/real_head_detection/blob/main/head_detect_v0_m/F1_curve.png)    |   [confusion](https://huggingface.co/deepghs/real_head_detection/blob/main/head_detect_v0_m/confusion_matrix_normalized.png)    |  `head`  |
|   head_detect_v0_s    |  yolo  |  28.6G  |  11.1M   |    0.78    |    0.182    |    0.89224     |   0.69382   |  0.77804   |    0.48067    |   [plot](https://huggingface.co/deepghs/real_head_detection/blob/main/head_detect_v0_s/F1_curve.png)    |   [confusion](https://huggingface.co/deepghs/real_head_detection/blob/main/head_detect_v0_s/confusion_matrix_normalized.png)    |  `head`  |
|   head_detect_v0_n    |  yolo  |  8.19G  |  3.01M   |    0.74    |    0.172    |     0.8728     |   0.64823   |  0.73865   |    0.44501    |   [plot](https://huggingface.co/deepghs/real_head_detection/blob/main/head_detect_v0_n/F1_curve.png)    |   [confusion](https://huggingface.co/deepghs/real_head_detection/blob/main/head_detect_v0_n/confusion_matrix_normalized.png)    |  `head`  |