PyTorch
ultralytics
File size: 2,542 Bytes
7c2828a
 
86ebc11
 
 
6402e89
23bb3b3
 
7c2828a
86ebc11
23bb3b3
86ebc11
 
 
3161ab2
 
86ebc11
 
 
 
 
3161ab2
 
 
 
 
6402e89
 
 
 
 
 
0e2f347
 
6402e89
 
 
 
 
 
 
 
 
77b811b
403e56c
0e2f347
86ebc11
d12f958
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23bb3b3
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
license: agpl-3.0
library_name: ultralytics
datasets:
- wider_face
- skytnt/anime-segmentation
tags:
- pytorch
---

# YOLOv8 Detection Model

## Datasets

### Face

- [Anime Face CreateML](https://universe.roboflow.com/my-workspace-mph8o/anime-face-createml)
- [xml2txt](https://universe.roboflow.com/0oooooo0/xml2txt-njqx1)
- [AN](https://universe.roboflow.com/sed-b8vkf/an-lfg5i)
- [wider face](http://shuoyang1213.me/WIDERFACE/index.html)

### Hand

- [AnHDet](https://universe.roboflow.com/1-yshhi/anhdet)
- [hand-detection-fuao9](https://universe.roboflow.com/catwithawand/hand-detection-fuao9)

### Person

- [coco2017](https://cocodataset.org/#home) (only person)
- [AniSeg](https://github.com/jerryli27/AniSeg)
- [skytnt/anime-segmentation](https://huggingface.co/datasets/skytnt/anime-segmentation)

## Info

| Model                 | Target                | mAP 50                        | mAP 50-95                     |
| --------------------- | --------------------- | ----------------------------- | ----------------------------- |
| face_yolov8n.pt       | 2D / realistic face   | 0.660                         | 0.366                         |
| face_yolov8n_v2.pt    | 2D / realistic face   | 0.669                         | 0.372                         |
| face_yolov8s.pt       | 2D / realistic face   | 0.713                         | 0.404                         |
| face_yolov8m.pt       | 2D / realistic face   | 0.737                         | 0.424                         |
| hand_yolov8n.pt       | 2D / realistic hand   | 0.767                         | 0.505                         |
| hand_yolov8s.pt       | 2D / realistic hand   | 0.794                         | 0.527                         |
| person_yolov8n-seg.pt | 2D / realistic person | 0.782 (bbox)<br/>0.761 (mask) | 0.555 (bbox)<br/>0.460 (mask) |
| person_yolov8s-seg.pt | 2D / realistic person | 0.824 (bbox)<br/>0.809 (mask) | 0.605 (bbox)<br/>0.508 (mask) |
| person_yolov8m-seg.pt | 2D / realistic person | 0.849 (bbox)<br/>0.831 (mask) | 0.636 (bbox)<br/>0.533 (mask) |

## Usage

```python
from huggingface_hub import hf_hub_download
from ultralytics import YOLO

path = hf_hub_download("Bingsu/adetailer", "face_yolov8n.pt")
model = YOLO(path)
```

```python
import cv2
from PIL import Image

img = "https://farm5.staticflickr.com/4139/4887614566_6b57ec4422_z.jpg"
output = model(img)
pred = output[0].plot()
pred = cv2.cvtColor(pred, cv2.COLOR_BGR2RGB)
pred = Image.fromarray(pred)
pred
```

![image](https://i.imgur.com/9ny1wmD.png)