First draft

This commit is contained in:
Niels 2024-06-01 14:52:18 +02:00
parent 4b118ae016
commit 60b45b0915
2 changed files with 10 additions and 11 deletions

View File

@ -43,12 +43,12 @@ COCO
| Model | Test Size | #Params | FLOPs | AP<sup>val</sup> | Latency | | Model | Test Size | #Params | FLOPs | AP<sup>val</sup> | Latency |
|:---------------|:----:|:---:|:--:|:--:|:--:| |:---------------|:----:|:---:|:--:|:--:|:--:|
| [YOLOv10-N](https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10n.pt) | 640 | 2.3M | 6.7G | 38.5% | 1.84ms | | [YOLOv10-N](https://huggingface.co/jameslahm/yolov10n) | 640 | 2.3M | 6.7G | 38.5% | 1.84ms |
| [YOLOv10-S](https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10s.pt) | 640 | 7.2M | 21.6G | 46.3% | 2.49ms | | [YOLOv10-S](https://huggingface.co/jameslahm/yolov10s) | 640 | 7.2M | 21.6G | 46.3% | 2.49ms |
| [YOLOv10-M](https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10m.pt) | 640 | 15.4M | 59.1G | 51.1% | 4.74ms | | [YOLOv10-M](https://huggingface.co/jameslahm/yolov10m) | 640 | 15.4M | 59.1G | 51.1% | 4.74ms |
| [YOLOv10-B](https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10b.pt) | 640 | 19.1M | 92.0G | 52.5% | 5.74ms | | [YOLOv10-B](https://huggingface.co/jameslahm/yolov10b) | 640 | 19.1M | 92.0G | 52.5% | 5.74ms |
| [YOLOv10-L](https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10l.pt) | 640 | 24.4M | 120.3G | 53.2% | 7.28ms | | [YOLOv10-L](https://huggingface.co/jameslahm/yolov10l) | 640 | 24.4M | 120.3G | 53.2% | 7.28ms |
| [YOLOv10-X](https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10x.pt) | 640 | 29.5M | 160.4G | 54.4% | 10.70ms | | [YOLOv10-X](https://huggingface.co/jameslahm/yolov10x) | 640 | 29.5M | 160.4G | 54.4% | 10.70ms |
## Installation ## Installation
`conda` virtual environment is recommended. `conda` virtual environment is recommended.
@ -60,15 +60,14 @@ pip install -e .
``` ```
## Demo ## Demo
``` ```
wget https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10s.pt
python app.py python app.py
# Please visit http://127.0.0.1:7860 # Please visit http://127.0.0.1:7860
``` ```
## Validation ## Validation
[`yolov10n.pt`](https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10n.pt) [`yolov10s.pt`](https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10s.pt) [`yolov10m.pt`](https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10m.pt) [`yolov10b.pt`](https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10b.pt) [`yolov10l.pt`](https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10l.pt) [`yolov10x.pt`](https://github.com/THU-MIG/yolov10/releases/download/v1.1/yolov10x.pt) [`yolov10n.pt`](https://huggingface.co/jameslahm/yolov10n) [`yolov10s.pt`](https://huggingface.co/jameslahm/yolov10s) [`yolov10m.pt`](https://huggingface.co/jameslahm/yolov10m) [`yolov10b.pt`](https://huggingface.co/jameslahm/yolov10b) [`yolov10l.pt`](https://huggingface.co/jameslahm/yolov10l) [`yolov10x.pt`](https://huggingface.co/jameslahm/yolov10x)
``` ```
yolo val model=yolov10n/s/m/b/l/x.pt data=coco.yaml batch=256 yolo val size="nano" data=coco.yaml batch=256
``` ```
## Training ## Training

4
app.py
View File

@ -4,8 +4,8 @@
import gradio as gr import gradio as gr
from ultralytics import YOLOv10 from ultralytics import YOLOv10
def yolov10_inference(image, model_path, image_size, conf_threshold): def yolov10_inference(image, image_size, conf_threshold):
model = YOLOv10(model_path) model = YOLOv10.from_pretrained("jameslahm/yolov10n")
model.predict(source=image, imgsz=image_size, conf=conf_threshold, save=True) model.predict(source=image, imgsz=image_size, conf=conf_threshold, save=True)