Spaces:
Sleeping
Sleeping
uploading a fresh copy of the detection models
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- models/deformable-detr-detic/.gitattributes +34 -0
- models/deformable-detr-detic/README.md +88 -0
- models/deformable-detr-detic/config.json +2551 -0
- models/deformable-detr-detic/model.safetensors +3 -0
- models/deformable-detr-detic/preprocessor_config.json +24 -0
- models/deformable-detr-detic/pytorch_model.bin +3 -0
- models/yolov5/.dockerignore +222 -0
- models/yolov5/.gitattributes +2 -0
- models/yolov5/.github/ISSUE_TEMPLATE/bug-report.yml +85 -0
- models/yolov5/.github/ISSUE_TEMPLATE/config.yml +11 -0
- models/yolov5/.github/ISSUE_TEMPLATE/feature-request.yml +50 -0
- models/yolov5/.github/ISSUE_TEMPLATE/question.yml +33 -0
- models/yolov5/.github/dependabot.yml +27 -0
- models/yolov5/.github/workflows/ci-testing.yml +155 -0
- models/yolov5/.github/workflows/codeql-analysis.yml +55 -0
- models/yolov5/.github/workflows/docker.yml +60 -0
- models/yolov5/.github/workflows/format.yml +27 -0
- models/yolov5/.github/workflows/greetings.yml +65 -0
- models/yolov5/.github/workflows/links.yml +71 -0
- models/yolov5/.github/workflows/stale.yml +47 -0
- models/yolov5/.gitignore +257 -0
- models/yolov5/CITATION.cff +14 -0
- models/yolov5/CONTRIBUTING.md +76 -0
- models/yolov5/LICENSE +661 -0
- models/yolov5/README.md +473 -0
- models/yolov5/README.zh-CN.md +473 -0
- models/yolov5/__pycache__/export.cpython-310.pyc +0 -0
- models/yolov5/__pycache__/export.cpython-311.pyc +0 -0
- models/yolov5/__pycache__/hubconf.cpython-310.pyc +0 -0
- models/yolov5/__pycache__/hubconf.cpython-311.pyc +0 -0
- models/yolov5/benchmarks.py +174 -0
- models/yolov5/classify/predict.py +238 -0
- models/yolov5/classify/train.py +370 -0
- models/yolov5/classify/tutorial.ipynb +0 -0
- models/yolov5/classify/val.py +175 -0
- models/yolov5/data/Argoverse.yaml +72 -0
- models/yolov5/data/GlobalWheat2020.yaml +52 -0
- models/yolov5/data/ImageNet.yaml +1020 -0
- models/yolov5/data/ImageNet10.yaml +30 -0
- models/yolov5/data/ImageNet100.yaml +119 -0
- models/yolov5/data/ImageNet1000.yaml +1020 -0
- models/yolov5/data/Objects365.yaml +436 -0
- models/yolov5/data/SKU-110K.yaml +51 -0
- models/yolov5/data/VOC.yaml +98 -0
- models/yolov5/data/VisDrone.yaml +68 -0
- models/yolov5/data/coco.yaml +114 -0
- models/yolov5/data/coco128-seg.yaml +99 -0
- models/yolov5/data/coco128.yaml +99 -0
- models/yolov5/data/hyps/hyp.Objects365.yaml +34 -0
- models/yolov5/data/hyps/hyp.VOC.yaml +40 -0
models/deformable-detr-detic/.gitattributes
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
28 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
29 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
30 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
31 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
32 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
33 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
34 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
models/deformable-detr-detic/README.md
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
tags:
|
4 |
+
- object-detection
|
5 |
+
- vision
|
6 |
+
- detic
|
7 |
+
datasets:
|
8 |
+
- coco
|
9 |
+
- lvis
|
10 |
+
widget:
|
11 |
+
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/savanna.jpg
|
12 |
+
example_title: Savanna
|
13 |
+
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/football-match.jpg
|
14 |
+
example_title: Football Match
|
15 |
+
- src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/airport.jpg
|
16 |
+
example_title: Airport
|
17 |
+
---
|
18 |
+
|
19 |
+
# Deformable DETR model trained using the Detic method on LVIS
|
20 |
+
|
21 |
+
Deformable DEtection TRansformer (DETR), trained on LVIS (including 1203 classes). It was introduced in the paper [Detecting Twenty-thousand Classes using Image-level Supervision](https://arxiv.org/abs/2201.02605) by Zhou et al. and first released in [this repository](https://github.com/facebookresearch/Detic).
|
22 |
+
|
23 |
+
This model corresponds to the "Detic_DeformDETR_R50_4x" checkpoint released in the original repository.
|
24 |
+
|
25 |
+
Disclaimer: The team releasing Detic did not write a model card for this model so this model card has been written by the Hugging Face team.
|
26 |
+
|
27 |
+
## Model description
|
28 |
+
|
29 |
+
The DETR model is an encoder-decoder transformer with a convolutional backbone. Two heads are added on top of the decoder outputs in order to perform object detection: a linear layer for the class labels and a MLP (multi-layer perceptron) for the bounding boxes. The model uses so-called object queries to detect objects in an image. Each object query looks for a particular object in the image. For COCO, the number of object queries is set to 100.
|
30 |
+
|
31 |
+
The model is trained using a "bipartite matching loss": one compares the predicted classes + bounding boxes of each of the N = 100 object queries to the ground truth annotations, padded up to the same length N (so if an image only contains 4 objects, 96 annotations will just have a "no object" as class and "no bounding box" as bounding box). The Hungarian matching algorithm is used to create an optimal one-to-one mapping between each of the N queries and each of the N annotations. Next, standard cross-entropy (for the classes) and a linear combination of the L1 and generalized IoU loss (for the bounding boxes) are used to optimize the parameters of the model.
|
32 |
+
|
33 |
+
![model image](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/deformable_detr_architecture.png)
|
34 |
+
|
35 |
+
## Intended uses & limitations
|
36 |
+
|
37 |
+
You can use the raw model for object detection. See the [model hub](https://huggingface.co/models?search=sensetime/deformable-detr) to look for all available Deformable DETR models.
|
38 |
+
|
39 |
+
### How to use
|
40 |
+
|
41 |
+
Here is how to use this model:
|
42 |
+
|
43 |
+
```python
|
44 |
+
from transformers import AutoImageProcessor, DeformableDetrForObjectDetection
|
45 |
+
import torch
|
46 |
+
from PIL import Image
|
47 |
+
import requests
|
48 |
+
|
49 |
+
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
50 |
+
image = Image.open(requests.get(url, stream=True).raw)
|
51 |
+
|
52 |
+
processor = AutoImageProcessor.from_pretrained("facebook/deformable-detr-detic")
|
53 |
+
model = DeformableDetrForObjectDetection.from_pretrained("facebook/deformable-detr-detic")
|
54 |
+
|
55 |
+
inputs = processor(images=image, return_tensors="pt")
|
56 |
+
outputs = model(**inputs)
|
57 |
+
|
58 |
+
# convert outputs (bounding boxes and class logits) to COCO API
|
59 |
+
# let's only keep detections with score > 0.7
|
60 |
+
target_sizes = torch.tensor([image.size[::-1]])
|
61 |
+
results = processor.post_process_object_detection(outputs, target_sizes=target_sizes, threshold=0.7)[0]
|
62 |
+
|
63 |
+
for score, label, box in zip(results["scores"], results["labels"], results["boxes"]):
|
64 |
+
box = [round(i, 2) for i in box.tolist()]
|
65 |
+
print(
|
66 |
+
f"Detected {model.config.id2label[label.item()]} with confidence "
|
67 |
+
f"{round(score.item(), 3)} at location {box}"
|
68 |
+
)
|
69 |
+
```
|
70 |
+
|
71 |
+
## Evaluation results
|
72 |
+
|
73 |
+
This model achieves 32.5 box mAP and 26.2 mAP (rare classes) on LVIS.
|
74 |
+
|
75 |
+
### BibTeX entry and citation info
|
76 |
+
|
77 |
+
```bibtex
|
78 |
+
@misc{https://doi.org/10.48550/arxiv.2010.04159,
|
79 |
+
doi = {10.48550/ARXIV.2010.04159},
|
80 |
+
url = {https://arxiv.org/abs/2010.04159},
|
81 |
+
author = {Zhu, Xizhou and Su, Weijie and Lu, Lewei and Li, Bin and Wang, Xiaogang and Dai, Jifeng},
|
82 |
+
keywords = {Computer Vision and Pattern Recognition (cs.CV), FOS: Computer and information sciences, FOS: Computer and information sciences},
|
83 |
+
title = {Deformable DETR: Deformable Transformers for End-to-End Object Detection},
|
84 |
+
publisher = {arXiv},
|
85 |
+
year = {2020},
|
86 |
+
copyright = {arXiv.org perpetual, non-exclusive license}
|
87 |
+
}
|
88 |
+
```
|
models/deformable-detr-detic/config.json
ADDED
@@ -0,0 +1,2551 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_commit_hash": null,
|
3 |
+
"activation_dropout": 0.0,
|
4 |
+
"activation_function": "relu",
|
5 |
+
"architectures": [
|
6 |
+
"DeformableDetrForObjectDetection"
|
7 |
+
],
|
8 |
+
"attention_dropout": 0.0,
|
9 |
+
"auxiliary_loss": false,
|
10 |
+
"backbone": null,
|
11 |
+
"backbone_config": {
|
12 |
+
"_name_or_path": "",
|
13 |
+
"add_cross_attention": false,
|
14 |
+
"architectures": null,
|
15 |
+
"bad_words_ids": null,
|
16 |
+
"begin_suppress_tokens": null,
|
17 |
+
"bos_token_id": null,
|
18 |
+
"chunk_size_feed_forward": 0,
|
19 |
+
"cross_attention_hidden_size": null,
|
20 |
+
"decoder_start_token_id": null,
|
21 |
+
"depths": [
|
22 |
+
3,
|
23 |
+
4,
|
24 |
+
6,
|
25 |
+
3
|
26 |
+
],
|
27 |
+
"diversity_penalty": 0.0,
|
28 |
+
"do_sample": false,
|
29 |
+
"downsample_in_first_stage": false,
|
30 |
+
"early_stopping": false,
|
31 |
+
"embedding_size": 64,
|
32 |
+
"encoder_no_repeat_ngram_size": 0,
|
33 |
+
"eos_token_id": null,
|
34 |
+
"exponential_decay_length_penalty": null,
|
35 |
+
"finetuning_task": null,
|
36 |
+
"forced_bos_token_id": null,
|
37 |
+
"forced_eos_token_id": null,
|
38 |
+
"hidden_act": "relu",
|
39 |
+
"hidden_sizes": [
|
40 |
+
256,
|
41 |
+
512,
|
42 |
+
1024,
|
43 |
+
2048
|
44 |
+
],
|
45 |
+
"id2label": {
|
46 |
+
"0": "LABEL_0",
|
47 |
+
"1": "LABEL_1"
|
48 |
+
},
|
49 |
+
"is_decoder": false,
|
50 |
+
"is_encoder_decoder": false,
|
51 |
+
"label2id": {
|
52 |
+
"LABEL_0": 0,
|
53 |
+
"LABEL_1": 1
|
54 |
+
},
|
55 |
+
"layer_type": "bottleneck",
|
56 |
+
"length_penalty": 1.0,
|
57 |
+
"max_length": 20,
|
58 |
+
"min_length": 0,
|
59 |
+
"model_type": "resnet",
|
60 |
+
"no_repeat_ngram_size": 0,
|
61 |
+
"num_beam_groups": 1,
|
62 |
+
"num_beams": 1,
|
63 |
+
"num_channels": 3,
|
64 |
+
"num_return_sequences": 1,
|
65 |
+
"out_features": [
|
66 |
+
"stage2",
|
67 |
+
"stage3",
|
68 |
+
"stage4"
|
69 |
+
],
|
70 |
+
"output_attentions": false,
|
71 |
+
"output_hidden_states": false,
|
72 |
+
"output_scores": false,
|
73 |
+
"pad_token_id": null,
|
74 |
+
"prefix": null,
|
75 |
+
"problem_type": null,
|
76 |
+
"pruned_heads": {},
|
77 |
+
"remove_invalid_values": false,
|
78 |
+
"repetition_penalty": 1.0,
|
79 |
+
"return_dict": true,
|
80 |
+
"return_dict_in_generate": false,
|
81 |
+
"sep_token_id": null,
|
82 |
+
"stage_names": [
|
83 |
+
"stem",
|
84 |
+
"stage1",
|
85 |
+
"stage2",
|
86 |
+
"stage3",
|
87 |
+
"stage4"
|
88 |
+
],
|
89 |
+
"suppress_tokens": null,
|
90 |
+
"task_specific_params": null,
|
91 |
+
"temperature": 1.0,
|
92 |
+
"tf_legacy_loss": false,
|
93 |
+
"tie_encoder_decoder": false,
|
94 |
+
"tie_word_embeddings": true,
|
95 |
+
"tokenizer_class": null,
|
96 |
+
"top_k": 50,
|
97 |
+
"top_p": 1.0,
|
98 |
+
"torch_dtype": null,
|
99 |
+
"torchscript": false,
|
100 |
+
"transformers_version": "4.27.0.dev0",
|
101 |
+
"typical_p": 1.0,
|
102 |
+
"use_bfloat16": false
|
103 |
+
},
|
104 |
+
"bbox_cost": 5,
|
105 |
+
"bbox_loss_coefficient": 5,
|
106 |
+
"class_cost": 1,
|
107 |
+
"d_model": 256,
|
108 |
+
"decoder_attention_heads": 8,
|
109 |
+
"decoder_ffn_dim": 1024,
|
110 |
+
"decoder_layers": 6,
|
111 |
+
"decoder_n_points": 4,
|
112 |
+
"dice_loss_coefficient": 1,
|
113 |
+
"dilation": null,
|
114 |
+
"dropout": 0.1,
|
115 |
+
"encoder_attention_heads": 8,
|
116 |
+
"encoder_ffn_dim": 1024,
|
117 |
+
"encoder_layerdrop": 0.0,
|
118 |
+
"encoder_layers": 6,
|
119 |
+
"encoder_n_points": 4,
|
120 |
+
"eos_coefficient": 0.1,
|
121 |
+
"focal_alpha": 0.25,
|
122 |
+
"giou_cost": 2,
|
123 |
+
"giou_loss_coefficient": 2,
|
124 |
+
"id2label": {
|
125 |
+
"0": "aerosol_can",
|
126 |
+
"1": "air_conditioner",
|
127 |
+
"2": "airplane",
|
128 |
+
"3": "alarm_clock",
|
129 |
+
"4": "alcohol",
|
130 |
+
"5": "alligator",
|
131 |
+
"6": "almond",
|
132 |
+
"7": "ambulance",
|
133 |
+
"8": "amplifier",
|
134 |
+
"9": "anklet",
|
135 |
+
"10": "antenna",
|
136 |
+
"11": "apple",
|
137 |
+
"12": "applesauce",
|
138 |
+
"13": "apricot",
|
139 |
+
"14": "apron",
|
140 |
+
"15": "aquarium",
|
141 |
+
"16": "arctic_(type_of_shoe)",
|
142 |
+
"17": "armband",
|
143 |
+
"18": "armchair",
|
144 |
+
"19": "armoire",
|
145 |
+
"20": "armor",
|
146 |
+
"21": "artichoke",
|
147 |
+
"22": "trash_can",
|
148 |
+
"23": "ashtray",
|
149 |
+
"24": "asparagus",
|
150 |
+
"25": "atomizer",
|
151 |
+
"26": "avocado",
|
152 |
+
"27": "award",
|
153 |
+
"28": "awning",
|
154 |
+
"29": "ax",
|
155 |
+
"30": "baboon",
|
156 |
+
"31": "baby_buggy",
|
157 |
+
"32": "basketball_backboard",
|
158 |
+
"33": "backpack",
|
159 |
+
"34": "handbag",
|
160 |
+
"35": "suitcase",
|
161 |
+
"36": "bagel",
|
162 |
+
"37": "bagpipe",
|
163 |
+
"38": "baguet",
|
164 |
+
"39": "bait",
|
165 |
+
"40": "ball",
|
166 |
+
"41": "ballet_skirt",
|
167 |
+
"42": "balloon",
|
168 |
+
"43": "bamboo",
|
169 |
+
"44": "banana",
|
170 |
+
"45": "Band_Aid",
|
171 |
+
"46": "bandage",
|
172 |
+
"47": "bandanna",
|
173 |
+
"48": "banjo",
|
174 |
+
"49": "banner",
|
175 |
+
"50": "barbell",
|
176 |
+
"51": "barge",
|
177 |
+
"52": "barrel",
|
178 |
+
"53": "barrette",
|
179 |
+
"54": "barrow",
|
180 |
+
"55": "baseball_base",
|
181 |
+
"56": "baseball",
|
182 |
+
"57": "baseball_bat",
|
183 |
+
"58": "baseball_cap",
|
184 |
+
"59": "baseball_glove",
|
185 |
+
"60": "basket",
|
186 |
+
"61": "basketball",
|
187 |
+
"62": "bass_horn",
|
188 |
+
"63": "bat_(animal)",
|
189 |
+
"64": "bath_mat",
|
190 |
+
"65": "bath_towel",
|
191 |
+
"66": "bathrobe",
|
192 |
+
"67": "bathtub",
|
193 |
+
"68": "batter_(food)",
|
194 |
+
"69": "battery",
|
195 |
+
"70": "beachball",
|
196 |
+
"71": "bead",
|
197 |
+
"72": "bean_curd",
|
198 |
+
"73": "beanbag",
|
199 |
+
"74": "beanie",
|
200 |
+
"75": "bear",
|
201 |
+
"76": "bed",
|
202 |
+
"77": "bedpan",
|
203 |
+
"78": "bedspread",
|
204 |
+
"79": "cow",
|
205 |
+
"80": "beef_(food)",
|
206 |
+
"81": "beeper",
|
207 |
+
"82": "beer_bottle",
|
208 |
+
"83": "beer_can",
|
209 |
+
"84": "beetle",
|
210 |
+
"85": "bell",
|
211 |
+
"86": "bell_pepper",
|
212 |
+
"87": "belt",
|
213 |
+
"88": "belt_buckle",
|
214 |
+
"89": "bench",
|
215 |
+
"90": "beret",
|
216 |
+
"91": "bib",
|
217 |
+
"92": "Bible",
|
218 |
+
"93": "bicycle",
|
219 |
+
"94": "visor",
|
220 |
+
"95": "billboard",
|
221 |
+
"96": "binder",
|
222 |
+
"97": "binoculars",
|
223 |
+
"98": "bird",
|
224 |
+
"99": "birdfeeder",
|
225 |
+
"100": "birdbath",
|
226 |
+
"101": "birdcage",
|
227 |
+
"102": "birdhouse",
|
228 |
+
"103": "birthday_cake",
|
229 |
+
"104": "birthday_card",
|
230 |
+
"105": "pirate_flag",
|
231 |
+
"106": "black_sheep",
|
232 |
+
"107": "blackberry",
|
233 |
+
"108": "blackboard",
|
234 |
+
"109": "blanket",
|
235 |
+
"110": "blazer",
|
236 |
+
"111": "blender",
|
237 |
+
"112": "blimp",
|
238 |
+
"113": "blinker",
|
239 |
+
"114": "blouse",
|
240 |
+
"115": "blueberry",
|
241 |
+
"116": "gameboard",
|
242 |
+
"117": "boat",
|
243 |
+
"118": "bob",
|
244 |
+
"119": "bobbin",
|
245 |
+
"120": "bobby_pin",
|
246 |
+
"121": "boiled_egg",
|
247 |
+
"122": "bolo_tie",
|
248 |
+
"123": "deadbolt",
|
249 |
+
"124": "bolt",
|
250 |
+
"125": "bonnet",
|
251 |
+
"126": "book",
|
252 |
+
"127": "bookcase",
|
253 |
+
"128": "booklet",
|
254 |
+
"129": "bookmark",
|
255 |
+
"130": "boom_microphone",
|
256 |
+
"131": "boot",
|
257 |
+
"132": "bottle",
|
258 |
+
"133": "bottle_opener",
|
259 |
+
"134": "bouquet",
|
260 |
+
"135": "bow_(weapon)",
|
261 |
+
"136": "bow_(decorative_ribbons)",
|
262 |
+
"137": "bow-tie",
|
263 |
+
"138": "bowl",
|
264 |
+
"139": "pipe_bowl",
|
265 |
+
"140": "bowler_hat",
|
266 |
+
"141": "bowling_ball",
|
267 |
+
"142": "box",
|
268 |
+
"143": "boxing_glove",
|
269 |
+
"144": "suspenders",
|
270 |
+
"145": "bracelet",
|
271 |
+
"146": "brass_plaque",
|
272 |
+
"147": "brassiere",
|
273 |
+
"148": "bread-bin",
|
274 |
+
"149": "bread",
|
275 |
+
"150": "breechcloth",
|
276 |
+
"151": "bridal_gown",
|
277 |
+
"152": "briefcase",
|
278 |
+
"153": "broccoli",
|
279 |
+
"154": "broach",
|
280 |
+
"155": "broom",
|
281 |
+
"156": "brownie",
|
282 |
+
"157": "brussels_sprouts",
|
283 |
+
"158": "bubble_gum",
|
284 |
+
"159": "bucket",
|
285 |
+
"160": "horse_buggy",
|
286 |
+
"161": "bull",
|
287 |
+
"162": "bulldog",
|
288 |
+
"163": "bulldozer",
|
289 |
+
"164": "bullet_train",
|
290 |
+
"165": "bulletin_board",
|
291 |
+
"166": "bulletproof_vest",
|
292 |
+
"167": "bullhorn",
|
293 |
+
"168": "bun",
|
294 |
+
"169": "bunk_bed",
|
295 |
+
"170": "buoy",
|
296 |
+
"171": "burrito",
|
297 |
+
"172": "bus_(vehicle)",
|
298 |
+
"173": "business_card",
|
299 |
+
"174": "butter",
|
300 |
+
"175": "butterfly",
|
301 |
+
"176": "button",
|
302 |
+
"177": "cab_(taxi)",
|
303 |
+
"178": "cabana",
|
304 |
+
"179": "cabin_car",
|
305 |
+
"180": "cabinet",
|
306 |
+
"181": "locker",
|
307 |
+
"182": "cake",
|
308 |
+
"183": "calculator",
|
309 |
+
"184": "calendar",
|
310 |
+
"185": "calf",
|
311 |
+
"186": "camcorder",
|
312 |
+
"187": "camel",
|
313 |
+
"188": "camera",
|
314 |
+
"189": "camera_lens",
|
315 |
+
"190": "camper_(vehicle)",
|
316 |
+
"191": "can",
|
317 |
+
"192": "can_opener",
|
318 |
+
"193": "candle",
|
319 |
+
"194": "candle_holder",
|
320 |
+
"195": "candy_bar",
|
321 |
+
"196": "candy_cane",
|
322 |
+
"197": "walking_cane",
|
323 |
+
"198": "canister",
|
324 |
+
"199": "canoe",
|
325 |
+
"200": "cantaloup",
|
326 |
+
"201": "canteen",
|
327 |
+
"202": "cap_(headwear)",
|
328 |
+
"203": "bottle_cap",
|
329 |
+
"204": "cape",
|
330 |
+
"205": "cappuccino",
|
331 |
+
"206": "car_(automobile)",
|
332 |
+
"207": "railcar_(part_of_a_train)",
|
333 |
+
"208": "elevator_car",
|
334 |
+
"209": "car_battery",
|
335 |
+
"210": "identity_card",
|
336 |
+
"211": "card",
|
337 |
+
"212": "cardigan",
|
338 |
+
"213": "cargo_ship",
|
339 |
+
"214": "carnation",
|
340 |
+
"215": "horse_carriage",
|
341 |
+
"216": "carrot",
|
342 |
+
"217": "tote_bag",
|
343 |
+
"218": "cart",
|
344 |
+
"219": "carton",
|
345 |
+
"220": "cash_register",
|
346 |
+
"221": "casserole",
|
347 |
+
"222": "cassette",
|
348 |
+
"223": "cast",
|
349 |
+
"224": "cat",
|
350 |
+
"225": "cauliflower",
|
351 |
+
"226": "cayenne_(spice)",
|
352 |
+
"227": "CD_player",
|
353 |
+
"228": "celery",
|
354 |
+
"229": "cellular_telephone",
|
355 |
+
"230": "chain_mail",
|
356 |
+
"231": "chair",
|
357 |
+
"232": "chaise_longue",
|
358 |
+
"233": "chalice",
|
359 |
+
"234": "chandelier",
|
360 |
+
"235": "chap",
|
361 |
+
"236": "checkbook",
|
362 |
+
"237": "checkerboard",
|
363 |
+
"238": "cherry",
|
364 |
+
"239": "chessboard",
|
365 |
+
"240": "chicken_(animal)",
|
366 |
+
"241": "chickpea",
|
367 |
+
"242": "chili_(vegetable)",
|
368 |
+
"243": "chime",
|
369 |
+
"244": "chinaware",
|
370 |
+
"245": "crisp_(potato_chip)",
|
371 |
+
"246": "poker_chip",
|
372 |
+
"247": "chocolate_bar",
|
373 |
+
"248": "chocolate_cake",
|
374 |
+
"249": "chocolate_milk",
|
375 |
+
"250": "chocolate_mousse",
|
376 |
+
"251": "choker",
|
377 |
+
"252": "chopping_board",
|
378 |
+
"253": "chopstick",
|
379 |
+
"254": "Christmas_tree",
|
380 |
+
"255": "slide",
|
381 |
+
"256": "cider",
|
382 |
+
"257": "cigar_box",
|
383 |
+
"258": "cigarette",
|
384 |
+
"259": "cigarette_case",
|
385 |
+
"260": "cistern",
|
386 |
+
"261": "clarinet",
|
387 |
+
"262": "clasp",
|
388 |
+
"263": "cleansing_agent",
|
389 |
+
"264": "cleat_(for_securing_rope)",
|
390 |
+
"265": "clementine",
|
391 |
+
"266": "clip",
|
392 |
+
"267": "clipboard",
|
393 |
+
"268": "clippers_(for_plants)",
|
394 |
+
"269": "cloak",
|
395 |
+
"270": "clock",
|
396 |
+
"271": "clock_tower",
|
397 |
+
"272": "clothes_hamper",
|
398 |
+
"273": "clothespin",
|
399 |
+
"274": "clutch_bag",
|
400 |
+
"275": "coaster",
|
401 |
+
"276": "coat",
|
402 |
+
"277": "coat_hanger",
|
403 |
+
"278": "coatrack",
|
404 |
+
"279": "cock",
|
405 |
+
"280": "cockroach",
|
406 |
+
"281": "cocoa_(beverage)",
|
407 |
+
"282": "coconut",
|
408 |
+
"283": "coffee_maker",
|
409 |
+
"284": "coffee_table",
|
410 |
+
"285": "coffeepot",
|
411 |
+
"286": "coil",
|
412 |
+
"287": "coin",
|
413 |
+
"288": "colander",
|
414 |
+
"289": "coleslaw",
|
415 |
+
"290": "coloring_material",
|
416 |
+
"291": "combination_lock",
|
417 |
+
"292": "pacifier",
|
418 |
+
"293": "comic_book",
|
419 |
+
"294": "compass",
|
420 |
+
"295": "computer_keyboard",
|
421 |
+
"296": "condiment",
|
422 |
+
"297": "cone",
|
423 |
+
"298": "control",
|
424 |
+
"299": "convertible_(automobile)",
|
425 |
+
"300": "sofa_bed",
|
426 |
+
"301": "cooker",
|
427 |
+
"302": "cookie",
|
428 |
+
"303": "cooking_utensil",
|
429 |
+
"304": "cooler_(for_food)",
|
430 |
+
"305": "cork_(bottle_plug)",
|
431 |
+
"306": "corkboard",
|
432 |
+
"307": "corkscrew",
|
433 |
+
"308": "edible_corn",
|
434 |
+
"309": "cornbread",
|
435 |
+
"310": "cornet",
|
436 |
+
"311": "cornice",
|
437 |
+
"312": "cornmeal",
|
438 |
+
"313": "corset",
|
439 |
+
"314": "costume",
|
440 |
+
"315": "cougar",
|
441 |
+
"316": "coverall",
|
442 |
+
"317": "cowbell",
|
443 |
+
"318": "cowboy_hat",
|
444 |
+
"319": "crab_(animal)",
|
445 |
+
"320": "crabmeat",
|
446 |
+
"321": "cracker",
|
447 |
+
"322": "crape",
|
448 |
+
"323": "crate",
|
449 |
+
"324": "crayon",
|
450 |
+
"325": "cream_pitcher",
|
451 |
+
"326": "crescent_roll",
|
452 |
+
"327": "crib",
|
453 |
+
"328": "crock_pot",
|
454 |
+
"329": "crossbar",
|
455 |
+
"330": "crouton",
|
456 |
+
"331": "crow",
|
457 |
+
"332": "crowbar",
|
458 |
+
"333": "crown",
|
459 |
+
"334": "crucifix",
|
460 |
+
"335": "cruise_ship",
|
461 |
+
"336": "police_cruiser",
|
462 |
+
"337": "crumb",
|
463 |
+
"338": "crutch",
|
464 |
+
"339": "cub_(animal)",
|
465 |
+
"340": "cube",
|
466 |
+
"341": "cucumber",
|
467 |
+
"342": "cufflink",
|
468 |
+
"343": "cup",
|
469 |
+
"344": "trophy_cup",
|
470 |
+
"345": "cupboard",
|
471 |
+
"346": "cupcake",
|
472 |
+
"347": "hair_curler",
|
473 |
+
"348": "curling_iron",
|
474 |
+
"349": "curtain",
|
475 |
+
"350": "cushion",
|
476 |
+
"351": "cylinder",
|
477 |
+
"352": "cymbal",
|
478 |
+
"353": "dagger",
|
479 |
+
"354": "dalmatian",
|
480 |
+
"355": "dartboard",
|
481 |
+
"356": "date_(fruit)",
|
482 |
+
"357": "deck_chair",
|
483 |
+
"358": "deer",
|
484 |
+
"359": "dental_floss",
|
485 |
+
"360": "desk",
|
486 |
+
"361": "detergent",
|
487 |
+
"362": "diaper",
|
488 |
+
"363": "diary",
|
489 |
+
"364": "die",
|
490 |
+
"365": "dinghy",
|
491 |
+
"366": "dining_table",
|
492 |
+
"367": "tux",
|
493 |
+
"368": "dish",
|
494 |
+
"369": "dish_antenna",
|
495 |
+
"370": "dishrag",
|
496 |
+
"371": "dishtowel",
|
497 |
+
"372": "dishwasher",
|
498 |
+
"373": "dishwasher_detergent",
|
499 |
+
"374": "dispenser",
|
500 |
+
"375": "diving_board",
|
501 |
+
"376": "Dixie_cup",
|
502 |
+
"377": "dog",
|
503 |
+
"378": "dog_collar",
|
504 |
+
"379": "doll",
|
505 |
+
"380": "dollar",
|
506 |
+
"381": "dollhouse",
|
507 |
+
"382": "dolphin",
|
508 |
+
"383": "domestic_ass",
|
509 |
+
"384": "doorknob",
|
510 |
+
"385": "doormat",
|
511 |
+
"386": "doughnut",
|
512 |
+
"387": "dove",
|
513 |
+
"388": "dragonfly",
|
514 |
+
"389": "drawer",
|
515 |
+
"390": "underdrawers",
|
516 |
+
"391": "dress",
|
517 |
+
"392": "dress_hat",
|
518 |
+
"393": "dress_suit",
|
519 |
+
"394": "dresser",
|
520 |
+
"395": "drill",
|
521 |
+
"396": "drone",
|
522 |
+
"397": "dropper",
|
523 |
+
"398": "drum_(musical_instrument)",
|
524 |
+
"399": "drumstick",
|
525 |
+
"400": "duck",
|
526 |
+
"401": "duckling",
|
527 |
+
"402": "duct_tape",
|
528 |
+
"403": "duffel_bag",
|
529 |
+
"404": "dumbbell",
|
530 |
+
"405": "dumpster",
|
531 |
+
"406": "dustpan",
|
532 |
+
"407": "eagle",
|
533 |
+
"408": "earphone",
|
534 |
+
"409": "earplug",
|
535 |
+
"410": "earring",
|
536 |
+
"411": "easel",
|
537 |
+
"412": "eclair",
|
538 |
+
"413": "eel",
|
539 |
+
"414": "egg",
|
540 |
+
"415": "egg_roll",
|
541 |
+
"416": "egg_yolk",
|
542 |
+
"417": "eggbeater",
|
543 |
+
"418": "eggplant",
|
544 |
+
"419": "electric_chair",
|
545 |
+
"420": "refrigerator",
|
546 |
+
"421": "elephant",
|
547 |
+
"422": "elk",
|
548 |
+
"423": "envelope",
|
549 |
+
"424": "eraser",
|
550 |
+
"425": "escargot",
|
551 |
+
"426": "eyepatch",
|
552 |
+
"427": "falcon",
|
553 |
+
"428": "fan",
|
554 |
+
"429": "faucet",
|
555 |
+
"430": "fedora",
|
556 |
+
"431": "ferret",
|
557 |
+
"432": "Ferris_wheel",
|
558 |
+
"433": "ferry",
|
559 |
+
"434": "fig_(fruit)",
|
560 |
+
"435": "fighter_jet",
|
561 |
+
"436": "figurine",
|
562 |
+
"437": "file_cabinet",
|
563 |
+
"438": "file_(tool)",
|
564 |
+
"439": "fire_alarm",
|
565 |
+
"440": "fire_engine",
|
566 |
+
"441": "fire_extinguisher",
|
567 |
+
"442": "fire_hose",
|
568 |
+
"443": "fireplace",
|
569 |
+
"444": "fireplug",
|
570 |
+
"445": "first-aid_kit",
|
571 |
+
"446": "fish",
|
572 |
+
"447": "fish_(food)",
|
573 |
+
"448": "fishbowl",
|
574 |
+
"449": "fishing_rod",
|
575 |
+
"450": "flag",
|
576 |
+
"451": "flagpole",
|
577 |
+
"452": "flamingo",
|
578 |
+
"453": "flannel",
|
579 |
+
"454": "flap",
|
580 |
+
"455": "flash",
|
581 |
+
"456": "flashlight",
|
582 |
+
"457": "fleece",
|
583 |
+
"458": "flip-flop_(sandal)",
|
584 |
+
"459": "flipper_(footwear)",
|
585 |
+
"460": "flower_arrangement",
|
586 |
+
"461": "flute_glass",
|
587 |
+
"462": "foal",
|
588 |
+
"463": "folding_chair",
|
589 |
+
"464": "food_processor",
|
590 |
+
"465": "football_(American)",
|
591 |
+
"466": "football_helmet",
|
592 |
+
"467": "footstool",
|
593 |
+
"468": "fork",
|
594 |
+
"469": "forklift",
|
595 |
+
"470": "freight_car",
|
596 |
+
"471": "French_toast",
|
597 |
+
"472": "freshener",
|
598 |
+
"473": "frisbee",
|
599 |
+
"474": "frog",
|
600 |
+
"475": "fruit_juice",
|
601 |
+
"476": "frying_pan",
|
602 |
+
"477": "fudge",
|
603 |
+
"478": "funnel",
|
604 |
+
"479": "futon",
|
605 |
+
"480": "gag",
|
606 |
+
"481": "garbage",
|
607 |
+
"482": "garbage_truck",
|
608 |
+
"483": "garden_hose",
|
609 |
+
"484": "gargle",
|
610 |
+
"485": "gargoyle",
|
611 |
+
"486": "garlic",
|
612 |
+
"487": "gasmask",
|
613 |
+
"488": "gazelle",
|
614 |
+
"489": "gelatin",
|
615 |
+
"490": "gemstone",
|
616 |
+
"491": "generator",
|
617 |
+
"492": "giant_panda",
|
618 |
+
"493": "gift_wrap",
|
619 |
+
"494": "ginger",
|
620 |
+
"495": "giraffe",
|
621 |
+
"496": "cincture",
|
622 |
+
"497": "glass_(drink_container)",
|
623 |
+
"498": "globe",
|
624 |
+
"499": "glove",
|
625 |
+
"500": "goat",
|
626 |
+
"501": "goggles",
|
627 |
+
"502": "goldfish",
|
628 |
+
"503": "golf_club",
|
629 |
+
"504": "golfcart",
|
630 |
+
"505": "gondola_(boat)",
|
631 |
+
"506": "goose",
|
632 |
+
"507": "gorilla",
|
633 |
+
"508": "gourd",
|
634 |
+
"509": "grape",
|
635 |
+
"510": "grater",
|
636 |
+
"511": "gravestone",
|
637 |
+
"512": "gravy_boat",
|
638 |
+
"513": "green_bean",
|
639 |
+
"514": "green_onion",
|
640 |
+
"515": "griddle",
|
641 |
+
"516": "grill",
|
642 |
+
"517": "grits",
|
643 |
+
"518": "grizzly",
|
644 |
+
"519": "grocery_bag",
|
645 |
+
"520": "guitar",
|
646 |
+
"521": "gull",
|
647 |
+
"522": "gun",
|
648 |
+
"523": "hairbrush",
|
649 |
+
"524": "hairnet",
|
650 |
+
"525": "hairpin",
|
651 |
+
"526": "halter_top",
|
652 |
+
"527": "ham",
|
653 |
+
"528": "hamburger",
|
654 |
+
"529": "hammer",
|
655 |
+
"530": "hammock",
|
656 |
+
"531": "hamper",
|
657 |
+
"532": "hamster",
|
658 |
+
"533": "hair_dryer",
|
659 |
+
"534": "hand_glass",
|
660 |
+
"535": "hand_towel",
|
661 |
+
"536": "handcart",
|
662 |
+
"537": "handcuff",
|
663 |
+
"538": "handkerchief",
|
664 |
+
"539": "handle",
|
665 |
+
"540": "handsaw",
|
666 |
+
"541": "hardback_book",
|
667 |
+
"542": "harmonium",
|
668 |
+
"543": "hat",
|
669 |
+
"544": "hatbox",
|
670 |
+
"545": "veil",
|
671 |
+
"546": "headband",
|
672 |
+
"547": "headboard",
|
673 |
+
"548": "headlight",
|
674 |
+
"549": "headscarf",
|
675 |
+
"550": "headset",
|
676 |
+
"551": "headstall_(for_horses)",
|
677 |
+
"552": "heart",
|
678 |
+
"553": "heater",
|
679 |
+
"554": "helicopter",
|
680 |
+
"555": "helmet",
|
681 |
+
"556": "heron",
|
682 |
+
"557": "highchair",
|
683 |
+
"558": "hinge",
|
684 |
+
"559": "hippopotamus",
|
685 |
+
"560": "hockey_stick",
|
686 |
+
"561": "hog",
|
687 |
+
"562": "home_plate_(baseball)",
|
688 |
+
"563": "honey",
|
689 |
+
"564": "fume_hood",
|
690 |
+
"565": "hook",
|
691 |
+
"566": "hookah",
|
692 |
+
"567": "hornet",
|
693 |
+
"568": "horse",
|
694 |
+
"569": "hose",
|
695 |
+
"570": "hot-air_balloon",
|
696 |
+
"571": "hotplate",
|
697 |
+
"572": "hot_sauce",
|
698 |
+
"573": "hourglass",
|
699 |
+
"574": "houseboat",
|
700 |
+
"575": "hummingbird",
|
701 |
+
"576": "hummus",
|
702 |
+
"577": "polar_bear",
|
703 |
+
"578": "icecream",
|
704 |
+
"579": "popsicle",
|
705 |
+
"580": "ice_maker",
|
706 |
+
"581": "ice_pack",
|
707 |
+
"582": "ice_skate",
|
708 |
+
"583": "igniter",
|
709 |
+
"584": "inhaler",
|
710 |
+
"585": "iPod",
|
711 |
+
"586": "iron_(for_clothing)",
|
712 |
+
"587": "ironing_board",
|
713 |
+
"588": "jacket",
|
714 |
+
"589": "jam",
|
715 |
+
"590": "jar",
|
716 |
+
"591": "jean",
|
717 |
+
"592": "jeep",
|
718 |
+
"593": "jelly_bean",
|
719 |
+
"594": "jersey",
|
720 |
+
"595": "jet_plane",
|
721 |
+
"596": "jewel",
|
722 |
+
"597": "jewelry",
|
723 |
+
"598": "joystick",
|
724 |
+
"599": "jumpsuit",
|
725 |
+
"600": "kayak",
|
726 |
+
"601": "keg",
|
727 |
+
"602": "kennel",
|
728 |
+
"603": "kettle",
|
729 |
+
"604": "key",
|
730 |
+
"605": "keycard",
|
731 |
+
"606": "kilt",
|
732 |
+
"607": "kimono",
|
733 |
+
"608": "kitchen_sink",
|
734 |
+
"609": "kitchen_table",
|
735 |
+
"610": "kite",
|
736 |
+
"611": "kitten",
|
737 |
+
"612": "kiwi_fruit",
|
738 |
+
"613": "knee_pad",
|
739 |
+
"614": "knife",
|
740 |
+
"615": "knitting_needle",
|
741 |
+
"616": "knob",
|
742 |
+
"617": "knocker_(on_a_door)",
|
743 |
+
"618": "koala",
|
744 |
+
"619": "lab_coat",
|
745 |
+
"620": "ladder",
|
746 |
+
"621": "ladle",
|
747 |
+
"622": "ladybug",
|
748 |
+
"623": "lamb_(animal)",
|
749 |
+
"624": "lamb-chop",
|
750 |
+
"625": "lamp",
|
751 |
+
"626": "lamppost",
|
752 |
+
"627": "lampshade",
|
753 |
+
"628": "lantern",
|
754 |
+
"629": "lanyard",
|
755 |
+
"630": "laptop_computer",
|
756 |
+
"631": "lasagna",
|
757 |
+
"632": "latch",
|
758 |
+
"633": "lawn_mower",
|
759 |
+
"634": "leather",
|
760 |
+
"635": "legging_(clothing)",
|
761 |
+
"636": "Lego",
|
762 |
+
"637": "legume",
|
763 |
+
"638": "lemon",
|
764 |
+
"639": "lemonade",
|
765 |
+
"640": "lettuce",
|
766 |
+
"641": "license_plate",
|
767 |
+
"642": "life_buoy",
|
768 |
+
"643": "life_jacket",
|
769 |
+
"644": "lightbulb",
|
770 |
+
"645": "lightning_rod",
|
771 |
+
"646": "lime",
|
772 |
+
"647": "limousine",
|
773 |
+
"648": "lion",
|
774 |
+
"649": "lip_balm",
|
775 |
+
"650": "liquor",
|
776 |
+
"651": "lizard",
|
777 |
+
"652": "log",
|
778 |
+
"653": "lollipop",
|
779 |
+
"654": "speaker_(stero_equipment)",
|
780 |
+
"655": "loveseat",
|
781 |
+
"656": "machine_gun",
|
782 |
+
"657": "magazine",
|
783 |
+
"658": "magnet",
|
784 |
+
"659": "mail_slot",
|
785 |
+
"660": "mailbox_(at_home)",
|
786 |
+
"661": "mallard",
|
787 |
+
"662": "mallet",
|
788 |
+
"663": "mammoth",
|
789 |
+
"664": "manatee",
|
790 |
+
"665": "mandarin_orange",
|
791 |
+
"666": "manger",
|
792 |
+
"667": "manhole",
|
793 |
+
"668": "map",
|
794 |
+
"669": "marker",
|
795 |
+
"670": "martini",
|
796 |
+
"671": "mascot",
|
797 |
+
"672": "mashed_potato",
|
798 |
+
"673": "masher",
|
799 |
+
"674": "mask",
|
800 |
+
"675": "mast",
|
801 |
+
"676": "mat_(gym_equipment)",
|
802 |
+
"677": "matchbox",
|
803 |
+
"678": "mattress",
|
804 |
+
"679": "measuring_cup",
|
805 |
+
"680": "measuring_stick",
|
806 |
+
"681": "meatball",
|
807 |
+
"682": "medicine",
|
808 |
+
"683": "melon",
|
809 |
+
"684": "microphone",
|
810 |
+
"685": "microscope",
|
811 |
+
"686": "microwave_oven",
|
812 |
+
"687": "milestone",
|
813 |
+
"688": "milk",
|
814 |
+
"689": "milk_can",
|
815 |
+
"690": "milkshake",
|
816 |
+
"691": "minivan",
|
817 |
+
"692": "mint_candy",
|
818 |
+
"693": "mirror",
|
819 |
+
"694": "mitten",
|
820 |
+
"695": "mixer_(kitchen_tool)",
|
821 |
+
"696": "money",
|
822 |
+
"697": "monitor_(computer_equipment) computer_monitor",
|
823 |
+
"698": "monkey",
|
824 |
+
"699": "motor",
|
825 |
+
"700": "motor_scooter",
|
826 |
+
"701": "motor_vehicle",
|
827 |
+
"702": "motorcycle",
|
828 |
+
"703": "mound_(baseball)",
|
829 |
+
"704": "mouse_(computer_equipment)",
|
830 |
+
"705": "mousepad",
|
831 |
+
"706": "muffin",
|
832 |
+
"707": "mug",
|
833 |
+
"708": "mushroom",
|
834 |
+
"709": "music_stool",
|
835 |
+
"710": "musical_instrument",
|
836 |
+
"711": "nailfile",
|
837 |
+
"712": "napkin",
|
838 |
+
"713": "neckerchief",
|
839 |
+
"714": "necklace",
|
840 |
+
"715": "necktie",
|
841 |
+
"716": "needle",
|
842 |
+
"717": "nest",
|
843 |
+
"718": "newspaper",
|
844 |
+
"719": "newsstand",
|
845 |
+
"720": "nightshirt",
|
846 |
+
"721": "nosebag_(for_animals)",
|
847 |
+
"722": "noseband_(for_animals)",
|
848 |
+
"723": "notebook",
|
849 |
+
"724": "notepad",
|
850 |
+
"725": "nut",
|
851 |
+
"726": "nutcracker",
|
852 |
+
"727": "oar",
|
853 |
+
"728": "octopus_(food)",
|
854 |
+
"729": "octopus_(animal)",
|
855 |
+
"730": "oil_lamp",
|
856 |
+
"731": "olive_oil",
|
857 |
+
"732": "omelet",
|
858 |
+
"733": "onion",
|
859 |
+
"734": "orange_(fruit)",
|
860 |
+
"735": "orange_juice",
|
861 |
+
"736": "ostrich",
|
862 |
+
"737": "ottoman",
|
863 |
+
"738": "oven",
|
864 |
+
"739": "overalls_(clothing)",
|
865 |
+
"740": "owl",
|
866 |
+
"741": "packet",
|
867 |
+
"742": "inkpad",
|
868 |
+
"743": "pad",
|
869 |
+
"744": "paddle",
|
870 |
+
"745": "padlock",
|
871 |
+
"746": "paintbrush",
|
872 |
+
"747": "painting",
|
873 |
+
"748": "pajamas",
|
874 |
+
"749": "palette",
|
875 |
+
"750": "pan_(for_cooking)",
|
876 |
+
"751": "pan_(metal_container)",
|
877 |
+
"752": "pancake",
|
878 |
+
"753": "pantyhose",
|
879 |
+
"754": "papaya",
|
880 |
+
"755": "paper_plate",
|
881 |
+
"756": "paper_towel",
|
882 |
+
"757": "paperback_book",
|
883 |
+
"758": "paperweight",
|
884 |
+
"759": "parachute",
|
885 |
+
"760": "parakeet",
|
886 |
+
"761": "parasail_(sports)",
|
887 |
+
"762": "parasol",
|
888 |
+
"763": "parchment",
|
889 |
+
"764": "parka",
|
890 |
+
"765": "parking_meter",
|
891 |
+
"766": "parrot",
|
892 |
+
"767": "passenger_car_(part_of_a_train)",
|
893 |
+
"768": "passenger_ship",
|
894 |
+
"769": "passport",
|
895 |
+
"770": "pastry",
|
896 |
+
"771": "patty_(food)",
|
897 |
+
"772": "pea_(food)",
|
898 |
+
"773": "peach",
|
899 |
+
"774": "peanut_butter",
|
900 |
+
"775": "pear",
|
901 |
+
"776": "peeler_(tool_for_fruit_and_vegetables)",
|
902 |
+
"777": "wooden_leg",
|
903 |
+
"778": "pegboard",
|
904 |
+
"779": "pelican",
|
905 |
+
"780": "pen",
|
906 |
+
"781": "pencil",
|
907 |
+
"782": "pencil_box",
|
908 |
+
"783": "pencil_sharpener",
|
909 |
+
"784": "pendulum",
|
910 |
+
"785": "penguin",
|
911 |
+
"786": "pennant",
|
912 |
+
"787": "penny_(coin)",
|
913 |
+
"788": "pepper",
|
914 |
+
"789": "pepper_mill",
|
915 |
+
"790": "perfume",
|
916 |
+
"791": "persimmon",
|
917 |
+
"792": "person",
|
918 |
+
"793": "pet",
|
919 |
+
"794": "pew_(church_bench)",
|
920 |
+
"795": "phonebook",
|
921 |
+
"796": "phonograph_record",
|
922 |
+
"797": "piano",
|
923 |
+
"798": "pickle",
|
924 |
+
"799": "pickup_truck",
|
925 |
+
"800": "pie",
|
926 |
+
"801": "pigeon",
|
927 |
+
"802": "piggy_bank",
|
928 |
+
"803": "pillow",
|
929 |
+
"804": "pin_(non_jewelry)",
|
930 |
+
"805": "pineapple",
|
931 |
+
"806": "pinecone",
|
932 |
+
"807": "ping-pong_ball",
|
933 |
+
"808": "pinwheel",
|
934 |
+
"809": "tobacco_pipe",
|
935 |
+
"810": "pipe",
|
936 |
+
"811": "pistol",
|
937 |
+
"812": "pita_(bread)",
|
938 |
+
"813": "pitcher_(vessel_for_liquid)",
|
939 |
+
"814": "pitchfork",
|
940 |
+
"815": "pizza",
|
941 |
+
"816": "place_mat",
|
942 |
+
"817": "plate",
|
943 |
+
"818": "platter",
|
944 |
+
"819": "playpen",
|
945 |
+
"820": "pliers",
|
946 |
+
"821": "plow_(farm_equipment)",
|
947 |
+
"822": "plume",
|
948 |
+
"823": "pocket_watch",
|
949 |
+
"824": "pocketknife",
|
950 |
+
"825": "poker_(fire_stirring_tool)",
|
951 |
+
"826": "pole",
|
952 |
+
"827": "polo_shirt",
|
953 |
+
"828": "poncho",
|
954 |
+
"829": "pony",
|
955 |
+
"830": "pool_table",
|
956 |
+
"831": "pop_(soda)",
|
957 |
+
"832": "postbox_(public)",
|
958 |
+
"833": "postcard",
|
959 |
+
"834": "poster",
|
960 |
+
"835": "pot",
|
961 |
+
"836": "flowerpot",
|
962 |
+
"837": "potato",
|
963 |
+
"838": "potholder",
|
964 |
+
"839": "pottery",
|
965 |
+
"840": "pouch",
|
966 |
+
"841": "power_shovel",
|
967 |
+
"842": "prawn",
|
968 |
+
"843": "pretzel",
|
969 |
+
"844": "printer",
|
970 |
+
"845": "projectile_(weapon)",
|
971 |
+
"846": "projector",
|
972 |
+
"847": "propeller",
|
973 |
+
"848": "prune",
|
974 |
+
"849": "pudding",
|
975 |
+
"850": "puffer_(fish)",
|
976 |
+
"851": "puffin",
|
977 |
+
"852": "pug-dog",
|
978 |
+
"853": "pumpkin",
|
979 |
+
"854": "puncher",
|
980 |
+
"855": "puppet",
|
981 |
+
"856": "puppy",
|
982 |
+
"857": "quesadilla",
|
983 |
+
"858": "quiche",
|
984 |
+
"859": "quilt",
|
985 |
+
"860": "rabbit",
|
986 |
+
"861": "race_car",
|
987 |
+
"862": "racket",
|
988 |
+
"863": "radar",
|
989 |
+
"864": "radiator",
|
990 |
+
"865": "radio_receiver",
|
991 |
+
"866": "radish",
|
992 |
+
"867": "raft",
|
993 |
+
"868": "rag_doll",
|
994 |
+
"869": "raincoat",
|
995 |
+
"870": "ram_(animal)",
|
996 |
+
"871": "raspberry",
|
997 |
+
"872": "rat",
|
998 |
+
"873": "razorblade",
|
999 |
+
"874": "reamer_(juicer)",
|
1000 |
+
"875": "rearview_mirror",
|
1001 |
+
"876": "receipt",
|
1002 |
+
"877": "recliner",
|
1003 |
+
"878": "record_player",
|
1004 |
+
"879": "reflector",
|
1005 |
+
"880": "remote_control",
|
1006 |
+
"881": "rhinoceros",
|
1007 |
+
"882": "rib_(food)",
|
1008 |
+
"883": "rifle",
|
1009 |
+
"884": "ring",
|
1010 |
+
"885": "river_boat",
|
1011 |
+
"886": "road_map",
|
1012 |
+
"887": "robe",
|
1013 |
+
"888": "rocking_chair",
|
1014 |
+
"889": "rodent",
|
1015 |
+
"890": "roller_skate",
|
1016 |
+
"891": "Rollerblade",
|
1017 |
+
"892": "rolling_pin",
|
1018 |
+
"893": "root_beer",
|
1019 |
+
"894": "router_(computer_equipment)",
|
1020 |
+
"895": "rubber_band",
|
1021 |
+
"896": "runner_(carpet)",
|
1022 |
+
"897": "plastic_bag",
|
1023 |
+
"898": "saddle_(on_an_animal)",
|
1024 |
+
"899": "saddle_blanket",
|
1025 |
+
"900": "saddlebag",
|
1026 |
+
"901": "safety_pin",
|
1027 |
+
"902": "sail",
|
1028 |
+
"903": "salad",
|
1029 |
+
"904": "salad_plate",
|
1030 |
+
"905": "salami",
|
1031 |
+
"906": "salmon_(fish)",
|
1032 |
+
"907": "salmon_(food)",
|
1033 |
+
"908": "salsa",
|
1034 |
+
"909": "saltshaker",
|
1035 |
+
"910": "sandal_(type_of_shoe)",
|
1036 |
+
"911": "sandwich",
|
1037 |
+
"912": "satchel",
|
1038 |
+
"913": "saucepan",
|
1039 |
+
"914": "saucer",
|
1040 |
+
"915": "sausage",
|
1041 |
+
"916": "sawhorse",
|
1042 |
+
"917": "saxophone",
|
1043 |
+
"918": "scale_(measuring_instrument)",
|
1044 |
+
"919": "scarecrow",
|
1045 |
+
"920": "scarf",
|
1046 |
+
"921": "school_bus",
|
1047 |
+
"922": "scissors",
|
1048 |
+
"923": "scoreboard",
|
1049 |
+
"924": "scraper",
|
1050 |
+
"925": "screwdriver",
|
1051 |
+
"926": "scrubbing_brush",
|
1052 |
+
"927": "sculpture",
|
1053 |
+
"928": "seabird",
|
1054 |
+
"929": "seahorse",
|
1055 |
+
"930": "seaplane",
|
1056 |
+
"931": "seashell",
|
1057 |
+
"932": "sewing_machine",
|
1058 |
+
"933": "shaker",
|
1059 |
+
"934": "shampoo",
|
1060 |
+
"935": "shark",
|
1061 |
+
"936": "sharpener",
|
1062 |
+
"937": "Sharpie",
|
1063 |
+
"938": "shaver_(electric)",
|
1064 |
+
"939": "shaving_cream",
|
1065 |
+
"940": "shawl",
|
1066 |
+
"941": "shears",
|
1067 |
+
"942": "sheep",
|
1068 |
+
"943": "shepherd_dog",
|
1069 |
+
"944": "sherbert",
|
1070 |
+
"945": "shield",
|
1071 |
+
"946": "shirt",
|
1072 |
+
"947": "shoe",
|
1073 |
+
"948": "shopping_bag",
|
1074 |
+
"949": "shopping_cart",
|
1075 |
+
"950": "short_pants",
|
1076 |
+
"951": "shot_glass",
|
1077 |
+
"952": "shoulder_bag",
|
1078 |
+
"953": "shovel",
|
1079 |
+
"954": "shower_head",
|
1080 |
+
"955": "shower_cap",
|
1081 |
+
"956": "shower_curtain",
|
1082 |
+
"957": "shredder_(for_paper)",
|
1083 |
+
"958": "signboard",
|
1084 |
+
"959": "silo",
|
1085 |
+
"960": "sink",
|
1086 |
+
"961": "skateboard",
|
1087 |
+
"962": "skewer",
|
1088 |
+
"963": "ski",
|
1089 |
+
"964": "ski_boot",
|
1090 |
+
"965": "ski_parka",
|
1091 |
+
"966": "ski_pole",
|
1092 |
+
"967": "skirt",
|
1093 |
+
"968": "skullcap",
|
1094 |
+
"969": "sled",
|
1095 |
+
"970": "sleeping_bag",
|
1096 |
+
"971": "sling_(bandage)",
|
1097 |
+
"972": "slipper_(footwear)",
|
1098 |
+
"973": "smoothie",
|
1099 |
+
"974": "snake",
|
1100 |
+
"975": "snowboard",
|
1101 |
+
"976": "snowman",
|
1102 |
+
"977": "snowmobile",
|
1103 |
+
"978": "soap",
|
1104 |
+
"979": "soccer_ball",
|
1105 |
+
"980": "sock",
|
1106 |
+
"981": "sofa",
|
1107 |
+
"982": "softball",
|
1108 |
+
"983": "solar_array",
|
1109 |
+
"984": "sombrero",
|
1110 |
+
"985": "soup",
|
1111 |
+
"986": "soup_bowl",
|
1112 |
+
"987": "soupspoon",
|
1113 |
+
"988": "sour_cream",
|
1114 |
+
"989": "soya_milk",
|
1115 |
+
"990": "space_shuttle",
|
1116 |
+
"991": "sparkler_(fireworks)",
|
1117 |
+
"992": "spatula",
|
1118 |
+
"993": "spear",
|
1119 |
+
"994": "spectacles",
|
1120 |
+
"995": "spice_rack",
|
1121 |
+
"996": "spider",
|
1122 |
+
"997": "crawfish",
|
1123 |
+
"998": "sponge",
|
1124 |
+
"999": "spoon",
|
1125 |
+
"1000": "sportswear",
|
1126 |
+
"1001": "spotlight",
|
1127 |
+
"1002": "squid_(food)",
|
1128 |
+
"1003": "squirrel",
|
1129 |
+
"1004": "stagecoach",
|
1130 |
+
"1005": "stapler_(stapling_machine)",
|
1131 |
+
"1006": "starfish",
|
1132 |
+
"1007": "statue_(sculpture)",
|
1133 |
+
"1008": "steak_(food)",
|
1134 |
+
"1009": "steak_knife",
|
1135 |
+
"1010": "steering_wheel",
|
1136 |
+
"1011": "stepladder",
|
1137 |
+
"1012": "step_stool",
|
1138 |
+
"1013": "stereo_(sound_system)",
|
1139 |
+
"1014": "stew",
|
1140 |
+
"1015": "stirrer",
|
1141 |
+
"1016": "stirrup",
|
1142 |
+
"1017": "stool",
|
1143 |
+
"1018": "stop_sign",
|
1144 |
+
"1019": "brake_light",
|
1145 |
+
"1020": "stove",
|
1146 |
+
"1021": "strainer",
|
1147 |
+
"1022": "strap",
|
1148 |
+
"1023": "straw_(for_drinking)",
|
1149 |
+
"1024": "strawberry",
|
1150 |
+
"1025": "street_sign",
|
1151 |
+
"1026": "streetlight",
|
1152 |
+
"1027": "string_cheese",
|
1153 |
+
"1028": "stylus",
|
1154 |
+
"1029": "subwoofer",
|
1155 |
+
"1030": "sugar_bowl",
|
1156 |
+
"1031": "sugarcane_(plant)",
|
1157 |
+
"1032": "suit_(clothing)",
|
1158 |
+
"1033": "sunflower",
|
1159 |
+
"1034": "sunglasses",
|
1160 |
+
"1035": "sunhat",
|
1161 |
+
"1036": "surfboard",
|
1162 |
+
"1037": "sushi",
|
1163 |
+
"1038": "mop",
|
1164 |
+
"1039": "sweat_pants",
|
1165 |
+
"1040": "sweatband",
|
1166 |
+
"1041": "sweater",
|
1167 |
+
"1042": "sweatshirt",
|
1168 |
+
"1043": "sweet_potato",
|
1169 |
+
"1044": "swimsuit",
|
1170 |
+
"1045": "sword",
|
1171 |
+
"1046": "syringe",
|
1172 |
+
"1047": "Tabasco_sauce",
|
1173 |
+
"1048": "table-tennis_table",
|
1174 |
+
"1049": "table",
|
1175 |
+
"1050": "table_lamp",
|
1176 |
+
"1051": "tablecloth",
|
1177 |
+
"1052": "tachometer",
|
1178 |
+
"1053": "taco",
|
1179 |
+
"1054": "tag",
|
1180 |
+
"1055": "taillight",
|
1181 |
+
"1056": "tambourine",
|
1182 |
+
"1057": "army_tank",
|
1183 |
+
"1058": "tank_(storage_vessel)",
|
1184 |
+
"1059": "tank_top_(clothing)",
|
1185 |
+
"1060": "tape_(sticky_cloth_or_paper)",
|
1186 |
+
"1061": "tape_measure",
|
1187 |
+
"1062": "tapestry",
|
1188 |
+
"1063": "tarp",
|
1189 |
+
"1064": "tartan",
|
1190 |
+
"1065": "tassel",
|
1191 |
+
"1066": "tea_bag",
|
1192 |
+
"1067": "teacup",
|
1193 |
+
"1068": "teakettle",
|
1194 |
+
"1069": "teapot",
|
1195 |
+
"1070": "teddy_bear",
|
1196 |
+
"1071": "telephone",
|
1197 |
+
"1072": "telephone_booth",
|
1198 |
+
"1073": "telephone_pole",
|
1199 |
+
"1074": "telephoto_lens",
|
1200 |
+
"1075": "television_camera",
|
1201 |
+
"1076": "television_set",
|
1202 |
+
"1077": "tennis_ball",
|
1203 |
+
"1078": "tennis_racket",
|
1204 |
+
"1079": "tequila",
|
1205 |
+
"1080": "thermometer",
|
1206 |
+
"1081": "thermos_bottle",
|
1207 |
+
"1082": "thermostat",
|
1208 |
+
"1083": "thimble",
|
1209 |
+
"1084": "thread",
|
1210 |
+
"1085": "thumbtack",
|
1211 |
+
"1086": "tiara",
|
1212 |
+
"1087": "tiger",
|
1213 |
+
"1088": "tights_(clothing)",
|
1214 |
+
"1089": "timer",
|
1215 |
+
"1090": "tinfoil",
|
1216 |
+
"1091": "tinsel",
|
1217 |
+
"1092": "tissue_paper",
|
1218 |
+
"1093": "toast_(food)",
|
1219 |
+
"1094": "toaster",
|
1220 |
+
"1095": "toaster_oven",
|
1221 |
+
"1096": "toilet",
|
1222 |
+
"1097": "toilet_tissue",
|
1223 |
+
"1098": "tomato",
|
1224 |
+
"1099": "tongs",
|
1225 |
+
"1100": "toolbox",
|
1226 |
+
"1101": "toothbrush",
|
1227 |
+
"1102": "toothpaste",
|
1228 |
+
"1103": "toothpick",
|
1229 |
+
"1104": "cover",
|
1230 |
+
"1105": "tortilla",
|
1231 |
+
"1106": "tow_truck",
|
1232 |
+
"1107": "towel",
|
1233 |
+
"1108": "towel_rack",
|
1234 |
+
"1109": "toy",
|
1235 |
+
"1110": "tractor_(farm_equipment)",
|
1236 |
+
"1111": "traffic_light",
|
1237 |
+
"1112": "dirt_bike",
|
1238 |
+
"1113": "trailer_truck",
|
1239 |
+
"1114": "train_(railroad_vehicle)",
|
1240 |
+
"1115": "trampoline",
|
1241 |
+
"1116": "tray",
|
1242 |
+
"1117": "trench_coat",
|
1243 |
+
"1118": "triangle_(musical_instrument)",
|
1244 |
+
"1119": "tricycle",
|
1245 |
+
"1120": "tripod",
|
1246 |
+
"1121": "trousers",
|
1247 |
+
"1122": "truck",
|
1248 |
+
"1123": "truffle_(chocolate)",
|
1249 |
+
"1124": "trunk",
|
1250 |
+
"1125": "vat",
|
1251 |
+
"1126": "turban",
|
1252 |
+
"1127": "turkey_(food)",
|
1253 |
+
"1128": "turnip",
|
1254 |
+
"1129": "turtle",
|
1255 |
+
"1130": "turtleneck_(clothing)",
|
1256 |
+
"1131": "typewriter",
|
1257 |
+
"1132": "umbrella",
|
1258 |
+
"1133": "underwear",
|
1259 |
+
"1134": "unicycle",
|
1260 |
+
"1135": "urinal",
|
1261 |
+
"1136": "urn",
|
1262 |
+
"1137": "vacuum_cleaner",
|
1263 |
+
"1138": "vase",
|
1264 |
+
"1139": "vending_machine",
|
1265 |
+
"1140": "vent",
|
1266 |
+
"1141": "vest",
|
1267 |
+
"1142": "videotape",
|
1268 |
+
"1143": "vinegar",
|
1269 |
+
"1144": "violin",
|
1270 |
+
"1145": "vodka",
|
1271 |
+
"1146": "volleyball",
|
1272 |
+
"1147": "vulture",
|
1273 |
+
"1148": "waffle",
|
1274 |
+
"1149": "waffle_iron",
|
1275 |
+
"1150": "wagon",
|
1276 |
+
"1151": "wagon_wheel",
|
1277 |
+
"1152": "walking_stick",
|
1278 |
+
"1153": "wall_clock",
|
1279 |
+
"1154": "wall_socket",
|
1280 |
+
"1155": "wallet",
|
1281 |
+
"1156": "walrus",
|
1282 |
+
"1157": "wardrobe",
|
1283 |
+
"1158": "washbasin",
|
1284 |
+
"1159": "automatic_washer",
|
1285 |
+
"1160": "watch",
|
1286 |
+
"1161": "water_bottle",
|
1287 |
+
"1162": "water_cooler",
|
1288 |
+
"1163": "water_faucet",
|
1289 |
+
"1164": "water_heater",
|
1290 |
+
"1165": "water_jug",
|
1291 |
+
"1166": "water_gun",
|
1292 |
+
"1167": "water_scooter",
|
1293 |
+
"1168": "water_ski",
|
1294 |
+
"1169": "water_tower",
|
1295 |
+
"1170": "watering_can",
|
1296 |
+
"1171": "watermelon",
|
1297 |
+
"1172": "weathervane",
|
1298 |
+
"1173": "webcam",
|
1299 |
+
"1174": "wedding_cake",
|
1300 |
+
"1175": "wedding_ring",
|
1301 |
+
"1176": "wet_suit",
|
1302 |
+
"1177": "wheel",
|
1303 |
+
"1178": "wheelchair",
|
1304 |
+
"1179": "whipped_cream",
|
1305 |
+
"1180": "whistle",
|
1306 |
+
"1181": "wig",
|
1307 |
+
"1182": "wind_chime",
|
1308 |
+
"1183": "windmill",
|
1309 |
+
"1184": "window_box_(for_plants)",
|
1310 |
+
"1185": "windshield_wiper",
|
1311 |
+
"1186": "windsock",
|
1312 |
+
"1187": "wine_bottle",
|
1313 |
+
"1188": "wine_bucket",
|
1314 |
+
"1189": "wineglass",
|
1315 |
+
"1190": "blinder_(for_horses)",
|
1316 |
+
"1191": "wok",
|
1317 |
+
"1192": "wolf",
|
1318 |
+
"1193": "wooden_spoon",
|
1319 |
+
"1194": "wreath",
|
1320 |
+
"1195": "wrench",
|
1321 |
+
"1196": "wristband",
|
1322 |
+
"1197": "wristlet",
|
1323 |
+
"1198": "yacht",
|
1324 |
+
"1199": "yogurt",
|
1325 |
+
"1200": "yoke_(animal_equipment)",
|
1326 |
+
"1201": "zebra",
|
1327 |
+
"1202": "zucchini"
|
1328 |
+
},
|
1329 |
+
"init_std": 0.02,
|
1330 |
+
"init_xavier_std": 1.0,
|
1331 |
+
"is_encoder_decoder": true,
|
1332 |
+
"label2id": {
|
1333 |
+
"Band_Aid": 45,
|
1334 |
+
"Bible": 92,
|
1335 |
+
"CD_player": 227,
|
1336 |
+
"Christmas_tree": 254,
|
1337 |
+
"Dixie_cup": 376,
|
1338 |
+
"Ferris_wheel": 432,
|
1339 |
+
"French_toast": 471,
|
1340 |
+
"Lego": 636,
|
1341 |
+
"Rollerblade": 891,
|
1342 |
+
"Sharpie": 937,
|
1343 |
+
"Tabasco_sauce": 1047,
|
1344 |
+
"aerosol_can": 0,
|
1345 |
+
"air_conditioner": 1,
|
1346 |
+
"airplane": 2,
|
1347 |
+
"alarm_clock": 3,
|
1348 |
+
"alcohol": 4,
|
1349 |
+
"alligator": 5,
|
1350 |
+
"almond": 6,
|
1351 |
+
"ambulance": 7,
|
1352 |
+
"amplifier": 8,
|
1353 |
+
"anklet": 9,
|
1354 |
+
"antenna": 10,
|
1355 |
+
"apple": 11,
|
1356 |
+
"applesauce": 12,
|
1357 |
+
"apricot": 13,
|
1358 |
+
"apron": 14,
|
1359 |
+
"aquarium": 15,
|
1360 |
+
"arctic_(type_of_shoe)": 16,
|
1361 |
+
"armband": 17,
|
1362 |
+
"armchair": 18,
|
1363 |
+
"armoire": 19,
|
1364 |
+
"armor": 20,
|
1365 |
+
"army_tank": 1057,
|
1366 |
+
"artichoke": 21,
|
1367 |
+
"ashtray": 23,
|
1368 |
+
"asparagus": 24,
|
1369 |
+
"atomizer": 25,
|
1370 |
+
"automatic_washer": 1159,
|
1371 |
+
"avocado": 26,
|
1372 |
+
"award": 27,
|
1373 |
+
"awning": 28,
|
1374 |
+
"ax": 29,
|
1375 |
+
"baboon": 30,
|
1376 |
+
"baby_buggy": 31,
|
1377 |
+
"backpack": 33,
|
1378 |
+
"bagel": 36,
|
1379 |
+
"bagpipe": 37,
|
1380 |
+
"baguet": 38,
|
1381 |
+
"bait": 39,
|
1382 |
+
"ball": 40,
|
1383 |
+
"ballet_skirt": 41,
|
1384 |
+
"balloon": 42,
|
1385 |
+
"bamboo": 43,
|
1386 |
+
"banana": 44,
|
1387 |
+
"bandage": 46,
|
1388 |
+
"bandanna": 47,
|
1389 |
+
"banjo": 48,
|
1390 |
+
"banner": 49,
|
1391 |
+
"barbell": 50,
|
1392 |
+
"barge": 51,
|
1393 |
+
"barrel": 52,
|
1394 |
+
"barrette": 53,
|
1395 |
+
"barrow": 54,
|
1396 |
+
"baseball": 56,
|
1397 |
+
"baseball_base": 55,
|
1398 |
+
"baseball_bat": 57,
|
1399 |
+
"baseball_cap": 58,
|
1400 |
+
"baseball_glove": 59,
|
1401 |
+
"basket": 60,
|
1402 |
+
"basketball": 61,
|
1403 |
+
"basketball_backboard": 32,
|
1404 |
+
"bass_horn": 62,
|
1405 |
+
"bat_(animal)": 63,
|
1406 |
+
"bath_mat": 64,
|
1407 |
+
"bath_towel": 65,
|
1408 |
+
"bathrobe": 66,
|
1409 |
+
"bathtub": 67,
|
1410 |
+
"batter_(food)": 68,
|
1411 |
+
"battery": 69,
|
1412 |
+
"beachball": 70,
|
1413 |
+
"bead": 71,
|
1414 |
+
"bean_curd": 72,
|
1415 |
+
"beanbag": 73,
|
1416 |
+
"beanie": 74,
|
1417 |
+
"bear": 75,
|
1418 |
+
"bed": 76,
|
1419 |
+
"bedpan": 77,
|
1420 |
+
"bedspread": 78,
|
1421 |
+
"beef_(food)": 80,
|
1422 |
+
"beeper": 81,
|
1423 |
+
"beer_bottle": 82,
|
1424 |
+
"beer_can": 83,
|
1425 |
+
"beetle": 84,
|
1426 |
+
"bell": 85,
|
1427 |
+
"bell_pepper": 86,
|
1428 |
+
"belt": 87,
|
1429 |
+
"belt_buckle": 88,
|
1430 |
+
"bench": 89,
|
1431 |
+
"beret": 90,
|
1432 |
+
"bib": 91,
|
1433 |
+
"bicycle": 93,
|
1434 |
+
"billboard": 95,
|
1435 |
+
"binder": 96,
|
1436 |
+
"binoculars": 97,
|
1437 |
+
"bird": 98,
|
1438 |
+
"birdbath": 100,
|
1439 |
+
"birdcage": 101,
|
1440 |
+
"birdfeeder": 99,
|
1441 |
+
"birdhouse": 102,
|
1442 |
+
"birthday_cake": 103,
|
1443 |
+
"birthday_card": 104,
|
1444 |
+
"black_sheep": 106,
|
1445 |
+
"blackberry": 107,
|
1446 |
+
"blackboard": 108,
|
1447 |
+
"blanket": 109,
|
1448 |
+
"blazer": 110,
|
1449 |
+
"blender": 111,
|
1450 |
+
"blimp": 112,
|
1451 |
+
"blinder_(for_horses)": 1190,
|
1452 |
+
"blinker": 113,
|
1453 |
+
"blouse": 114,
|
1454 |
+
"blueberry": 115,
|
1455 |
+
"boat": 117,
|
1456 |
+
"bob": 118,
|
1457 |
+
"bobbin": 119,
|
1458 |
+
"bobby_pin": 120,
|
1459 |
+
"boiled_egg": 121,
|
1460 |
+
"bolo_tie": 122,
|
1461 |
+
"bolt": 124,
|
1462 |
+
"bonnet": 125,
|
1463 |
+
"book": 126,
|
1464 |
+
"bookcase": 127,
|
1465 |
+
"booklet": 128,
|
1466 |
+
"bookmark": 129,
|
1467 |
+
"boom_microphone": 130,
|
1468 |
+
"boot": 131,
|
1469 |
+
"bottle": 132,
|
1470 |
+
"bottle_cap": 203,
|
1471 |
+
"bottle_opener": 133,
|
1472 |
+
"bouquet": 134,
|
1473 |
+
"bow-tie": 137,
|
1474 |
+
"bow_(decorative_ribbons)": 136,
|
1475 |
+
"bow_(weapon)": 135,
|
1476 |
+
"bowl": 138,
|
1477 |
+
"bowler_hat": 140,
|
1478 |
+
"bowling_ball": 141,
|
1479 |
+
"box": 142,
|
1480 |
+
"boxing_glove": 143,
|
1481 |
+
"bracelet": 145,
|
1482 |
+
"brake_light": 1019,
|
1483 |
+
"brass_plaque": 146,
|
1484 |
+
"brassiere": 147,
|
1485 |
+
"bread": 149,
|
1486 |
+
"bread-bin": 148,
|
1487 |
+
"breechcloth": 150,
|
1488 |
+
"bridal_gown": 151,
|
1489 |
+
"briefcase": 152,
|
1490 |
+
"broach": 154,
|
1491 |
+
"broccoli": 153,
|
1492 |
+
"broom": 155,
|
1493 |
+
"brownie": 156,
|
1494 |
+
"brussels_sprouts": 157,
|
1495 |
+
"bubble_gum": 158,
|
1496 |
+
"bucket": 159,
|
1497 |
+
"bull": 161,
|
1498 |
+
"bulldog": 162,
|
1499 |
+
"bulldozer": 163,
|
1500 |
+
"bullet_train": 164,
|
1501 |
+
"bulletin_board": 165,
|
1502 |
+
"bulletproof_vest": 166,
|
1503 |
+
"bullhorn": 167,
|
1504 |
+
"bun": 168,
|
1505 |
+
"bunk_bed": 169,
|
1506 |
+
"buoy": 170,
|
1507 |
+
"burrito": 171,
|
1508 |
+
"bus_(vehicle)": 172,
|
1509 |
+
"business_card": 173,
|
1510 |
+
"butter": 174,
|
1511 |
+
"butterfly": 175,
|
1512 |
+
"button": 176,
|
1513 |
+
"cab_(taxi)": 177,
|
1514 |
+
"cabana": 178,
|
1515 |
+
"cabin_car": 179,
|
1516 |
+
"cabinet": 180,
|
1517 |
+
"cake": 182,
|
1518 |
+
"calculator": 183,
|
1519 |
+
"calendar": 184,
|
1520 |
+
"calf": 185,
|
1521 |
+
"camcorder": 186,
|
1522 |
+
"camel": 187,
|
1523 |
+
"camera": 188,
|
1524 |
+
"camera_lens": 189,
|
1525 |
+
"camper_(vehicle)": 190,
|
1526 |
+
"can": 191,
|
1527 |
+
"can_opener": 192,
|
1528 |
+
"candle": 193,
|
1529 |
+
"candle_holder": 194,
|
1530 |
+
"candy_bar": 195,
|
1531 |
+
"candy_cane": 196,
|
1532 |
+
"canister": 198,
|
1533 |
+
"canoe": 199,
|
1534 |
+
"cantaloup": 200,
|
1535 |
+
"canteen": 201,
|
1536 |
+
"cap_(headwear)": 202,
|
1537 |
+
"cape": 204,
|
1538 |
+
"cappuccino": 205,
|
1539 |
+
"car_(automobile)": 206,
|
1540 |
+
"car_battery": 209,
|
1541 |
+
"card": 211,
|
1542 |
+
"cardigan": 212,
|
1543 |
+
"cargo_ship": 213,
|
1544 |
+
"carnation": 214,
|
1545 |
+
"carrot": 216,
|
1546 |
+
"cart": 218,
|
1547 |
+
"carton": 219,
|
1548 |
+
"cash_register": 220,
|
1549 |
+
"casserole": 221,
|
1550 |
+
"cassette": 222,
|
1551 |
+
"cast": 223,
|
1552 |
+
"cat": 224,
|
1553 |
+
"cauliflower": 225,
|
1554 |
+
"cayenne_(spice)": 226,
|
1555 |
+
"celery": 228,
|
1556 |
+
"cellular_telephone": 229,
|
1557 |
+
"chain_mail": 230,
|
1558 |
+
"chair": 231,
|
1559 |
+
"chaise_longue": 232,
|
1560 |
+
"chalice": 233,
|
1561 |
+
"chandelier": 234,
|
1562 |
+
"chap": 235,
|
1563 |
+
"checkbook": 236,
|
1564 |
+
"checkerboard": 237,
|
1565 |
+
"cherry": 238,
|
1566 |
+
"chessboard": 239,
|
1567 |
+
"chicken_(animal)": 240,
|
1568 |
+
"chickpea": 241,
|
1569 |
+
"chili_(vegetable)": 242,
|
1570 |
+
"chime": 243,
|
1571 |
+
"chinaware": 244,
|
1572 |
+
"chocolate_bar": 247,
|
1573 |
+
"chocolate_cake": 248,
|
1574 |
+
"chocolate_milk": 249,
|
1575 |
+
"chocolate_mousse": 250,
|
1576 |
+
"choker": 251,
|
1577 |
+
"chopping_board": 252,
|
1578 |
+
"chopstick": 253,
|
1579 |
+
"cider": 256,
|
1580 |
+
"cigar_box": 257,
|
1581 |
+
"cigarette": 258,
|
1582 |
+
"cigarette_case": 259,
|
1583 |
+
"cincture": 496,
|
1584 |
+
"cistern": 260,
|
1585 |
+
"clarinet": 261,
|
1586 |
+
"clasp": 262,
|
1587 |
+
"cleansing_agent": 263,
|
1588 |
+
"cleat_(for_securing_rope)": 264,
|
1589 |
+
"clementine": 265,
|
1590 |
+
"clip": 266,
|
1591 |
+
"clipboard": 267,
|
1592 |
+
"clippers_(for_plants)": 268,
|
1593 |
+
"cloak": 269,
|
1594 |
+
"clock": 270,
|
1595 |
+
"clock_tower": 271,
|
1596 |
+
"clothes_hamper": 272,
|
1597 |
+
"clothespin": 273,
|
1598 |
+
"clutch_bag": 274,
|
1599 |
+
"coaster": 275,
|
1600 |
+
"coat": 276,
|
1601 |
+
"coat_hanger": 277,
|
1602 |
+
"coatrack": 278,
|
1603 |
+
"cock": 279,
|
1604 |
+
"cockroach": 280,
|
1605 |
+
"cocoa_(beverage)": 281,
|
1606 |
+
"coconut": 282,
|
1607 |
+
"coffee_maker": 283,
|
1608 |
+
"coffee_table": 284,
|
1609 |
+
"coffeepot": 285,
|
1610 |
+
"coil": 286,
|
1611 |
+
"coin": 287,
|
1612 |
+
"colander": 288,
|
1613 |
+
"coleslaw": 289,
|
1614 |
+
"coloring_material": 290,
|
1615 |
+
"combination_lock": 291,
|
1616 |
+
"comic_book": 293,
|
1617 |
+
"compass": 294,
|
1618 |
+
"computer_keyboard": 295,
|
1619 |
+
"condiment": 296,
|
1620 |
+
"cone": 297,
|
1621 |
+
"control": 298,
|
1622 |
+
"convertible_(automobile)": 299,
|
1623 |
+
"cooker": 301,
|
1624 |
+
"cookie": 302,
|
1625 |
+
"cooking_utensil": 303,
|
1626 |
+
"cooler_(for_food)": 304,
|
1627 |
+
"cork_(bottle_plug)": 305,
|
1628 |
+
"corkboard": 306,
|
1629 |
+
"corkscrew": 307,
|
1630 |
+
"cornbread": 309,
|
1631 |
+
"cornet": 310,
|
1632 |
+
"cornice": 311,
|
1633 |
+
"cornmeal": 312,
|
1634 |
+
"corset": 313,
|
1635 |
+
"costume": 314,
|
1636 |
+
"cougar": 315,
|
1637 |
+
"cover": 1104,
|
1638 |
+
"coverall": 316,
|
1639 |
+
"cow": 79,
|
1640 |
+
"cowbell": 317,
|
1641 |
+
"cowboy_hat": 318,
|
1642 |
+
"crab_(animal)": 319,
|
1643 |
+
"crabmeat": 320,
|
1644 |
+
"cracker": 321,
|
1645 |
+
"crape": 322,
|
1646 |
+
"crate": 323,
|
1647 |
+
"crawfish": 997,
|
1648 |
+
"crayon": 324,
|
1649 |
+
"cream_pitcher": 325,
|
1650 |
+
"crescent_roll": 326,
|
1651 |
+
"crib": 327,
|
1652 |
+
"crisp_(potato_chip)": 245,
|
1653 |
+
"crock_pot": 328,
|
1654 |
+
"crossbar": 329,
|
1655 |
+
"crouton": 330,
|
1656 |
+
"crow": 331,
|
1657 |
+
"crowbar": 332,
|
1658 |
+
"crown": 333,
|
1659 |
+
"crucifix": 334,
|
1660 |
+
"cruise_ship": 335,
|
1661 |
+
"crumb": 337,
|
1662 |
+
"crutch": 338,
|
1663 |
+
"cub_(animal)": 339,
|
1664 |
+
"cube": 340,
|
1665 |
+
"cucumber": 341,
|
1666 |
+
"cufflink": 342,
|
1667 |
+
"cup": 343,
|
1668 |
+
"cupboard": 345,
|
1669 |
+
"cupcake": 346,
|
1670 |
+
"curling_iron": 348,
|
1671 |
+
"curtain": 349,
|
1672 |
+
"cushion": 350,
|
1673 |
+
"cylinder": 351,
|
1674 |
+
"cymbal": 352,
|
1675 |
+
"dagger": 353,
|
1676 |
+
"dalmatian": 354,
|
1677 |
+
"dartboard": 355,
|
1678 |
+
"date_(fruit)": 356,
|
1679 |
+
"deadbolt": 123,
|
1680 |
+
"deck_chair": 357,
|
1681 |
+
"deer": 358,
|
1682 |
+
"dental_floss": 359,
|
1683 |
+
"desk": 360,
|
1684 |
+
"detergent": 361,
|
1685 |
+
"diaper": 362,
|
1686 |
+
"diary": 363,
|
1687 |
+
"die": 364,
|
1688 |
+
"dinghy": 365,
|
1689 |
+
"dining_table": 366,
|
1690 |
+
"dirt_bike": 1112,
|
1691 |
+
"dish": 368,
|
1692 |
+
"dish_antenna": 369,
|
1693 |
+
"dishrag": 370,
|
1694 |
+
"dishtowel": 371,
|
1695 |
+
"dishwasher": 372,
|
1696 |
+
"dishwasher_detergent": 373,
|
1697 |
+
"dispenser": 374,
|
1698 |
+
"diving_board": 375,
|
1699 |
+
"dog": 377,
|
1700 |
+
"dog_collar": 378,
|
1701 |
+
"doll": 379,
|
1702 |
+
"dollar": 380,
|
1703 |
+
"dollhouse": 381,
|
1704 |
+
"dolphin": 382,
|
1705 |
+
"domestic_ass": 383,
|
1706 |
+
"doorknob": 384,
|
1707 |
+
"doormat": 385,
|
1708 |
+
"doughnut": 386,
|
1709 |
+
"dove": 387,
|
1710 |
+
"dragonfly": 388,
|
1711 |
+
"drawer": 389,
|
1712 |
+
"dress": 391,
|
1713 |
+
"dress_hat": 392,
|
1714 |
+
"dress_suit": 393,
|
1715 |
+
"dresser": 394,
|
1716 |
+
"drill": 395,
|
1717 |
+
"drone": 396,
|
1718 |
+
"dropper": 397,
|
1719 |
+
"drum_(musical_instrument)": 398,
|
1720 |
+
"drumstick": 399,
|
1721 |
+
"duck": 400,
|
1722 |
+
"duckling": 401,
|
1723 |
+
"duct_tape": 402,
|
1724 |
+
"duffel_bag": 403,
|
1725 |
+
"dumbbell": 404,
|
1726 |
+
"dumpster": 405,
|
1727 |
+
"dustpan": 406,
|
1728 |
+
"eagle": 407,
|
1729 |
+
"earphone": 408,
|
1730 |
+
"earplug": 409,
|
1731 |
+
"earring": 410,
|
1732 |
+
"easel": 411,
|
1733 |
+
"eclair": 412,
|
1734 |
+
"edible_corn": 308,
|
1735 |
+
"eel": 413,
|
1736 |
+
"egg": 414,
|
1737 |
+
"egg_roll": 415,
|
1738 |
+
"egg_yolk": 416,
|
1739 |
+
"eggbeater": 417,
|
1740 |
+
"eggplant": 418,
|
1741 |
+
"electric_chair": 419,
|
1742 |
+
"elephant": 421,
|
1743 |
+
"elevator_car": 208,
|
1744 |
+
"elk": 422,
|
1745 |
+
"envelope": 423,
|
1746 |
+
"eraser": 424,
|
1747 |
+
"escargot": 425,
|
1748 |
+
"eyepatch": 426,
|
1749 |
+
"falcon": 427,
|
1750 |
+
"fan": 428,
|
1751 |
+
"faucet": 429,
|
1752 |
+
"fedora": 430,
|
1753 |
+
"ferret": 431,
|
1754 |
+
"ferry": 433,
|
1755 |
+
"fig_(fruit)": 434,
|
1756 |
+
"fighter_jet": 435,
|
1757 |
+
"figurine": 436,
|
1758 |
+
"file_(tool)": 438,
|
1759 |
+
"file_cabinet": 437,
|
1760 |
+
"fire_alarm": 439,
|
1761 |
+
"fire_engine": 440,
|
1762 |
+
"fire_extinguisher": 441,
|
1763 |
+
"fire_hose": 442,
|
1764 |
+
"fireplace": 443,
|
1765 |
+
"fireplug": 444,
|
1766 |
+
"first-aid_kit": 445,
|
1767 |
+
"fish": 446,
|
1768 |
+
"fish_(food)": 447,
|
1769 |
+
"fishbowl": 448,
|
1770 |
+
"fishing_rod": 449,
|
1771 |
+
"flag": 450,
|
1772 |
+
"flagpole": 451,
|
1773 |
+
"flamingo": 452,
|
1774 |
+
"flannel": 453,
|
1775 |
+
"flap": 454,
|
1776 |
+
"flash": 455,
|
1777 |
+
"flashlight": 456,
|
1778 |
+
"fleece": 457,
|
1779 |
+
"flip-flop_(sandal)": 458,
|
1780 |
+
"flipper_(footwear)": 459,
|
1781 |
+
"flower_arrangement": 460,
|
1782 |
+
"flowerpot": 836,
|
1783 |
+
"flute_glass": 461,
|
1784 |
+
"foal": 462,
|
1785 |
+
"folding_chair": 463,
|
1786 |
+
"food_processor": 464,
|
1787 |
+
"football_(American)": 465,
|
1788 |
+
"football_helmet": 466,
|
1789 |
+
"footstool": 467,
|
1790 |
+
"fork": 468,
|
1791 |
+
"forklift": 469,
|
1792 |
+
"freight_car": 470,
|
1793 |
+
"freshener": 472,
|
1794 |
+
"frisbee": 473,
|
1795 |
+
"frog": 474,
|
1796 |
+
"fruit_juice": 475,
|
1797 |
+
"frying_pan": 476,
|
1798 |
+
"fudge": 477,
|
1799 |
+
"fume_hood": 564,
|
1800 |
+
"funnel": 478,
|
1801 |
+
"futon": 479,
|
1802 |
+
"gag": 480,
|
1803 |
+
"gameboard": 116,
|
1804 |
+
"garbage": 481,
|
1805 |
+
"garbage_truck": 482,
|
1806 |
+
"garden_hose": 483,
|
1807 |
+
"gargle": 484,
|
1808 |
+
"gargoyle": 485,
|
1809 |
+
"garlic": 486,
|
1810 |
+
"gasmask": 487,
|
1811 |
+
"gazelle": 488,
|
1812 |
+
"gelatin": 489,
|
1813 |
+
"gemstone": 490,
|
1814 |
+
"generator": 491,
|
1815 |
+
"giant_panda": 492,
|
1816 |
+
"gift_wrap": 493,
|
1817 |
+
"ginger": 494,
|
1818 |
+
"giraffe": 495,
|
1819 |
+
"glass_(drink_container)": 497,
|
1820 |
+
"globe": 498,
|
1821 |
+
"glove": 499,
|
1822 |
+
"goat": 500,
|
1823 |
+
"goggles": 501,
|
1824 |
+
"goldfish": 502,
|
1825 |
+
"golf_club": 503,
|
1826 |
+
"golfcart": 504,
|
1827 |
+
"gondola_(boat)": 505,
|
1828 |
+
"goose": 506,
|
1829 |
+
"gorilla": 507,
|
1830 |
+
"gourd": 508,
|
1831 |
+
"grape": 509,
|
1832 |
+
"grater": 510,
|
1833 |
+
"gravestone": 511,
|
1834 |
+
"gravy_boat": 512,
|
1835 |
+
"green_bean": 513,
|
1836 |
+
"green_onion": 514,
|
1837 |
+
"griddle": 515,
|
1838 |
+
"grill": 516,
|
1839 |
+
"grits": 517,
|
1840 |
+
"grizzly": 518,
|
1841 |
+
"grocery_bag": 519,
|
1842 |
+
"guitar": 520,
|
1843 |
+
"gull": 521,
|
1844 |
+
"gun": 522,
|
1845 |
+
"hair_curler": 347,
|
1846 |
+
"hair_dryer": 533,
|
1847 |
+
"hairbrush": 523,
|
1848 |
+
"hairnet": 524,
|
1849 |
+
"hairpin": 525,
|
1850 |
+
"halter_top": 526,
|
1851 |
+
"ham": 527,
|
1852 |
+
"hamburger": 528,
|
1853 |
+
"hammer": 529,
|
1854 |
+
"hammock": 530,
|
1855 |
+
"hamper": 531,
|
1856 |
+
"hamster": 532,
|
1857 |
+
"hand_glass": 534,
|
1858 |
+
"hand_towel": 535,
|
1859 |
+
"handbag": 34,
|
1860 |
+
"handcart": 536,
|
1861 |
+
"handcuff": 537,
|
1862 |
+
"handkerchief": 538,
|
1863 |
+
"handle": 539,
|
1864 |
+
"handsaw": 540,
|
1865 |
+
"hardback_book": 541,
|
1866 |
+
"harmonium": 542,
|
1867 |
+
"hat": 543,
|
1868 |
+
"hatbox": 544,
|
1869 |
+
"headband": 546,
|
1870 |
+
"headboard": 547,
|
1871 |
+
"headlight": 548,
|
1872 |
+
"headscarf": 549,
|
1873 |
+
"headset": 550,
|
1874 |
+
"headstall_(for_horses)": 551,
|
1875 |
+
"heart": 552,
|
1876 |
+
"heater": 553,
|
1877 |
+
"helicopter": 554,
|
1878 |
+
"helmet": 555,
|
1879 |
+
"heron": 556,
|
1880 |
+
"highchair": 557,
|
1881 |
+
"hinge": 558,
|
1882 |
+
"hippopotamus": 559,
|
1883 |
+
"hockey_stick": 560,
|
1884 |
+
"hog": 561,
|
1885 |
+
"home_plate_(baseball)": 562,
|
1886 |
+
"honey": 563,
|
1887 |
+
"hook": 565,
|
1888 |
+
"hookah": 566,
|
1889 |
+
"hornet": 567,
|
1890 |
+
"horse": 568,
|
1891 |
+
"horse_buggy": 160,
|
1892 |
+
"horse_carriage": 215,
|
1893 |
+
"hose": 569,
|
1894 |
+
"hot-air_balloon": 570,
|
1895 |
+
"hot_sauce": 572,
|
1896 |
+
"hotplate": 571,
|
1897 |
+
"hourglass": 573,
|
1898 |
+
"houseboat": 574,
|
1899 |
+
"hummingbird": 575,
|
1900 |
+
"hummus": 576,
|
1901 |
+
"iPod": 585,
|
1902 |
+
"ice_maker": 580,
|
1903 |
+
"ice_pack": 581,
|
1904 |
+
"ice_skate": 582,
|
1905 |
+
"icecream": 578,
|
1906 |
+
"identity_card": 210,
|
1907 |
+
"igniter": 583,
|
1908 |
+
"inhaler": 584,
|
1909 |
+
"inkpad": 742,
|
1910 |
+
"iron_(for_clothing)": 586,
|
1911 |
+
"ironing_board": 587,
|
1912 |
+
"jacket": 588,
|
1913 |
+
"jam": 589,
|
1914 |
+
"jar": 590,
|
1915 |
+
"jean": 591,
|
1916 |
+
"jeep": 592,
|
1917 |
+
"jelly_bean": 593,
|
1918 |
+
"jersey": 594,
|
1919 |
+
"jet_plane": 595,
|
1920 |
+
"jewel": 596,
|
1921 |
+
"jewelry": 597,
|
1922 |
+
"joystick": 598,
|
1923 |
+
"jumpsuit": 599,
|
1924 |
+
"kayak": 600,
|
1925 |
+
"keg": 601,
|
1926 |
+
"kennel": 602,
|
1927 |
+
"kettle": 603,
|
1928 |
+
"key": 604,
|
1929 |
+
"keycard": 605,
|
1930 |
+
"kilt": 606,
|
1931 |
+
"kimono": 607,
|
1932 |
+
"kitchen_sink": 608,
|
1933 |
+
"kitchen_table": 609,
|
1934 |
+
"kite": 610,
|
1935 |
+
"kitten": 611,
|
1936 |
+
"kiwi_fruit": 612,
|
1937 |
+
"knee_pad": 613,
|
1938 |
+
"knife": 614,
|
1939 |
+
"knitting_needle": 615,
|
1940 |
+
"knob": 616,
|
1941 |
+
"knocker_(on_a_door)": 617,
|
1942 |
+
"koala": 618,
|
1943 |
+
"lab_coat": 619,
|
1944 |
+
"ladder": 620,
|
1945 |
+
"ladle": 621,
|
1946 |
+
"ladybug": 622,
|
1947 |
+
"lamb-chop": 624,
|
1948 |
+
"lamb_(animal)": 623,
|
1949 |
+
"lamp": 625,
|
1950 |
+
"lamppost": 626,
|
1951 |
+
"lampshade": 627,
|
1952 |
+
"lantern": 628,
|
1953 |
+
"lanyard": 629,
|
1954 |
+
"laptop_computer": 630,
|
1955 |
+
"lasagna": 631,
|
1956 |
+
"latch": 632,
|
1957 |
+
"lawn_mower": 633,
|
1958 |
+
"leather": 634,
|
1959 |
+
"legging_(clothing)": 635,
|
1960 |
+
"legume": 637,
|
1961 |
+
"lemon": 638,
|
1962 |
+
"lemonade": 639,
|
1963 |
+
"lettuce": 640,
|
1964 |
+
"license_plate": 641,
|
1965 |
+
"life_buoy": 642,
|
1966 |
+
"life_jacket": 643,
|
1967 |
+
"lightbulb": 644,
|
1968 |
+
"lightning_rod": 645,
|
1969 |
+
"lime": 646,
|
1970 |
+
"limousine": 647,
|
1971 |
+
"lion": 648,
|
1972 |
+
"lip_balm": 649,
|
1973 |
+
"liquor": 650,
|
1974 |
+
"lizard": 651,
|
1975 |
+
"locker": 181,
|
1976 |
+
"log": 652,
|
1977 |
+
"lollipop": 653,
|
1978 |
+
"loveseat": 655,
|
1979 |
+
"machine_gun": 656,
|
1980 |
+
"magazine": 657,
|
1981 |
+
"magnet": 658,
|
1982 |
+
"mail_slot": 659,
|
1983 |
+
"mailbox_(at_home)": 660,
|
1984 |
+
"mallard": 661,
|
1985 |
+
"mallet": 662,
|
1986 |
+
"mammoth": 663,
|
1987 |
+
"manatee": 664,
|
1988 |
+
"mandarin_orange": 665,
|
1989 |
+
"manger": 666,
|
1990 |
+
"manhole": 667,
|
1991 |
+
"map": 668,
|
1992 |
+
"marker": 669,
|
1993 |
+
"martini": 670,
|
1994 |
+
"mascot": 671,
|
1995 |
+
"mashed_potato": 672,
|
1996 |
+
"masher": 673,
|
1997 |
+
"mask": 674,
|
1998 |
+
"mast": 675,
|
1999 |
+
"mat_(gym_equipment)": 676,
|
2000 |
+
"matchbox": 677,
|
2001 |
+
"mattress": 678,
|
2002 |
+
"measuring_cup": 679,
|
2003 |
+
"measuring_stick": 680,
|
2004 |
+
"meatball": 681,
|
2005 |
+
"medicine": 682,
|
2006 |
+
"melon": 683,
|
2007 |
+
"microphone": 684,
|
2008 |
+
"microscope": 685,
|
2009 |
+
"microwave_oven": 686,
|
2010 |
+
"milestone": 687,
|
2011 |
+
"milk": 688,
|
2012 |
+
"milk_can": 689,
|
2013 |
+
"milkshake": 690,
|
2014 |
+
"minivan": 691,
|
2015 |
+
"mint_candy": 692,
|
2016 |
+
"mirror": 693,
|
2017 |
+
"mitten": 694,
|
2018 |
+
"mixer_(kitchen_tool)": 695,
|
2019 |
+
"money": 696,
|
2020 |
+
"monitor_(computer_equipment) computer_monitor": 697,
|
2021 |
+
"monkey": 698,
|
2022 |
+
"mop": 1038,
|
2023 |
+
"motor": 699,
|
2024 |
+
"motor_scooter": 700,
|
2025 |
+
"motor_vehicle": 701,
|
2026 |
+
"motorcycle": 702,
|
2027 |
+
"mound_(baseball)": 703,
|
2028 |
+
"mouse_(computer_equipment)": 704,
|
2029 |
+
"mousepad": 705,
|
2030 |
+
"muffin": 706,
|
2031 |
+
"mug": 707,
|
2032 |
+
"mushroom": 708,
|
2033 |
+
"music_stool": 709,
|
2034 |
+
"musical_instrument": 710,
|
2035 |
+
"nailfile": 711,
|
2036 |
+
"napkin": 712,
|
2037 |
+
"neckerchief": 713,
|
2038 |
+
"necklace": 714,
|
2039 |
+
"necktie": 715,
|
2040 |
+
"needle": 716,
|
2041 |
+
"nest": 717,
|
2042 |
+
"newspaper": 718,
|
2043 |
+
"newsstand": 719,
|
2044 |
+
"nightshirt": 720,
|
2045 |
+
"nosebag_(for_animals)": 721,
|
2046 |
+
"noseband_(for_animals)": 722,
|
2047 |
+
"notebook": 723,
|
2048 |
+
"notepad": 724,
|
2049 |
+
"nut": 725,
|
2050 |
+
"nutcracker": 726,
|
2051 |
+
"oar": 727,
|
2052 |
+
"octopus_(animal)": 729,
|
2053 |
+
"octopus_(food)": 728,
|
2054 |
+
"oil_lamp": 730,
|
2055 |
+
"olive_oil": 731,
|
2056 |
+
"omelet": 732,
|
2057 |
+
"onion": 733,
|
2058 |
+
"orange_(fruit)": 734,
|
2059 |
+
"orange_juice": 735,
|
2060 |
+
"ostrich": 736,
|
2061 |
+
"ottoman": 737,
|
2062 |
+
"oven": 738,
|
2063 |
+
"overalls_(clothing)": 739,
|
2064 |
+
"owl": 740,
|
2065 |
+
"pacifier": 292,
|
2066 |
+
"packet": 741,
|
2067 |
+
"pad": 743,
|
2068 |
+
"paddle": 744,
|
2069 |
+
"padlock": 745,
|
2070 |
+
"paintbrush": 746,
|
2071 |
+
"painting": 747,
|
2072 |
+
"pajamas": 748,
|
2073 |
+
"palette": 749,
|
2074 |
+
"pan_(for_cooking)": 750,
|
2075 |
+
"pan_(metal_container)": 751,
|
2076 |
+
"pancake": 752,
|
2077 |
+
"pantyhose": 753,
|
2078 |
+
"papaya": 754,
|
2079 |
+
"paper_plate": 755,
|
2080 |
+
"paper_towel": 756,
|
2081 |
+
"paperback_book": 757,
|
2082 |
+
"paperweight": 758,
|
2083 |
+
"parachute": 759,
|
2084 |
+
"parakeet": 760,
|
2085 |
+
"parasail_(sports)": 761,
|
2086 |
+
"parasol": 762,
|
2087 |
+
"parchment": 763,
|
2088 |
+
"parka": 764,
|
2089 |
+
"parking_meter": 765,
|
2090 |
+
"parrot": 766,
|
2091 |
+
"passenger_car_(part_of_a_train)": 767,
|
2092 |
+
"passenger_ship": 768,
|
2093 |
+
"passport": 769,
|
2094 |
+
"pastry": 770,
|
2095 |
+
"patty_(food)": 771,
|
2096 |
+
"pea_(food)": 772,
|
2097 |
+
"peach": 773,
|
2098 |
+
"peanut_butter": 774,
|
2099 |
+
"pear": 775,
|
2100 |
+
"peeler_(tool_for_fruit_and_vegetables)": 776,
|
2101 |
+
"pegboard": 778,
|
2102 |
+
"pelican": 779,
|
2103 |
+
"pen": 780,
|
2104 |
+
"pencil": 781,
|
2105 |
+
"pencil_box": 782,
|
2106 |
+
"pencil_sharpener": 783,
|
2107 |
+
"pendulum": 784,
|
2108 |
+
"penguin": 785,
|
2109 |
+
"pennant": 786,
|
2110 |
+
"penny_(coin)": 787,
|
2111 |
+
"pepper": 788,
|
2112 |
+
"pepper_mill": 789,
|
2113 |
+
"perfume": 790,
|
2114 |
+
"persimmon": 791,
|
2115 |
+
"person": 792,
|
2116 |
+
"pet": 793,
|
2117 |
+
"pew_(church_bench)": 794,
|
2118 |
+
"phonebook": 795,
|
2119 |
+
"phonograph_record": 796,
|
2120 |
+
"piano": 797,
|
2121 |
+
"pickle": 798,
|
2122 |
+
"pickup_truck": 799,
|
2123 |
+
"pie": 800,
|
2124 |
+
"pigeon": 801,
|
2125 |
+
"piggy_bank": 802,
|
2126 |
+
"pillow": 803,
|
2127 |
+
"pin_(non_jewelry)": 804,
|
2128 |
+
"pineapple": 805,
|
2129 |
+
"pinecone": 806,
|
2130 |
+
"ping-pong_ball": 807,
|
2131 |
+
"pinwheel": 808,
|
2132 |
+
"pipe": 810,
|
2133 |
+
"pipe_bowl": 139,
|
2134 |
+
"pirate_flag": 105,
|
2135 |
+
"pistol": 811,
|
2136 |
+
"pita_(bread)": 812,
|
2137 |
+
"pitcher_(vessel_for_liquid)": 813,
|
2138 |
+
"pitchfork": 814,
|
2139 |
+
"pizza": 815,
|
2140 |
+
"place_mat": 816,
|
2141 |
+
"plastic_bag": 897,
|
2142 |
+
"plate": 817,
|
2143 |
+
"platter": 818,
|
2144 |
+
"playpen": 819,
|
2145 |
+
"pliers": 820,
|
2146 |
+
"plow_(farm_equipment)": 821,
|
2147 |
+
"plume": 822,
|
2148 |
+
"pocket_watch": 823,
|
2149 |
+
"pocketknife": 824,
|
2150 |
+
"poker_(fire_stirring_tool)": 825,
|
2151 |
+
"poker_chip": 246,
|
2152 |
+
"polar_bear": 577,
|
2153 |
+
"pole": 826,
|
2154 |
+
"police_cruiser": 336,
|
2155 |
+
"polo_shirt": 827,
|
2156 |
+
"poncho": 828,
|
2157 |
+
"pony": 829,
|
2158 |
+
"pool_table": 830,
|
2159 |
+
"pop_(soda)": 831,
|
2160 |
+
"popsicle": 579,
|
2161 |
+
"postbox_(public)": 832,
|
2162 |
+
"postcard": 833,
|
2163 |
+
"poster": 834,
|
2164 |
+
"pot": 835,
|
2165 |
+
"potato": 837,
|
2166 |
+
"potholder": 838,
|
2167 |
+
"pottery": 839,
|
2168 |
+
"pouch": 840,
|
2169 |
+
"power_shovel": 841,
|
2170 |
+
"prawn": 842,
|
2171 |
+
"pretzel": 843,
|
2172 |
+
"printer": 844,
|
2173 |
+
"projectile_(weapon)": 845,
|
2174 |
+
"projector": 846,
|
2175 |
+
"propeller": 847,
|
2176 |
+
"prune": 848,
|
2177 |
+
"pudding": 849,
|
2178 |
+
"puffer_(fish)": 850,
|
2179 |
+
"puffin": 851,
|
2180 |
+
"pug-dog": 852,
|
2181 |
+
"pumpkin": 853,
|
2182 |
+
"puncher": 854,
|
2183 |
+
"puppet": 855,
|
2184 |
+
"puppy": 856,
|
2185 |
+
"quesadilla": 857,
|
2186 |
+
"quiche": 858,
|
2187 |
+
"quilt": 859,
|
2188 |
+
"rabbit": 860,
|
2189 |
+
"race_car": 861,
|
2190 |
+
"racket": 862,
|
2191 |
+
"radar": 863,
|
2192 |
+
"radiator": 864,
|
2193 |
+
"radio_receiver": 865,
|
2194 |
+
"radish": 866,
|
2195 |
+
"raft": 867,
|
2196 |
+
"rag_doll": 868,
|
2197 |
+
"railcar_(part_of_a_train)": 207,
|
2198 |
+
"raincoat": 869,
|
2199 |
+
"ram_(animal)": 870,
|
2200 |
+
"raspberry": 871,
|
2201 |
+
"rat": 872,
|
2202 |
+
"razorblade": 873,
|
2203 |
+
"reamer_(juicer)": 874,
|
2204 |
+
"rearview_mirror": 875,
|
2205 |
+
"receipt": 876,
|
2206 |
+
"recliner": 877,
|
2207 |
+
"record_player": 878,
|
2208 |
+
"reflector": 879,
|
2209 |
+
"refrigerator": 420,
|
2210 |
+
"remote_control": 880,
|
2211 |
+
"rhinoceros": 881,
|
2212 |
+
"rib_(food)": 882,
|
2213 |
+
"rifle": 883,
|
2214 |
+
"ring": 884,
|
2215 |
+
"river_boat": 885,
|
2216 |
+
"road_map": 886,
|
2217 |
+
"robe": 887,
|
2218 |
+
"rocking_chair": 888,
|
2219 |
+
"rodent": 889,
|
2220 |
+
"roller_skate": 890,
|
2221 |
+
"rolling_pin": 892,
|
2222 |
+
"root_beer": 893,
|
2223 |
+
"router_(computer_equipment)": 894,
|
2224 |
+
"rubber_band": 895,
|
2225 |
+
"runner_(carpet)": 896,
|
2226 |
+
"saddle_(on_an_animal)": 898,
|
2227 |
+
"saddle_blanket": 899,
|
2228 |
+
"saddlebag": 900,
|
2229 |
+
"safety_pin": 901,
|
2230 |
+
"sail": 902,
|
2231 |
+
"salad": 903,
|
2232 |
+
"salad_plate": 904,
|
2233 |
+
"salami": 905,
|
2234 |
+
"salmon_(fish)": 906,
|
2235 |
+
"salmon_(food)": 907,
|
2236 |
+
"salsa": 908,
|
2237 |
+
"saltshaker": 909,
|
2238 |
+
"sandal_(type_of_shoe)": 910,
|
2239 |
+
"sandwich": 911,
|
2240 |
+
"satchel": 912,
|
2241 |
+
"saucepan": 913,
|
2242 |
+
"saucer": 914,
|
2243 |
+
"sausage": 915,
|
2244 |
+
"sawhorse": 916,
|
2245 |
+
"saxophone": 917,
|
2246 |
+
"scale_(measuring_instrument)": 918,
|
2247 |
+
"scarecrow": 919,
|
2248 |
+
"scarf": 920,
|
2249 |
+
"school_bus": 921,
|
2250 |
+
"scissors": 922,
|
2251 |
+
"scoreboard": 923,
|
2252 |
+
"scraper": 924,
|
2253 |
+
"screwdriver": 925,
|
2254 |
+
"scrubbing_brush": 926,
|
2255 |
+
"sculpture": 927,
|
2256 |
+
"seabird": 928,
|
2257 |
+
"seahorse": 929,
|
2258 |
+
"seaplane": 930,
|
2259 |
+
"seashell": 931,
|
2260 |
+
"sewing_machine": 932,
|
2261 |
+
"shaker": 933,
|
2262 |
+
"shampoo": 934,
|
2263 |
+
"shark": 935,
|
2264 |
+
"sharpener": 936,
|
2265 |
+
"shaver_(electric)": 938,
|
2266 |
+
"shaving_cream": 939,
|
2267 |
+
"shawl": 940,
|
2268 |
+
"shears": 941,
|
2269 |
+
"sheep": 942,
|
2270 |
+
"shepherd_dog": 943,
|
2271 |
+
"sherbert": 944,
|
2272 |
+
"shield": 945,
|
2273 |
+
"shirt": 946,
|
2274 |
+
"shoe": 947,
|
2275 |
+
"shopping_bag": 948,
|
2276 |
+
"shopping_cart": 949,
|
2277 |
+
"short_pants": 950,
|
2278 |
+
"shot_glass": 951,
|
2279 |
+
"shoulder_bag": 952,
|
2280 |
+
"shovel": 953,
|
2281 |
+
"shower_cap": 955,
|
2282 |
+
"shower_curtain": 956,
|
2283 |
+
"shower_head": 954,
|
2284 |
+
"shredder_(for_paper)": 957,
|
2285 |
+
"signboard": 958,
|
2286 |
+
"silo": 959,
|
2287 |
+
"sink": 960,
|
2288 |
+
"skateboard": 961,
|
2289 |
+
"skewer": 962,
|
2290 |
+
"ski": 963,
|
2291 |
+
"ski_boot": 964,
|
2292 |
+
"ski_parka": 965,
|
2293 |
+
"ski_pole": 966,
|
2294 |
+
"skirt": 967,
|
2295 |
+
"skullcap": 968,
|
2296 |
+
"sled": 969,
|
2297 |
+
"sleeping_bag": 970,
|
2298 |
+
"slide": 255,
|
2299 |
+
"sling_(bandage)": 971,
|
2300 |
+
"slipper_(footwear)": 972,
|
2301 |
+
"smoothie": 973,
|
2302 |
+
"snake": 974,
|
2303 |
+
"snowboard": 975,
|
2304 |
+
"snowman": 976,
|
2305 |
+
"snowmobile": 977,
|
2306 |
+
"soap": 978,
|
2307 |
+
"soccer_ball": 979,
|
2308 |
+
"sock": 980,
|
2309 |
+
"sofa": 981,
|
2310 |
+
"sofa_bed": 300,
|
2311 |
+
"softball": 982,
|
2312 |
+
"solar_array": 983,
|
2313 |
+
"sombrero": 984,
|
2314 |
+
"soup": 985,
|
2315 |
+
"soup_bowl": 986,
|
2316 |
+
"soupspoon": 987,
|
2317 |
+
"sour_cream": 988,
|
2318 |
+
"soya_milk": 989,
|
2319 |
+
"space_shuttle": 990,
|
2320 |
+
"sparkler_(fireworks)": 991,
|
2321 |
+
"spatula": 992,
|
2322 |
+
"speaker_(stero_equipment)": 654,
|
2323 |
+
"spear": 993,
|
2324 |
+
"spectacles": 994,
|
2325 |
+
"spice_rack": 995,
|
2326 |
+
"spider": 996,
|
2327 |
+
"sponge": 998,
|
2328 |
+
"spoon": 999,
|
2329 |
+
"sportswear": 1000,
|
2330 |
+
"spotlight": 1001,
|
2331 |
+
"squid_(food)": 1002,
|
2332 |
+
"squirrel": 1003,
|
2333 |
+
"stagecoach": 1004,
|
2334 |
+
"stapler_(stapling_machine)": 1005,
|
2335 |
+
"starfish": 1006,
|
2336 |
+
"statue_(sculpture)": 1007,
|
2337 |
+
"steak_(food)": 1008,
|
2338 |
+
"steak_knife": 1009,
|
2339 |
+
"steering_wheel": 1010,
|
2340 |
+
"step_stool": 1012,
|
2341 |
+
"stepladder": 1011,
|
2342 |
+
"stereo_(sound_system)": 1013,
|
2343 |
+
"stew": 1014,
|
2344 |
+
"stirrer": 1015,
|
2345 |
+
"stirrup": 1016,
|
2346 |
+
"stool": 1017,
|
2347 |
+
"stop_sign": 1018,
|
2348 |
+
"stove": 1020,
|
2349 |
+
"strainer": 1021,
|
2350 |
+
"strap": 1022,
|
2351 |
+
"straw_(for_drinking)": 1023,
|
2352 |
+
"strawberry": 1024,
|
2353 |
+
"street_sign": 1025,
|
2354 |
+
"streetlight": 1026,
|
2355 |
+
"string_cheese": 1027,
|
2356 |
+
"stylus": 1028,
|
2357 |
+
"subwoofer": 1029,
|
2358 |
+
"sugar_bowl": 1030,
|
2359 |
+
"sugarcane_(plant)": 1031,
|
2360 |
+
"suit_(clothing)": 1032,
|
2361 |
+
"suitcase": 35,
|
2362 |
+
"sunflower": 1033,
|
2363 |
+
"sunglasses": 1034,
|
2364 |
+
"sunhat": 1035,
|
2365 |
+
"surfboard": 1036,
|
2366 |
+
"sushi": 1037,
|
2367 |
+
"suspenders": 144,
|
2368 |
+
"sweat_pants": 1039,
|
2369 |
+
"sweatband": 1040,
|
2370 |
+
"sweater": 1041,
|
2371 |
+
"sweatshirt": 1042,
|
2372 |
+
"sweet_potato": 1043,
|
2373 |
+
"swimsuit": 1044,
|
2374 |
+
"sword": 1045,
|
2375 |
+
"syringe": 1046,
|
2376 |
+
"table": 1049,
|
2377 |
+
"table-tennis_table": 1048,
|
2378 |
+
"table_lamp": 1050,
|
2379 |
+
"tablecloth": 1051,
|
2380 |
+
"tachometer": 1052,
|
2381 |
+
"taco": 1053,
|
2382 |
+
"tag": 1054,
|
2383 |
+
"taillight": 1055,
|
2384 |
+
"tambourine": 1056,
|
2385 |
+
"tank_(storage_vessel)": 1058,
|
2386 |
+
"tank_top_(clothing)": 1059,
|
2387 |
+
"tape_(sticky_cloth_or_paper)": 1060,
|
2388 |
+
"tape_measure": 1061,
|
2389 |
+
"tapestry": 1062,
|
2390 |
+
"tarp": 1063,
|
2391 |
+
"tartan": 1064,
|
2392 |
+
"tassel": 1065,
|
2393 |
+
"tea_bag": 1066,
|
2394 |
+
"teacup": 1067,
|
2395 |
+
"teakettle": 1068,
|
2396 |
+
"teapot": 1069,
|
2397 |
+
"teddy_bear": 1070,
|
2398 |
+
"telephone": 1071,
|
2399 |
+
"telephone_booth": 1072,
|
2400 |
+
"telephone_pole": 1073,
|
2401 |
+
"telephoto_lens": 1074,
|
2402 |
+
"television_camera": 1075,
|
2403 |
+
"television_set": 1076,
|
2404 |
+
"tennis_ball": 1077,
|
2405 |
+
"tennis_racket": 1078,
|
2406 |
+
"tequila": 1079,
|
2407 |
+
"thermometer": 1080,
|
2408 |
+
"thermos_bottle": 1081,
|
2409 |
+
"thermostat": 1082,
|
2410 |
+
"thimble": 1083,
|
2411 |
+
"thread": 1084,
|
2412 |
+
"thumbtack": 1085,
|
2413 |
+
"tiara": 1086,
|
2414 |
+
"tiger": 1087,
|
2415 |
+
"tights_(clothing)": 1088,
|
2416 |
+
"timer": 1089,
|
2417 |
+
"tinfoil": 1090,
|
2418 |
+
"tinsel": 1091,
|
2419 |
+
"tissue_paper": 1092,
|
2420 |
+
"toast_(food)": 1093,
|
2421 |
+
"toaster": 1094,
|
2422 |
+
"toaster_oven": 1095,
|
2423 |
+
"tobacco_pipe": 809,
|
2424 |
+
"toilet": 1096,
|
2425 |
+
"toilet_tissue": 1097,
|
2426 |
+
"tomato": 1098,
|
2427 |
+
"tongs": 1099,
|
2428 |
+
"toolbox": 1100,
|
2429 |
+
"toothbrush": 1101,
|
2430 |
+
"toothpaste": 1102,
|
2431 |
+
"toothpick": 1103,
|
2432 |
+
"tortilla": 1105,
|
2433 |
+
"tote_bag": 217,
|
2434 |
+
"tow_truck": 1106,
|
2435 |
+
"towel": 1107,
|
2436 |
+
"towel_rack": 1108,
|
2437 |
+
"toy": 1109,
|
2438 |
+
"tractor_(farm_equipment)": 1110,
|
2439 |
+
"traffic_light": 1111,
|
2440 |
+
"trailer_truck": 1113,
|
2441 |
+
"train_(railroad_vehicle)": 1114,
|
2442 |
+
"trampoline": 1115,
|
2443 |
+
"trash_can": 22,
|
2444 |
+
"tray": 1116,
|
2445 |
+
"trench_coat": 1117,
|
2446 |
+
"triangle_(musical_instrument)": 1118,
|
2447 |
+
"tricycle": 1119,
|
2448 |
+
"tripod": 1120,
|
2449 |
+
"trophy_cup": 344,
|
2450 |
+
"trousers": 1121,
|
2451 |
+
"truck": 1122,
|
2452 |
+
"truffle_(chocolate)": 1123,
|
2453 |
+
"trunk": 1124,
|
2454 |
+
"turban": 1126,
|
2455 |
+
"turkey_(food)": 1127,
|
2456 |
+
"turnip": 1128,
|
2457 |
+
"turtle": 1129,
|
2458 |
+
"turtleneck_(clothing)": 1130,
|
2459 |
+
"tux": 367,
|
2460 |
+
"typewriter": 1131,
|
2461 |
+
"umbrella": 1132,
|
2462 |
+
"underdrawers": 390,
|
2463 |
+
"underwear": 1133,
|
2464 |
+
"unicycle": 1134,
|
2465 |
+
"urinal": 1135,
|
2466 |
+
"urn": 1136,
|
2467 |
+
"vacuum_cleaner": 1137,
|
2468 |
+
"vase": 1138,
|
2469 |
+
"vat": 1125,
|
2470 |
+
"veil": 545,
|
2471 |
+
"vending_machine": 1139,
|
2472 |
+
"vent": 1140,
|
2473 |
+
"vest": 1141,
|
2474 |
+
"videotape": 1142,
|
2475 |
+
"vinegar": 1143,
|
2476 |
+
"violin": 1144,
|
2477 |
+
"visor": 94,
|
2478 |
+
"vodka": 1145,
|
2479 |
+
"volleyball": 1146,
|
2480 |
+
"vulture": 1147,
|
2481 |
+
"waffle": 1148,
|
2482 |
+
"waffle_iron": 1149,
|
2483 |
+
"wagon": 1150,
|
2484 |
+
"wagon_wheel": 1151,
|
2485 |
+
"walking_cane": 197,
|
2486 |
+
"walking_stick": 1152,
|
2487 |
+
"wall_clock": 1153,
|
2488 |
+
"wall_socket": 1154,
|
2489 |
+
"wallet": 1155,
|
2490 |
+
"walrus": 1156,
|
2491 |
+
"wardrobe": 1157,
|
2492 |
+
"washbasin": 1158,
|
2493 |
+
"watch": 1160,
|
2494 |
+
"water_bottle": 1161,
|
2495 |
+
"water_cooler": 1162,
|
2496 |
+
"water_faucet": 1163,
|
2497 |
+
"water_gun": 1166,
|
2498 |
+
"water_heater": 1164,
|
2499 |
+
"water_jug": 1165,
|
2500 |
+
"water_scooter": 1167,
|
2501 |
+
"water_ski": 1168,
|
2502 |
+
"water_tower": 1169,
|
2503 |
+
"watering_can": 1170,
|
2504 |
+
"watermelon": 1171,
|
2505 |
+
"weathervane": 1172,
|
2506 |
+
"webcam": 1173,
|
2507 |
+
"wedding_cake": 1174,
|
2508 |
+
"wedding_ring": 1175,
|
2509 |
+
"wet_suit": 1176,
|
2510 |
+
"wheel": 1177,
|
2511 |
+
"wheelchair": 1178,
|
2512 |
+
"whipped_cream": 1179,
|
2513 |
+
"whistle": 1180,
|
2514 |
+
"wig": 1181,
|
2515 |
+
"wind_chime": 1182,
|
2516 |
+
"windmill": 1183,
|
2517 |
+
"window_box_(for_plants)": 1184,
|
2518 |
+
"windshield_wiper": 1185,
|
2519 |
+
"windsock": 1186,
|
2520 |
+
"wine_bottle": 1187,
|
2521 |
+
"wine_bucket": 1188,
|
2522 |
+
"wineglass": 1189,
|
2523 |
+
"wok": 1191,
|
2524 |
+
"wolf": 1192,
|
2525 |
+
"wooden_leg": 777,
|
2526 |
+
"wooden_spoon": 1193,
|
2527 |
+
"wreath": 1194,
|
2528 |
+
"wrench": 1195,
|
2529 |
+
"wristband": 1196,
|
2530 |
+
"wristlet": 1197,
|
2531 |
+
"yacht": 1198,
|
2532 |
+
"yogurt": 1199,
|
2533 |
+
"yoke_(animal_equipment)": 1200,
|
2534 |
+
"zebra": 1201,
|
2535 |
+
"zucchini": 1202
|
2536 |
+
},
|
2537 |
+
"mask_loss_coefficient": 1,
|
2538 |
+
"max_position_embeddings": 1024,
|
2539 |
+
"model_type": "deformable_detr",
|
2540 |
+
"num_channels": 3,
|
2541 |
+
"num_feature_levels": 4,
|
2542 |
+
"num_queries": 300,
|
2543 |
+
"position_embedding_type": "sine",
|
2544 |
+
"torch_dtype": "float32",
|
2545 |
+
"transformers_version": null,
|
2546 |
+
"two_stage": true,
|
2547 |
+
"two_stage_num_proposals": 300,
|
2548 |
+
"use_pretrained_backbone": null,
|
2549 |
+
"use_timm_backbone": false,
|
2550 |
+
"with_box_refine": true
|
2551 |
+
}
|
models/deformable-detr-detic/model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a1a5695ef80c4f68a6221d85d5e7d0b1da93f460a8c7594ebd9337ec60f0d11d
|
3 |
+
size 173233132
|
models/deformable-detr-detic/preprocessor_config.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"do_normalize": true,
|
3 |
+
"do_pad": true,
|
4 |
+
"do_rescale": true,
|
5 |
+
"do_resize": true,
|
6 |
+
"format": "coco_detection",
|
7 |
+
"image_mean": [
|
8 |
+
0.485,
|
9 |
+
0.456,
|
10 |
+
0.406
|
11 |
+
],
|
12 |
+
"image_processor_type": "DeformableDetrImageProcessor",
|
13 |
+
"image_std": [
|
14 |
+
0.229,
|
15 |
+
0.224,
|
16 |
+
0.225
|
17 |
+
],
|
18 |
+
"resample": 2,
|
19 |
+
"rescale_factor": 0.00392156862745098,
|
20 |
+
"size": {
|
21 |
+
"longest_edge": 1333,
|
22 |
+
"shortest_edge": 800
|
23 |
+
}
|
24 |
+
}
|
models/deformable-detr-detic/pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:95c4baa499a5d6b2829007bb626c80553ec081110dfa328659f939f15db7edb0
|
3 |
+
size 173365669
|
models/yolov5/.dockerignore
ADDED
@@ -0,0 +1,222 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Repo-specific DockerIgnore -------------------------------------------------------------------------------------------
|
2 |
+
.git
|
3 |
+
.cache
|
4 |
+
.idea
|
5 |
+
runs
|
6 |
+
output
|
7 |
+
coco
|
8 |
+
storage.googleapis.com
|
9 |
+
|
10 |
+
data/samples/*
|
11 |
+
**/results*.csv
|
12 |
+
*.jpg
|
13 |
+
|
14 |
+
# Neural Network weights -----------------------------------------------------------------------------------------------
|
15 |
+
**/*.pt
|
16 |
+
**/*.pth
|
17 |
+
**/*.onnx
|
18 |
+
**/*.engine
|
19 |
+
**/*.mlmodel
|
20 |
+
**/*.torchscript
|
21 |
+
**/*.torchscript.pt
|
22 |
+
**/*.tflite
|
23 |
+
**/*.h5
|
24 |
+
**/*.pb
|
25 |
+
*_saved_model/
|
26 |
+
*_web_model/
|
27 |
+
*_openvino_model/
|
28 |
+
|
29 |
+
# Below Copied From .gitignore -----------------------------------------------------------------------------------------
|
30 |
+
# Below Copied From .gitignore -----------------------------------------------------------------------------------------
|
31 |
+
|
32 |
+
|
33 |
+
# GitHub Python GitIgnore ----------------------------------------------------------------------------------------------
|
34 |
+
# Byte-compiled / optimized / DLL files
|
35 |
+
__pycache__/
|
36 |
+
*.py[cod]
|
37 |
+
*$py.class
|
38 |
+
|
39 |
+
# C extensions
|
40 |
+
*.so
|
41 |
+
|
42 |
+
# Distribution / packaging
|
43 |
+
.Python
|
44 |
+
env/
|
45 |
+
build/
|
46 |
+
develop-eggs/
|
47 |
+
dist/
|
48 |
+
downloads/
|
49 |
+
eggs/
|
50 |
+
.eggs/
|
51 |
+
lib/
|
52 |
+
lib64/
|
53 |
+
parts/
|
54 |
+
sdist/
|
55 |
+
var/
|
56 |
+
wheels/
|
57 |
+
*.egg-info/
|
58 |
+
wandb/
|
59 |
+
.installed.cfg
|
60 |
+
*.egg
|
61 |
+
|
62 |
+
# PyInstaller
|
63 |
+
# Usually these files are written by a python script from a template
|
64 |
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
65 |
+
*.manifest
|
66 |
+
*.spec
|
67 |
+
|
68 |
+
# Installer logs
|
69 |
+
pip-log.txt
|
70 |
+
pip-delete-this-directory.txt
|
71 |
+
|
72 |
+
# Unit test / coverage reports
|
73 |
+
htmlcov/
|
74 |
+
.tox/
|
75 |
+
.coverage
|
76 |
+
.coverage.*
|
77 |
+
.cache
|
78 |
+
nosetests.xml
|
79 |
+
coverage.xml
|
80 |
+
*.cover
|
81 |
+
.hypothesis/
|
82 |
+
|
83 |
+
# Translations
|
84 |
+
*.mo
|
85 |
+
*.pot
|
86 |
+
|
87 |
+
# Django stuff:
|
88 |
+
*.log
|
89 |
+
local_settings.py
|
90 |
+
|
91 |
+
# Flask stuff:
|
92 |
+
instance/
|
93 |
+
.webassets-cache
|
94 |
+
|
95 |
+
# Scrapy stuff:
|
96 |
+
.scrapy
|
97 |
+
|
98 |
+
# Sphinx documentation
|
99 |
+
docs/_build/
|
100 |
+
|
101 |
+
# PyBuilder
|
102 |
+
target/
|
103 |
+
|
104 |
+
# Jupyter Notebook
|
105 |
+
.ipynb_checkpoints
|
106 |
+
|
107 |
+
# pyenv
|
108 |
+
.python-version
|
109 |
+
|
110 |
+
# celery beat schedule file
|
111 |
+
celerybeat-schedule
|
112 |
+
|
113 |
+
# SageMath parsed files
|
114 |
+
*.sage.py
|
115 |
+
|
116 |
+
# dotenv
|
117 |
+
.env
|
118 |
+
|
119 |
+
# virtualenv
|
120 |
+
.venv*
|
121 |
+
venv*/
|
122 |
+
ENV*/
|
123 |
+
|
124 |
+
# Spyder project settings
|
125 |
+
.spyderproject
|
126 |
+
.spyproject
|
127 |
+
|
128 |
+
# Rope project settings
|
129 |
+
.ropeproject
|
130 |
+
|
131 |
+
# mkdocs documentation
|
132 |
+
/site
|
133 |
+
|
134 |
+
# mypy
|
135 |
+
.mypy_cache/
|
136 |
+
|
137 |
+
|
138 |
+
# https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -----------------------------------------------
|
139 |
+
|
140 |
+
# General
|
141 |
+
.DS_Store
|
142 |
+
.AppleDouble
|
143 |
+
.LSOverride
|
144 |
+
|
145 |
+
# Icon must end with two \r
|
146 |
+
Icon
|
147 |
+
Icon?
|
148 |
+
|
149 |
+
# Thumbnails
|
150 |
+
._*
|
151 |
+
|
152 |
+
# Files that might appear in the root of a volume
|
153 |
+
.DocumentRevisions-V100
|
154 |
+
.fseventsd
|
155 |
+
.Spotlight-V100
|
156 |
+
.TemporaryItems
|
157 |
+
.Trashes
|
158 |
+
.VolumeIcon.icns
|
159 |
+
.com.apple.timemachine.donotpresent
|
160 |
+
|
161 |
+
# Directories potentially created on remote AFP share
|
162 |
+
.AppleDB
|
163 |
+
.AppleDesktop
|
164 |
+
Network Trash Folder
|
165 |
+
Temporary Items
|
166 |
+
.apdisk
|
167 |
+
|
168 |
+
|
169 |
+
# https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore
|
170 |
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
171 |
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
172 |
+
|
173 |
+
# User-specific stuff:
|
174 |
+
.idea/*
|
175 |
+
.idea/**/workspace.xml
|
176 |
+
.idea/**/tasks.xml
|
177 |
+
.idea/dictionaries
|
178 |
+
.html # Bokeh Plots
|
179 |
+
.pg # TensorFlow Frozen Graphs
|
180 |
+
.avi # videos
|
181 |
+
|
182 |
+
# Sensitive or high-churn files:
|
183 |
+
.idea/**/dataSources/
|
184 |
+
.idea/**/dataSources.ids
|
185 |
+
.idea/**/dataSources.local.xml
|
186 |
+
.idea/**/sqlDataSources.xml
|
187 |
+
.idea/**/dynamic.xml
|
188 |
+
.idea/**/uiDesigner.xml
|
189 |
+
|
190 |
+
# Gradle:
|
191 |
+
.idea/**/gradle.xml
|
192 |
+
.idea/**/libraries
|
193 |
+
|
194 |
+
# CMake
|
195 |
+
cmake-build-debug/
|
196 |
+
cmake-build-release/
|
197 |
+
|
198 |
+
# Mongo Explorer plugin:
|
199 |
+
.idea/**/mongoSettings.xml
|
200 |
+
|
201 |
+
## File-based project format:
|
202 |
+
*.iws
|
203 |
+
|
204 |
+
## Plugin-specific files:
|
205 |
+
|
206 |
+
# IntelliJ
|
207 |
+
out/
|
208 |
+
|
209 |
+
# mpeltonen/sbt-idea plugin
|
210 |
+
.idea_modules/
|
211 |
+
|
212 |
+
# JIRA plugin
|
213 |
+
atlassian-ide-plugin.xml
|
214 |
+
|
215 |
+
# Cursive Clojure plugin
|
216 |
+
.idea/replstate.xml
|
217 |
+
|
218 |
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
219 |
+
com_crashlytics_export_strings.xml
|
220 |
+
crashlytics.properties
|
221 |
+
crashlytics-build.properties
|
222 |
+
fabric.properties
|
models/yolov5/.gitattributes
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
# this drop notebooks from GitHub language stats
|
2 |
+
*.ipynb linguist-vendored
|
models/yolov5/.github/ISSUE_TEMPLATE/bug-report.yml
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: 🐛 Bug Report
|
2 |
+
# title: " "
|
3 |
+
description: Problems with YOLOv5
|
4 |
+
labels: [bug, triage]
|
5 |
+
body:
|
6 |
+
- type: markdown
|
7 |
+
attributes:
|
8 |
+
value: |
|
9 |
+
Thank you for submitting a YOLOv5 🐛 Bug Report!
|
10 |
+
|
11 |
+
- type: checkboxes
|
12 |
+
attributes:
|
13 |
+
label: Search before asking
|
14 |
+
description: >
|
15 |
+
Please search the [issues](https://github.com/ultralytics/yolov5/issues) to see if a similar bug report already exists.
|
16 |
+
options:
|
17 |
+
- label: >
|
18 |
+
I have searched the YOLOv5 [issues](https://github.com/ultralytics/yolov5/issues) and found no similar bug report.
|
19 |
+
required: true
|
20 |
+
|
21 |
+
- type: dropdown
|
22 |
+
attributes:
|
23 |
+
label: YOLOv5 Component
|
24 |
+
description: |
|
25 |
+
Please select the part of YOLOv5 where you found the bug.
|
26 |
+
multiple: true
|
27 |
+
options:
|
28 |
+
- "Training"
|
29 |
+
- "Validation"
|
30 |
+
- "Detection"
|
31 |
+
- "Export"
|
32 |
+
- "PyTorch Hub"
|
33 |
+
- "Multi-GPU"
|
34 |
+
- "Evolution"
|
35 |
+
- "Integrations"
|
36 |
+
- "Other"
|
37 |
+
validations:
|
38 |
+
required: false
|
39 |
+
|
40 |
+
- type: textarea
|
41 |
+
attributes:
|
42 |
+
label: Bug
|
43 |
+
description: Provide console output with error messages and/or screenshots of the bug.
|
44 |
+
placeholder: |
|
45 |
+
💡 ProTip! Include as much information as possible (screenshots, logs, tracebacks etc.) to receive the most helpful response.
|
46 |
+
validations:
|
47 |
+
required: true
|
48 |
+
|
49 |
+
- type: textarea
|
50 |
+
attributes:
|
51 |
+
label: Environment
|
52 |
+
description: Please specify the software and hardware you used to produce the bug.
|
53 |
+
placeholder: |
|
54 |
+
- YOLO: YOLOv5 🚀 v6.0-67-g60e42e1 torch 1.9.0+cu111 CUDA:0 (A100-SXM4-40GB, 40536MiB)
|
55 |
+
- OS: Ubuntu 20.04
|
56 |
+
- Python: 3.9.0
|
57 |
+
validations:
|
58 |
+
required: false
|
59 |
+
|
60 |
+
- type: textarea
|
61 |
+
attributes:
|
62 |
+
label: Minimal Reproducible Example
|
63 |
+
description: >
|
64 |
+
When asking a question, people will be better able to provide help if you provide code that they can easily understand and use to **reproduce** the problem.
|
65 |
+
This is referred to by community members as creating a [minimal reproducible example](https://docs.ultralytics.com/help/minimum_reproducible_example/).
|
66 |
+
placeholder: |
|
67 |
+
```
|
68 |
+
# Code to reproduce your issue here
|
69 |
+
```
|
70 |
+
validations:
|
71 |
+
required: false
|
72 |
+
|
73 |
+
- type: textarea
|
74 |
+
attributes:
|
75 |
+
label: Additional
|
76 |
+
description: Anything else you would like to share?
|
77 |
+
|
78 |
+
- type: checkboxes
|
79 |
+
attributes:
|
80 |
+
label: Are you willing to submit a PR?
|
81 |
+
description: >
|
82 |
+
(Optional) We encourage you to submit a [Pull Request](https://github.com/ultralytics/yolov5/pulls) (PR) to help improve YOLOv5 for everyone, especially if you have a good understanding of how to implement a fix or feature.
|
83 |
+
See the YOLOv5 [Contributing Guide](https://docs.ultralytics.com/help/contributing) to get started.
|
84 |
+
options:
|
85 |
+
- label: Yes I'd like to help by submitting a PR!
|
models/yolov5/.github/ISSUE_TEMPLATE/config.yml
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
blank_issues_enabled: true
|
2 |
+
contact_links:
|
3 |
+
- name: 📄 Docs
|
4 |
+
url: https://docs.ultralytics.com/yolov5
|
5 |
+
about: View Ultralytics YOLOv5 Docs
|
6 |
+
- name: 💬 Forum
|
7 |
+
url: https://community.ultralytics.com/
|
8 |
+
about: Ask on Ultralytics Community Forum
|
9 |
+
- name: 🎧 Discord
|
10 |
+
url: https://ultralytics.com/discord
|
11 |
+
about: Ask on Ultralytics Discord
|
models/yolov5/.github/ISSUE_TEMPLATE/feature-request.yml
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: 🚀 Feature Request
|
2 |
+
description: Suggest a YOLOv5 idea
|
3 |
+
# title: " "
|
4 |
+
labels: [enhancement]
|
5 |
+
body:
|
6 |
+
- type: markdown
|
7 |
+
attributes:
|
8 |
+
value: |
|
9 |
+
Thank you for submitting a YOLOv5 🚀 Feature Request!
|
10 |
+
|
11 |
+
- type: checkboxes
|
12 |
+
attributes:
|
13 |
+
label: Search before asking
|
14 |
+
description: >
|
15 |
+
Please search the [issues](https://github.com/ultralytics/yolov5/issues) to see if a similar feature request already exists.
|
16 |
+
options:
|
17 |
+
- label: >
|
18 |
+
I have searched the YOLOv5 [issues](https://github.com/ultralytics/yolov5/issues) and found no similar feature requests.
|
19 |
+
required: true
|
20 |
+
|
21 |
+
- type: textarea
|
22 |
+
attributes:
|
23 |
+
label: Description
|
24 |
+
description: A short description of your feature.
|
25 |
+
placeholder: |
|
26 |
+
What new feature would you like to see in YOLOv5?
|
27 |
+
validations:
|
28 |
+
required: true
|
29 |
+
|
30 |
+
- type: textarea
|
31 |
+
attributes:
|
32 |
+
label: Use case
|
33 |
+
description: |
|
34 |
+
Describe the use case of your feature request. It will help us understand and prioritize the feature request.
|
35 |
+
placeholder: |
|
36 |
+
How would this feature be used, and who would use it?
|
37 |
+
|
38 |
+
- type: textarea
|
39 |
+
attributes:
|
40 |
+
label: Additional
|
41 |
+
description: Anything else you would like to share?
|
42 |
+
|
43 |
+
- type: checkboxes
|
44 |
+
attributes:
|
45 |
+
label: Are you willing to submit a PR?
|
46 |
+
description: >
|
47 |
+
(Optional) We encourage you to submit a [Pull Request](https://github.com/ultralytics/yolov5/pulls) (PR) to help improve YOLOv5 for everyone, especially if you have a good understanding of how to implement a fix or feature.
|
48 |
+
See the YOLOv5 [Contributing Guide](https://docs.ultralytics.com/help/contributing) to get started.
|
49 |
+
options:
|
50 |
+
- label: Yes I'd like to help by submitting a PR!
|
models/yolov5/.github/ISSUE_TEMPLATE/question.yml
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: ❓ Question
|
2 |
+
description: Ask a YOLOv5 question
|
3 |
+
# title: " "
|
4 |
+
labels: [question]
|
5 |
+
body:
|
6 |
+
- type: markdown
|
7 |
+
attributes:
|
8 |
+
value: |
|
9 |
+
Thank you for asking a YOLOv5 ❓ Question!
|
10 |
+
|
11 |
+
- type: checkboxes
|
12 |
+
attributes:
|
13 |
+
label: Search before asking
|
14 |
+
description: >
|
15 |
+
Please search the [issues](https://github.com/ultralytics/yolov5/issues) and [discussions](https://github.com/ultralytics/yolov5/discussions) to see if a similar question already exists.
|
16 |
+
options:
|
17 |
+
- label: >
|
18 |
+
I have searched the YOLOv5 [issues](https://github.com/ultralytics/yolov5/issues) and [discussions](https://github.com/ultralytics/yolov5/discussions) and found no similar questions.
|
19 |
+
required: true
|
20 |
+
|
21 |
+
- type: textarea
|
22 |
+
attributes:
|
23 |
+
label: Question
|
24 |
+
description: What is your question?
|
25 |
+
placeholder: |
|
26 |
+
💡 ProTip! Include as much information as possible (screenshots, logs, tracebacks etc.) to receive the most helpful response.
|
27 |
+
validations:
|
28 |
+
required: true
|
29 |
+
|
30 |
+
- type: textarea
|
31 |
+
attributes:
|
32 |
+
label: Additional
|
33 |
+
description: Anything else you would like to share?
|
models/yolov5/.github/dependabot.yml
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
2 |
+
# Dependabot for package version updates
|
3 |
+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
4 |
+
|
5 |
+
version: 2
|
6 |
+
updates:
|
7 |
+
- package-ecosystem: pip
|
8 |
+
directory: "/"
|
9 |
+
schedule:
|
10 |
+
interval: weekly
|
11 |
+
time: "04:00"
|
12 |
+
open-pull-requests-limit: 10
|
13 |
+
reviewers:
|
14 |
+
- glenn-jocher
|
15 |
+
labels:
|
16 |
+
- dependencies
|
17 |
+
|
18 |
+
- package-ecosystem: github-actions
|
19 |
+
directory: "/.github/workflows"
|
20 |
+
schedule:
|
21 |
+
interval: weekly
|
22 |
+
time: "04:00"
|
23 |
+
open-pull-requests-limit: 5
|
24 |
+
reviewers:
|
25 |
+
- glenn-jocher
|
26 |
+
labels:
|
27 |
+
- dependencies
|
models/yolov5/.github/workflows/ci-testing.yml
ADDED
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
# YOLOv5 Continuous Integration (CI) GitHub Actions tests
|
3 |
+
|
4 |
+
name: YOLOv5 CI
|
5 |
+
|
6 |
+
on:
|
7 |
+
push:
|
8 |
+
branches: [master]
|
9 |
+
pull_request:
|
10 |
+
branches: [master]
|
11 |
+
schedule:
|
12 |
+
- cron: "0 0 * * *" # runs at 00:00 UTC every day
|
13 |
+
|
14 |
+
jobs:
|
15 |
+
Benchmarks:
|
16 |
+
runs-on: ${{ matrix.os }}
|
17 |
+
strategy:
|
18 |
+
fail-fast: false
|
19 |
+
matrix:
|
20 |
+
os: [ubuntu-latest]
|
21 |
+
python-version: ["3.11"] # requires python<=3.10
|
22 |
+
model: [yolov5n]
|
23 |
+
steps:
|
24 |
+
- uses: actions/checkout@v4
|
25 |
+
- uses: actions/setup-python@v5
|
26 |
+
with:
|
27 |
+
python-version: ${{ matrix.python-version }}
|
28 |
+
cache: "pip" # caching pip dependencies
|
29 |
+
- name: Install requirements
|
30 |
+
run: |
|
31 |
+
python -m pip install --upgrade pip wheel
|
32 |
+
pip install -r requirements.txt coremltools openvino-dev tensorflow-cpu --extra-index-url https://download.pytorch.org/whl/cpu
|
33 |
+
yolo checks
|
34 |
+
pip list
|
35 |
+
- name: Benchmark DetectionModel
|
36 |
+
run: |
|
37 |
+
python benchmarks.py --data coco128.yaml --weights ${{ matrix.model }}.pt --img 320 --hard-fail 0.29
|
38 |
+
- name: Benchmark SegmentationModel
|
39 |
+
run: |
|
40 |
+
python benchmarks.py --data coco128-seg.yaml --weights ${{ matrix.model }}-seg.pt --img 320 --hard-fail 0.22
|
41 |
+
- name: Test predictions
|
42 |
+
run: |
|
43 |
+
python export.py --weights ${{ matrix.model }}-cls.pt --include onnx --img 224
|
44 |
+
python detect.py --weights ${{ matrix.model }}.onnx --img 320
|
45 |
+
python segment/predict.py --weights ${{ matrix.model }}-seg.onnx --img 320
|
46 |
+
python classify/predict.py --weights ${{ matrix.model }}-cls.onnx --img 224
|
47 |
+
|
48 |
+
Tests:
|
49 |
+
timeout-minutes: 60
|
50 |
+
runs-on: ${{ matrix.os }}
|
51 |
+
strategy:
|
52 |
+
fail-fast: false
|
53 |
+
matrix:
|
54 |
+
os: [ubuntu-latest, windows-latest] # macos-latest bug https://github.com/ultralytics/yolov5/pull/9049
|
55 |
+
python-version: ["3.11"]
|
56 |
+
model: [yolov5n]
|
57 |
+
include:
|
58 |
+
- os: ubuntu-latest
|
59 |
+
python-version: "3.8" # '3.6.8' min
|
60 |
+
model: yolov5n
|
61 |
+
- os: ubuntu-latest
|
62 |
+
python-version: "3.9"
|
63 |
+
model: yolov5n
|
64 |
+
- os: ubuntu-latest
|
65 |
+
python-version: "3.8" # torch 1.8.0 requires python >=3.6, <=3.8
|
66 |
+
model: yolov5n
|
67 |
+
torch: "1.8.0" # min torch version CI https://pypi.org/project/torchvision/
|
68 |
+
steps:
|
69 |
+
- uses: actions/checkout@v4
|
70 |
+
- uses: actions/setup-python@v5
|
71 |
+
with:
|
72 |
+
python-version: ${{ matrix.python-version }}
|
73 |
+
cache: "pip" # caching pip dependencies
|
74 |
+
- name: Install requirements
|
75 |
+
run: |
|
76 |
+
python -m pip install --upgrade pip wheel
|
77 |
+
if [ "${{ matrix.torch }}" == "1.8.0" ]; then
|
78 |
+
pip install -r requirements.txt torch==1.8.0 torchvision==0.9.0 --extra-index-url https://download.pytorch.org/whl/cpu
|
79 |
+
else
|
80 |
+
pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu
|
81 |
+
fi
|
82 |
+
shell: bash # for Windows compatibility
|
83 |
+
- name: Check environment
|
84 |
+
run: |
|
85 |
+
yolo checks
|
86 |
+
pip list
|
87 |
+
- name: Test detection
|
88 |
+
shell: bash # for Windows compatibility
|
89 |
+
run: |
|
90 |
+
# export PYTHONPATH="$PWD" # to run '$ python *.py' files in subdirectories
|
91 |
+
m=${{ matrix.model }} # official weights
|
92 |
+
b=runs/train/exp/weights/best # best.pt checkpoint
|
93 |
+
python train.py --imgsz 64 --batch 32 --weights $m.pt --cfg $m.yaml --epochs 1 --device cpu # train
|
94 |
+
for d in cpu; do # devices
|
95 |
+
for w in $m $b; do # weights
|
96 |
+
python val.py --imgsz 64 --batch 32 --weights $w.pt --device $d # val
|
97 |
+
python detect.py --imgsz 64 --weights $w.pt --device $d # detect
|
98 |
+
done
|
99 |
+
done
|
100 |
+
python hubconf.py --model $m # hub
|
101 |
+
# python models/tf.py --weights $m.pt # build TF model
|
102 |
+
python models/yolo.py --cfg $m.yaml # build PyTorch model
|
103 |
+
python export.py --weights $m.pt --img 64 --include torchscript # export
|
104 |
+
python - <<EOF
|
105 |
+
import torch
|
106 |
+
im = torch.zeros([1, 3, 64, 64])
|
107 |
+
for path in '$m', '$b':
|
108 |
+
model = torch.hub.load('.', 'custom', path=path, source='local')
|
109 |
+
print(model('data/images/bus.jpg'))
|
110 |
+
model(im) # warmup, build grids for trace
|
111 |
+
torch.jit.trace(model, [im])
|
112 |
+
EOF
|
113 |
+
- name: Test segmentation
|
114 |
+
shell: bash # for Windows compatibility
|
115 |
+
run: |
|
116 |
+
m=${{ matrix.model }}-seg # official weights
|
117 |
+
b=runs/train-seg/exp/weights/best # best.pt checkpoint
|
118 |
+
python segment/train.py --imgsz 64 --batch 32 --weights $m.pt --cfg $m.yaml --epochs 1 --device cpu # train
|
119 |
+
python segment/train.py --imgsz 64 --batch 32 --weights '' --cfg $m.yaml --epochs 1 --device cpu # train
|
120 |
+
for d in cpu; do # devices
|
121 |
+
for w in $m $b; do # weights
|
122 |
+
python segment/val.py --imgsz 64 --batch 32 --weights $w.pt --device $d # val
|
123 |
+
python segment/predict.py --imgsz 64 --weights $w.pt --device $d # predict
|
124 |
+
python export.py --weights $w.pt --img 64 --include torchscript --device $d # export
|
125 |
+
done
|
126 |
+
done
|
127 |
+
- name: Test classification
|
128 |
+
shell: bash # for Windows compatibility
|
129 |
+
run: |
|
130 |
+
m=${{ matrix.model }}-cls.pt # official weights
|
131 |
+
b=runs/train-cls/exp/weights/best.pt # best.pt checkpoint
|
132 |
+
python classify/train.py --imgsz 32 --model $m --data mnist160 --epochs 1 # train
|
133 |
+
python classify/val.py --imgsz 32 --weights $b --data ../datasets/mnist160 # val
|
134 |
+
python classify/predict.py --imgsz 32 --weights $b --source ../datasets/mnist160/test/7/60.png # predict
|
135 |
+
python classify/predict.py --imgsz 32 --weights $m --source data/images/bus.jpg # predict
|
136 |
+
python export.py --weights $b --img 64 --include torchscript # export
|
137 |
+
python - <<EOF
|
138 |
+
import torch
|
139 |
+
for path in '$m', '$b':
|
140 |
+
model = torch.hub.load('.', 'custom', path=path, source='local')
|
141 |
+
EOF
|
142 |
+
|
143 |
+
Summary:
|
144 |
+
runs-on: ubuntu-latest
|
145 |
+
needs: [Benchmarks, Tests] # Add job names that you want to check for failure
|
146 |
+
if: always() # This ensures the job runs even if previous jobs fail
|
147 |
+
steps:
|
148 |
+
- name: Check for failure and notify
|
149 |
+
if: (needs.Benchmarks.result == 'failure' || needs.Tests.result == 'failure' || needs.Benchmarks.result == 'cancelled' || needs.Tests.result == 'cancelled') && github.repository == 'ultralytics/yolov5' && (github.event_name == 'schedule' || github.event_name == 'push')
|
150 |
+
uses: slackapi/slack-github-action@v1.25.0
|
151 |
+
with:
|
152 |
+
payload: |
|
153 |
+
{"text": "<!channel> GitHub Actions error for ${{ github.workflow }} ❌\n\n\n*Repository:* https://github.com/${{ github.repository }}\n*Action:* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Author:* ${{ github.actor }}\n*Event:* ${{ github.event_name }}\n"}
|
154 |
+
env:
|
155 |
+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_YOLO }}
|
models/yolov5/.github/workflows/codeql-analysis.yml
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# This action runs GitHub's industry-leading static analysis engine, CodeQL, against a repository's source code to find security vulnerabilities.
|
2 |
+
# https://github.com/github/codeql-action
|
3 |
+
|
4 |
+
name: "CodeQL"
|
5 |
+
|
6 |
+
on:
|
7 |
+
schedule:
|
8 |
+
- cron: "0 0 1 * *" # Runs at 00:00 UTC on the 1st of every month
|
9 |
+
workflow_dispatch:
|
10 |
+
|
11 |
+
jobs:
|
12 |
+
analyze:
|
13 |
+
name: Analyze
|
14 |
+
runs-on: ubuntu-latest
|
15 |
+
|
16 |
+
strategy:
|
17 |
+
fail-fast: false
|
18 |
+
matrix:
|
19 |
+
language: ["python"]
|
20 |
+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
21 |
+
# Learn more:
|
22 |
+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
23 |
+
|
24 |
+
steps:
|
25 |
+
- name: Checkout repository
|
26 |
+
uses: actions/checkout@v4
|
27 |
+
|
28 |
+
# Initializes the CodeQL tools for scanning.
|
29 |
+
- name: Initialize CodeQL
|
30 |
+
uses: github/codeql-action/init@v3
|
31 |
+
with:
|
32 |
+
languages: ${{ matrix.language }}
|
33 |
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
34 |
+
# By default, queries listed here will override any specified in a config file.
|
35 |
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
36 |
+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
37 |
+
|
38 |
+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
39 |
+
# If this step fails, then you should remove it and run the build manually (see below)
|
40 |
+
- name: Autobuild
|
41 |
+
uses: github/codeql-action/autobuild@v3
|
42 |
+
|
43 |
+
# ℹ️ Command-line programs to run using the OS shell.
|
44 |
+
# 📚 https://git.io/JvXDl
|
45 |
+
|
46 |
+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
47 |
+
# and modify them (or add more) to build your code if your project
|
48 |
+
# uses a compiled language
|
49 |
+
|
50 |
+
#- run: |
|
51 |
+
# make bootstrap
|
52 |
+
# make release
|
53 |
+
|
54 |
+
- name: Perform CodeQL Analysis
|
55 |
+
uses: github/codeql-action/analyze@v3
|
models/yolov5/.github/workflows/docker.yml
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
# Builds ultralytics/yolov5:latest images on DockerHub https://hub.docker.com/r/ultralytics/yolov5
|
3 |
+
|
4 |
+
name: Publish Docker Images
|
5 |
+
|
6 |
+
on:
|
7 |
+
push:
|
8 |
+
branches: [master]
|
9 |
+
workflow_dispatch:
|
10 |
+
|
11 |
+
jobs:
|
12 |
+
docker:
|
13 |
+
if: github.repository == 'ultralytics/yolov5'
|
14 |
+
name: Push Docker image to Docker Hub
|
15 |
+
runs-on: ubuntu-latest
|
16 |
+
steps:
|
17 |
+
- name: Checkout repo
|
18 |
+
uses: actions/checkout@v4
|
19 |
+
with:
|
20 |
+
fetch-depth: 0 # copy full .git directory to access full git history in Docker images
|
21 |
+
|
22 |
+
- name: Set up QEMU
|
23 |
+
uses: docker/setup-qemu-action@v3
|
24 |
+
|
25 |
+
- name: Set up Docker Buildx
|
26 |
+
uses: docker/setup-buildx-action@v3
|
27 |
+
|
28 |
+
- name: Login to Docker Hub
|
29 |
+
uses: docker/login-action@v3
|
30 |
+
with:
|
31 |
+
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
32 |
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
33 |
+
|
34 |
+
- name: Build and push arm64 image
|
35 |
+
uses: docker/build-push-action@v5
|
36 |
+
continue-on-error: true
|
37 |
+
with:
|
38 |
+
context: .
|
39 |
+
platforms: linux/arm64
|
40 |
+
file: utils/docker/Dockerfile-arm64
|
41 |
+
push: true
|
42 |
+
tags: ultralytics/yolov5:latest-arm64
|
43 |
+
|
44 |
+
- name: Build and push CPU image
|
45 |
+
uses: docker/build-push-action@v5
|
46 |
+
continue-on-error: true
|
47 |
+
with:
|
48 |
+
context: .
|
49 |
+
file: utils/docker/Dockerfile-cpu
|
50 |
+
push: true
|
51 |
+
tags: ultralytics/yolov5:latest-cpu
|
52 |
+
|
53 |
+
- name: Build and push GPU image
|
54 |
+
uses: docker/build-push-action@v5
|
55 |
+
continue-on-error: true
|
56 |
+
with:
|
57 |
+
context: .
|
58 |
+
file: utils/docker/Dockerfile
|
59 |
+
push: true
|
60 |
+
tags: ultralytics/yolov5:latest
|
models/yolov5/.github/workflows/format.yml
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Ultralytics 🚀 - AGPL-3.0 license
|
2 |
+
# Ultralytics Actions https://github.com/ultralytics/actions
|
3 |
+
# This workflow automatically formats code and documentation in PRs to official Ultralytics standards
|
4 |
+
|
5 |
+
name: Ultralytics Actions
|
6 |
+
|
7 |
+
on:
|
8 |
+
push:
|
9 |
+
branches: [main, master]
|
10 |
+
pull_request_target:
|
11 |
+
branches: [main, master]
|
12 |
+
|
13 |
+
jobs:
|
14 |
+
format:
|
15 |
+
runs-on: ubuntu-latest
|
16 |
+
steps:
|
17 |
+
- name: Run Ultralytics Formatting
|
18 |
+
uses: ultralytics/actions@main
|
19 |
+
with:
|
20 |
+
token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, do not modify
|
21 |
+
python: true # format Python code and docstrings
|
22 |
+
markdown: true # format Markdown and YAML
|
23 |
+
spelling: true # check spelling
|
24 |
+
links: false # check broken links
|
25 |
+
summary: true # print PR summary with GPT4 (requires 'openai_api_key' or 'openai_azure_api_key' and 'openai_azure_endpoint')
|
26 |
+
openai_azure_api_key: ${{ secrets.OPENAI_AZURE_API_KEY }}
|
27 |
+
openai_azure_endpoint: ${{ secrets.OPENAI_AZURE_ENDPOINT }}
|
models/yolov5/.github/workflows/greetings.yml
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
|
3 |
+
name: Greetings
|
4 |
+
|
5 |
+
on:
|
6 |
+
pull_request_target:
|
7 |
+
types: [opened]
|
8 |
+
issues:
|
9 |
+
types: [opened]
|
10 |
+
|
11 |
+
jobs:
|
12 |
+
greeting:
|
13 |
+
runs-on: ubuntu-latest
|
14 |
+
steps:
|
15 |
+
- uses: actions/first-interaction@v1
|
16 |
+
with:
|
17 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
18 |
+
pr-message: |
|
19 |
+
👋 Hello @${{ github.actor }}, thank you for submitting a YOLOv5 🚀 PR! To allow your work to be integrated as seamlessly as possible, we advise you to:
|
20 |
+
|
21 |
+
- ✅ Verify your PR is **up-to-date** with `ultralytics/yolov5` `master` branch. If your PR is behind you can update your code by clicking the 'Update branch' button or by running `git pull` and `git merge master` locally.
|
22 |
+
- ✅ Verify all YOLOv5 Continuous Integration (CI) **checks are passing**.
|
23 |
+
- ✅ Reduce changes to the absolute **minimum** required for your bug fix or feature addition. _"It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is."_ — Bruce Lee
|
24 |
+
|
25 |
+
issue-message: |
|
26 |
+
👋 Hello @${{ github.actor }}, thank you for your interest in YOLOv5 🚀! Please visit our ⭐️ [Tutorials](https://docs.ultralytics.com/yolov5/) to get started, where you can find quickstart guides for simple tasks like [Custom Data Training](https://docs.ultralytics.com/yolov5/tutorials/train_custom_data/) all the way to advanced concepts like [Hyperparameter Evolution](https://docs.ultralytics.com/yolov5/tutorials/hyperparameter_evolution/).
|
27 |
+
|
28 |
+
If this is a 🐛 Bug Report, please provide a **minimum reproducible example** to help us debug it.
|
29 |
+
|
30 |
+
If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our [Tips for Best Training Results](https://docs.ultralytics.com/yolov5/tutorials/tips_for_best_training_results/).
|
31 |
+
|
32 |
+
## Requirements
|
33 |
+
|
34 |
+
[**Python>=3.8.0**](https://www.python.org/) with all [requirements.txt](https://github.com/ultralytics/yolov5/blob/master/requirements.txt) installed including [**PyTorch>=1.8**](https://pytorch.org/get-started/locally/). To get started:
|
35 |
+
```bash
|
36 |
+
git clone https://github.com/ultralytics/yolov5 # clone
|
37 |
+
cd yolov5
|
38 |
+
pip install -r requirements.txt # install
|
39 |
+
```
|
40 |
+
|
41 |
+
## Environments
|
42 |
+
|
43 |
+
YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including [CUDA](https://developer.nvidia.com/cuda)/[CUDNN](https://developer.nvidia.com/cudnn), [Python](https://www.python.org/) and [PyTorch](https://pytorch.org/) preinstalled):
|
44 |
+
|
45 |
+
- **Notebooks** with free GPU: <a href="https://bit.ly/yolov5-paperspace-notebook"><img src="https://assets.paperspace.io/img/gradient-badge.svg" alt="Run on Gradient"></a> <a href="https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> <a href="https://www.kaggle.com/ultralytics/yolov5"><img src="https://kaggle.com/static/images/open-in-kaggle.svg" alt="Open In Kaggle"></a>
|
46 |
+
- **Google Cloud** Deep Learning VM. See [GCP Quickstart Guide](https://docs.ultralytics.com/yolov5/environments/google_cloud_quickstart_tutorial/)
|
47 |
+
- **Amazon** Deep Learning AMI. See [AWS Quickstart Guide](https://docs.ultralytics.com/yolov5/environments/aws_quickstart_tutorial/)
|
48 |
+
- **Docker Image**. See [Docker Quickstart Guide](https://docs.ultralytics.com/yolov5/environments/docker_image_quickstart_tutorial/) <a href="https://hub.docker.com/r/ultralytics/yolov5"><img src="https://img.shields.io/docker/pulls/ultralytics/yolov5?logo=docker" alt="Docker Pulls"></a>
|
49 |
+
|
50 |
+
## Status
|
51 |
+
|
52 |
+
<a href="https://github.com/ultralytics/yolov5/actions/workflows/ci-testing.yml"><img src="https://github.com/ultralytics/yolov5/actions/workflows/ci-testing.yml/badge.svg" alt="YOLOv5 CI"></a>
|
53 |
+
|
54 |
+
If this badge is green, all [YOLOv5 GitHub Actions](https://github.com/ultralytics/yolov5/actions) Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 [training](https://github.com/ultralytics/yolov5/blob/master/train.py), [validation](https://github.com/ultralytics/yolov5/blob/master/val.py), [inference](https://github.com/ultralytics/yolov5/blob/master/detect.py), [export](https://github.com/ultralytics/yolov5/blob/master/export.py) and [benchmarks](https://github.com/ultralytics/yolov5/blob/master/benchmarks.py) on macOS, Windows, and Ubuntu every 24 hours and on every commit.
|
55 |
+
|
56 |
+
## Introducing YOLOv8 🚀
|
57 |
+
|
58 |
+
We're excited to announce the launch of our latest state-of-the-art (SOTA) object detection model for 2023 - [YOLOv8](https://github.com/ultralytics/ultralytics) 🚀!
|
59 |
+
|
60 |
+
Designed to be fast, accurate, and easy to use, YOLOv8 is an ideal choice for a wide range of object detection, image segmentation and image classification tasks. With YOLOv8, you'll be able to quickly and accurately detect objects in real-time, streamline your workflows, and achieve new levels of accuracy in your projects.
|
61 |
+
|
62 |
+
Check out our [YOLOv8 Docs](https://docs.ultralytics.com/) for details and get started with:
|
63 |
+
```bash
|
64 |
+
pip install ultralytics
|
65 |
+
```
|
models/yolov5/.github/workflows/links.yml
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
2 |
+
# Continuous Integration (CI) GitHub Actions tests broken link checker using https://github.com/lycheeverse/lychee
|
3 |
+
# Ignores the following status codes to reduce false positives:
|
4 |
+
# - 403(OpenVINO, 'forbidden')
|
5 |
+
# - 429(Instagram, 'too many requests')
|
6 |
+
# - 500(Zenodo, 'cached')
|
7 |
+
# - 502(Zenodo, 'bad gateway')
|
8 |
+
# - 999(LinkedIn, 'unknown status code')
|
9 |
+
|
10 |
+
name: Check Broken links
|
11 |
+
|
12 |
+
on:
|
13 |
+
workflow_dispatch:
|
14 |
+
schedule:
|
15 |
+
- cron: "0 0 * * *" # runs at 00:00 UTC every day
|
16 |
+
|
17 |
+
jobs:
|
18 |
+
Links:
|
19 |
+
runs-on: ubuntu-latest
|
20 |
+
steps:
|
21 |
+
- uses: actions/checkout@v4
|
22 |
+
|
23 |
+
- name: Download and install lychee
|
24 |
+
run: |
|
25 |
+
LYCHEE_URL=$(curl -s https://api.github.com/repos/lycheeverse/lychee/releases/latest | grep "browser_download_url" | grep "x86_64-unknown-linux-gnu.tar.gz" | cut -d '"' -f 4)
|
26 |
+
curl -L $LYCHEE_URL -o lychee.tar.gz
|
27 |
+
tar xzf lychee.tar.gz
|
28 |
+
sudo mv lychee /usr/local/bin
|
29 |
+
|
30 |
+
- name: Test Markdown and HTML links with retry
|
31 |
+
uses: nick-invision/retry@v3
|
32 |
+
with:
|
33 |
+
timeout_minutes: 5
|
34 |
+
retry_wait_seconds: 60
|
35 |
+
max_attempts: 3
|
36 |
+
command: |
|
37 |
+
lychee \
|
38 |
+
--scheme 'https' \
|
39 |
+
--timeout 60 \
|
40 |
+
--insecure \
|
41 |
+
--accept 403,429,500,502,999 \
|
42 |
+
--exclude-all-private \
|
43 |
+
--exclude 'https?://(www\.)?(linkedin\.com|twitter\.com|instagram\.com|kaggle\.com|fonts\.gstatic\.com|url\.com)' \
|
44 |
+
--exclude-path '**/ci.yaml' \
|
45 |
+
--github-token ${{ secrets.GITHUB_TOKEN }} \
|
46 |
+
'./**/*.md' \
|
47 |
+
'./**/*.html'
|
48 |
+
|
49 |
+
- name: Test Markdown, HTML, YAML, Python and Notebook links with retry
|
50 |
+
if: github.event_name == 'workflow_dispatch'
|
51 |
+
uses: nick-invision/retry@v3
|
52 |
+
with:
|
53 |
+
timeout_minutes: 5
|
54 |
+
retry_wait_seconds: 60
|
55 |
+
max_attempts: 3
|
56 |
+
command: |
|
57 |
+
lychee \
|
58 |
+
--scheme 'https' \
|
59 |
+
--timeout 60 \
|
60 |
+
--insecure \
|
61 |
+
--accept 429,999 \
|
62 |
+
--exclude-all-private \
|
63 |
+
--exclude 'https?://(www\.)?(linkedin\.com|twitter\.com|instagram\.com|kaggle\.com|fonts\.gstatic\.com|url\.com)' \
|
64 |
+
--exclude-path '**/ci.yaml' \
|
65 |
+
--github-token ${{ secrets.GITHUB_TOKEN }} \
|
66 |
+
'./**/*.md' \
|
67 |
+
'./**/*.html' \
|
68 |
+
'./**/*.yml' \
|
69 |
+
'./**/*.yaml' \
|
70 |
+
'./**/*.py' \
|
71 |
+
'./**/*.ipynb'
|
models/yolov5/.github/workflows/stale.yml
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
|
3 |
+
name: Close stale issues
|
4 |
+
on:
|
5 |
+
schedule:
|
6 |
+
- cron: "0 0 * * *" # Runs at 00:00 UTC every day
|
7 |
+
|
8 |
+
jobs:
|
9 |
+
stale:
|
10 |
+
runs-on: ubuntu-latest
|
11 |
+
steps:
|
12 |
+
- uses: actions/stale@v9
|
13 |
+
with:
|
14 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
15 |
+
|
16 |
+
stale-issue-message: |
|
17 |
+
👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.
|
18 |
+
|
19 |
+
For additional resources and information, please see the links below:
|
20 |
+
|
21 |
+
- **Docs**: https://docs.ultralytics.com
|
22 |
+
- **HUB**: https://hub.ultralytics.com
|
23 |
+
- **Community**: https://community.ultralytics.com
|
24 |
+
|
25 |
+
Feel free to inform us of any other **issues** you discover or **feature requests** that come to mind in the future. Pull Requests (PRs) are also always welcomed!
|
26 |
+
|
27 |
+
Thank you for your contributions to YOLO 🚀 and Vision AI ⭐
|
28 |
+
|
29 |
+
stale-pr-message: |
|
30 |
+
👋 Hello there! We wanted to let you know that we've decided to close this pull request due to inactivity. We appreciate the effort you put into contributing to our project, but unfortunately, not all contributions are suitable or aligned with our product roadmap.
|
31 |
+
|
32 |
+
We hope you understand our decision, and please don't let it discourage you from contributing to open source projects in the future. We value all of our community members and their contributions, and we encourage you to keep exploring new projects and ways to get involved.
|
33 |
+
|
34 |
+
For additional resources and information, please see the links below:
|
35 |
+
|
36 |
+
- **Docs**: https://docs.ultralytics.com
|
37 |
+
- **HUB**: https://hub.ultralytics.com
|
38 |
+
- **Community**: https://community.ultralytics.com
|
39 |
+
|
40 |
+
Thank you for your contributions to YOLO 🚀 and Vision AI ⭐
|
41 |
+
|
42 |
+
days-before-issue-stale: 30
|
43 |
+
days-before-issue-close: 10
|
44 |
+
days-before-pr-stale: 90
|
45 |
+
days-before-pr-close: 30
|
46 |
+
exempt-issue-labels: "documentation,tutorial,TODO"
|
47 |
+
operations-per-run: 300 # The maximum number of operations per run, used to control rate limiting.
|
models/yolov5/.gitignore
ADDED
@@ -0,0 +1,257 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Repo-specific GitIgnore ----------------------------------------------------------------------------------------------
|
2 |
+
*.jpg
|
3 |
+
*.jpeg
|
4 |
+
*.png
|
5 |
+
*.bmp
|
6 |
+
*.tif
|
7 |
+
*.tiff
|
8 |
+
*.heic
|
9 |
+
*.JPG
|
10 |
+
*.JPEG
|
11 |
+
*.PNG
|
12 |
+
*.BMP
|
13 |
+
*.TIF
|
14 |
+
*.TIFF
|
15 |
+
*.HEIC
|
16 |
+
*.mp4
|
17 |
+
*.mov
|
18 |
+
*.MOV
|
19 |
+
*.avi
|
20 |
+
*.data
|
21 |
+
*.json
|
22 |
+
*.cfg
|
23 |
+
!setup.cfg
|
24 |
+
!cfg/yolov3*.cfg
|
25 |
+
|
26 |
+
storage.googleapis.com
|
27 |
+
runs/*
|
28 |
+
data/*
|
29 |
+
data/images/*
|
30 |
+
!data/*.yaml
|
31 |
+
!data/hyps
|
32 |
+
!data/scripts
|
33 |
+
!data/images
|
34 |
+
!data/images/zidane.jpg
|
35 |
+
!data/images/bus.jpg
|
36 |
+
!data/*.sh
|
37 |
+
|
38 |
+
results*.csv
|
39 |
+
|
40 |
+
# Datasets -------------------------------------------------------------------------------------------------------------
|
41 |
+
coco/
|
42 |
+
coco128/
|
43 |
+
VOC/
|
44 |
+
|
45 |
+
# MATLAB GitIgnore -----------------------------------------------------------------------------------------------------
|
46 |
+
*.m~
|
47 |
+
*.mat
|
48 |
+
!targets*.mat
|
49 |
+
|
50 |
+
# Neural Network weights -----------------------------------------------------------------------------------------------
|
51 |
+
*.weights
|
52 |
+
*.pt
|
53 |
+
*.pb
|
54 |
+
*.onnx
|
55 |
+
*.engine
|
56 |
+
*.mlmodel
|
57 |
+
*.torchscript
|
58 |
+
*.tflite
|
59 |
+
*.h5
|
60 |
+
*_saved_model/
|
61 |
+
*_web_model/
|
62 |
+
*_openvino_model/
|
63 |
+
*_paddle_model/
|
64 |
+
darknet53.conv.74
|
65 |
+
yolov3-tiny.conv.15
|
66 |
+
|
67 |
+
# GitHub Python GitIgnore ----------------------------------------------------------------------------------------------
|
68 |
+
# Byte-compiled / optimized / DLL files
|
69 |
+
__pycache__/
|
70 |
+
*.py[cod]
|
71 |
+
*$py.class
|
72 |
+
|
73 |
+
# C extensions
|
74 |
+
*.so
|
75 |
+
|
76 |
+
# Distribution / packaging
|
77 |
+
.Python
|
78 |
+
env/
|
79 |
+
build/
|
80 |
+
develop-eggs/
|
81 |
+
dist/
|
82 |
+
downloads/
|
83 |
+
eggs/
|
84 |
+
.eggs/
|
85 |
+
lib/
|
86 |
+
lib64/
|
87 |
+
parts/
|
88 |
+
sdist/
|
89 |
+
var/
|
90 |
+
wheels/
|
91 |
+
*.egg-info/
|
92 |
+
/wandb/
|
93 |
+
.installed.cfg
|
94 |
+
*.egg
|
95 |
+
|
96 |
+
|
97 |
+
# PyInstaller
|
98 |
+
# Usually these files are written by a python script from a template
|
99 |
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
100 |
+
*.manifest
|
101 |
+
*.spec
|
102 |
+
|
103 |
+
# Installer logs
|
104 |
+
pip-log.txt
|
105 |
+
pip-delete-this-directory.txt
|
106 |
+
|
107 |
+
# Unit test / coverage reports
|
108 |
+
htmlcov/
|
109 |
+
.tox/
|
110 |
+
.coverage
|
111 |
+
.coverage.*
|
112 |
+
.cache
|
113 |
+
nosetests.xml
|
114 |
+
coverage.xml
|
115 |
+
*.cover
|
116 |
+
.hypothesis/
|
117 |
+
|
118 |
+
# Translations
|
119 |
+
*.mo
|
120 |
+
*.pot
|
121 |
+
|
122 |
+
# Django stuff:
|
123 |
+
*.log
|
124 |
+
local_settings.py
|
125 |
+
|
126 |
+
# Flask stuff:
|
127 |
+
instance/
|
128 |
+
.webassets-cache
|
129 |
+
|
130 |
+
# Scrapy stuff:
|
131 |
+
.scrapy
|
132 |
+
|
133 |
+
# Sphinx documentation
|
134 |
+
docs/_build/
|
135 |
+
|
136 |
+
# PyBuilder
|
137 |
+
target/
|
138 |
+
|
139 |
+
# Jupyter Notebook
|
140 |
+
.ipynb_checkpoints
|
141 |
+
|
142 |
+
# pyenv
|
143 |
+
.python-version
|
144 |
+
|
145 |
+
# celery beat schedule file
|
146 |
+
celerybeat-schedule
|
147 |
+
|
148 |
+
# SageMath parsed files
|
149 |
+
*.sage.py
|
150 |
+
|
151 |
+
# dotenv
|
152 |
+
.env
|
153 |
+
|
154 |
+
# virtualenv
|
155 |
+
.venv*
|
156 |
+
venv*/
|
157 |
+
ENV*/
|
158 |
+
|
159 |
+
# Spyder project settings
|
160 |
+
.spyderproject
|
161 |
+
.spyproject
|
162 |
+
|
163 |
+
# Rope project settings
|
164 |
+
.ropeproject
|
165 |
+
|
166 |
+
# mkdocs documentation
|
167 |
+
/site
|
168 |
+
|
169 |
+
# mypy
|
170 |
+
.mypy_cache/
|
171 |
+
|
172 |
+
|
173 |
+
# https://github.com/github/gitignore/blob/master/Global/macOS.gitignore -----------------------------------------------
|
174 |
+
|
175 |
+
# General
|
176 |
+
.DS_Store
|
177 |
+
.AppleDouble
|
178 |
+
.LSOverride
|
179 |
+
|
180 |
+
# Icon must end with two \r
|
181 |
+
Icon
|
182 |
+
Icon?
|
183 |
+
|
184 |
+
# Thumbnails
|
185 |
+
._*
|
186 |
+
|
187 |
+
# Files that might appear in the root of a volume
|
188 |
+
.DocumentRevisions-V100
|
189 |
+
.fseventsd
|
190 |
+
.Spotlight-V100
|
191 |
+
.TemporaryItems
|
192 |
+
.Trashes
|
193 |
+
.VolumeIcon.icns
|
194 |
+
.com.apple.timemachine.donotpresent
|
195 |
+
|
196 |
+
# Directories potentially created on remote AFP share
|
197 |
+
.AppleDB
|
198 |
+
.AppleDesktop
|
199 |
+
Network Trash Folder
|
200 |
+
Temporary Items
|
201 |
+
.apdisk
|
202 |
+
|
203 |
+
|
204 |
+
# https://github.com/github/gitignore/blob/master/Global/JetBrains.gitignore
|
205 |
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
206 |
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
207 |
+
|
208 |
+
# User-specific stuff:
|
209 |
+
.idea/*
|
210 |
+
.idea/**/workspace.xml
|
211 |
+
.idea/**/tasks.xml
|
212 |
+
.idea/dictionaries
|
213 |
+
.html # Bokeh Plots
|
214 |
+
.pg # TensorFlow Frozen Graphs
|
215 |
+
.avi # videos
|
216 |
+
|
217 |
+
# Sensitive or high-churn files:
|
218 |
+
.idea/**/dataSources/
|
219 |
+
.idea/**/dataSources.ids
|
220 |
+
.idea/**/dataSources.local.xml
|
221 |
+
.idea/**/sqlDataSources.xml
|
222 |
+
.idea/**/dynamic.xml
|
223 |
+
.idea/**/uiDesigner.xml
|
224 |
+
|
225 |
+
# Gradle:
|
226 |
+
.idea/**/gradle.xml
|
227 |
+
.idea/**/libraries
|
228 |
+
|
229 |
+
# CMake
|
230 |
+
cmake-build-debug/
|
231 |
+
cmake-build-release/
|
232 |
+
|
233 |
+
# Mongo Explorer plugin:
|
234 |
+
.idea/**/mongoSettings.xml
|
235 |
+
|
236 |
+
## File-based project format:
|
237 |
+
*.iws
|
238 |
+
|
239 |
+
## Plugin-specific files:
|
240 |
+
|
241 |
+
# IntelliJ
|
242 |
+
out/
|
243 |
+
|
244 |
+
# mpeltonen/sbt-idea plugin
|
245 |
+
.idea_modules/
|
246 |
+
|
247 |
+
# JIRA plugin
|
248 |
+
atlassian-ide-plugin.xml
|
249 |
+
|
250 |
+
# Cursive Clojure plugin
|
251 |
+
.idea/replstate.xml
|
252 |
+
|
253 |
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
254 |
+
com_crashlytics_export_strings.xml
|
255 |
+
crashlytics.properties
|
256 |
+
crashlytics-build.properties
|
257 |
+
fabric.properties
|
models/yolov5/CITATION.cff
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
cff-version: 1.2.0
|
2 |
+
preferred-citation:
|
3 |
+
type: software
|
4 |
+
message: If you use YOLOv5, please cite it as below.
|
5 |
+
authors:
|
6 |
+
- family-names: Jocher
|
7 |
+
given-names: Glenn
|
8 |
+
orcid: "https://orcid.org/0000-0001-5950-6979"
|
9 |
+
title: "YOLOv5 by Ultralytics"
|
10 |
+
version: 7.0
|
11 |
+
doi: 10.5281/zenodo.3908559
|
12 |
+
date-released: 2020-5-29
|
13 |
+
license: AGPL-3.0
|
14 |
+
url: "https://github.com/ultralytics/yolov5"
|
models/yolov5/CONTRIBUTING.md
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
## Contributing to YOLOv5 🚀
|
2 |
+
|
3 |
+
We love your input! We want to make contributing to YOLOv5 as easy and transparent as possible, whether it's:
|
4 |
+
|
5 |
+
- Reporting a bug
|
6 |
+
- Discussing the current state of the code
|
7 |
+
- Submitting a fix
|
8 |
+
- Proposing a new feature
|
9 |
+
- Becoming a maintainer
|
10 |
+
|
11 |
+
YOLOv5 works so well due to our combined community effort, and for every small improvement you contribute you will be helping push the frontiers of what's possible in AI 😃!
|
12 |
+
|
13 |
+
## Submitting a Pull Request (PR) 🛠️
|
14 |
+
|
15 |
+
Submitting a PR is easy! This example shows how to submit a PR for updating `requirements.txt` in 4 steps:
|
16 |
+
|
17 |
+
### 1. Select File to Update
|
18 |
+
|
19 |
+
Select `requirements.txt` to update by clicking on it in GitHub.
|
20 |
+
|
21 |
+
<p align="center"><img width="800" alt="PR_step1" src="https://user-images.githubusercontent.com/26833433/122260847-08be2600-ced4-11eb-828b-8287ace4136c.png"></p>
|
22 |
+
|
23 |
+
### 2. Click 'Edit this file'
|
24 |
+
|
25 |
+
The button is in the top-right corner.
|
26 |
+
|
27 |
+
<p align="center"><img width="800" alt="PR_step2" src="https://user-images.githubusercontent.com/26833433/122260844-06f46280-ced4-11eb-9eec-b8a24be519ca.png"></p>
|
28 |
+
|
29 |
+
### 3. Make Changes
|
30 |
+
|
31 |
+
Change the `matplotlib` version from `3.2.2` to `3.3`.
|
32 |
+
|
33 |
+
<p align="center"><img width="800" alt="PR_step3" src="https://user-images.githubusercontent.com/26833433/122260853-0a87e980-ced4-11eb-9fd2-3650fb6e0842.png"></p>
|
34 |
+
|
35 |
+
### 4. Preview Changes and Submit PR
|
36 |
+
|
37 |
+
Click on the **Preview changes** tab to verify your updates. At the bottom of the screen select 'Create a **new branch** for this commit', assign your branch a descriptive name such as `fix/matplotlib_version` and click the green **Propose changes** button. All done, your PR is now submitted to YOLOv5 for review and approval 😃!
|
38 |
+
|
39 |
+
<p align="center"><img width="800" alt="PR_step4" src="https://user-images.githubusercontent.com/26833433/122260856-0b208000-ced4-11eb-8e8e-77b6151cbcc3.png"></p>
|
40 |
+
|
41 |
+
### PR recommendations
|
42 |
+
|
43 |
+
To allow your work to be integrated as seamlessly as possible, we advise you to:
|
44 |
+
|
45 |
+
- ✅ Verify your PR is **up-to-date** with `ultralytics/yolov5` `master` branch. If your PR is behind you can update your code by clicking the 'Update branch' button or by running `git pull` and `git merge master` locally.
|
46 |
+
|
47 |
+
<p align="center"><img width="751" alt="Screenshot 2022-08-29 at 22 47 15" src="https://user-images.githubusercontent.com/26833433/187295893-50ed9f44-b2c9-4138-a614-de69bd1753d7.png"></p>
|
48 |
+
|
49 |
+
- ✅ Verify all YOLOv5 Continuous Integration (CI) **checks are passing**.
|
50 |
+
|
51 |
+
<p align="center"><img width="751" alt="Screenshot 2022-08-29 at 22 47 03" src="https://user-images.githubusercontent.com/26833433/187296922-545c5498-f64a-4d8c-8300-5fa764360da6.png"></p>
|
52 |
+
|
53 |
+
- ✅ Reduce changes to the absolute **minimum** required for your bug fix or feature addition. _"It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is."_ — Bruce Lee
|
54 |
+
|
55 |
+
## Submitting a Bug Report 🐛
|
56 |
+
|
57 |
+
If you spot a problem with YOLOv5 please submit a Bug Report!
|
58 |
+
|
59 |
+
For us to start investigating a possible problem we need to be able to reproduce it ourselves first. We've created a few short guidelines below to help users provide what we need to get started.
|
60 |
+
|
61 |
+
When asking a question, people will be better able to provide help if you provide **code** that they can easily understand and use to **reproduce** the problem. This is referred to by community members as creating a [minimum reproducible example](https://docs.ultralytics.com/help/minimum_reproducible_example/). Your code that reproduces the problem should be:
|
62 |
+
|
63 |
+
- ✅ **Minimal** – Use as little code as possible that still produces the same problem
|
64 |
+
- ✅ **Complete** – Provide **all** parts someone else needs to reproduce your problem in the question itself
|
65 |
+
- ✅ **Reproducible** – Test the code you're about to provide to make sure it reproduces the problem
|
66 |
+
|
67 |
+
In addition to the above requirements, for [Ultralytics](https://ultralytics.com/) to provide assistance your code should be:
|
68 |
+
|
69 |
+
- ✅ **Current** – Verify that your code is up-to-date with the current GitHub [master](https://github.com/ultralytics/yolov5/tree/master), and if necessary `git pull` or `git clone` a new copy to ensure your problem has not already been resolved by previous commits.
|
70 |
+
- ✅ **Unmodified** – Your problem must be reproducible without any modifications to the codebase in this repository. [Ultralytics](https://ultralytics.com/) does not provide support for custom code ⚠️.
|
71 |
+
|
72 |
+
If you believe your problem meets all of the above criteria, please close this issue and raise a new one using the 🐛 **Bug Report** [template](https://github.com/ultralytics/yolov5/issues/new/choose) and provide a [minimum reproducible example](https://docs.ultralytics.com/help/minimum_reproducible_example/) to help us better understand and diagnose your problem.
|
73 |
+
|
74 |
+
## License
|
75 |
+
|
76 |
+
By contributing, you agree that your contributions will be licensed under the [AGPL-3.0 license](https://choosealicense.com/licenses/agpl-3.0/)
|
models/yolov5/LICENSE
ADDED
@@ -0,0 +1,661 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GNU AFFERO GENERAL PUBLIC LICENSE
|
2 |
+
Version 3, 19 November 2007
|
3 |
+
|
4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
6 |
+
of this license document, but changing it is not allowed.
|
7 |
+
|
8 |
+
Preamble
|
9 |
+
|
10 |
+
The GNU Affero General Public License is a free, copyleft license for
|
11 |
+
software and other kinds of works, specifically designed to ensure
|
12 |
+
cooperation with the community in the case of network server software.
|
13 |
+
|
14 |
+
The licenses for most software and other practical works are designed
|
15 |
+
to take away your freedom to share and change the works. By contrast,
|
16 |
+
our General Public Licenses are intended to guarantee your freedom to
|
17 |
+
share and change all versions of a program--to make sure it remains free
|
18 |
+
software for all its users.
|
19 |
+
|
20 |
+
When we speak of free software, we are referring to freedom, not
|
21 |
+
price. Our General Public Licenses are designed to make sure that you
|
22 |
+
have the freedom to distribute copies of free software (and charge for
|
23 |
+
them if you wish), that you receive source code or can get it if you
|
24 |
+
want it, that you can change the software or use pieces of it in new
|
25 |
+
free programs, and that you know you can do these things.
|
26 |
+
|
27 |
+
Developers that use our General Public Licenses protect your rights
|
28 |
+
with two steps: (1) assert copyright on the software, and (2) offer
|
29 |
+
you this License which gives you legal permission to copy, distribute
|
30 |
+
and/or modify the software.
|
31 |
+
|
32 |
+
A secondary benefit of defending all users' freedom is that
|
33 |
+
improvements made in alternate versions of the program, if they
|
34 |
+
receive widespread use, become available for other developers to
|
35 |
+
incorporate. Many developers of free software are heartened and
|
36 |
+
encouraged by the resulting cooperation. However, in the case of
|
37 |
+
software used on network servers, this result may fail to come about.
|
38 |
+
The GNU General Public License permits making a modified version and
|
39 |
+
letting the public access it on a server without ever releasing its
|
40 |
+
source code to the public.
|
41 |
+
|
42 |
+
The GNU Affero General Public License is designed specifically to
|
43 |
+
ensure that, in such cases, the modified source code becomes available
|
44 |
+
to the community. It requires the operator of a network server to
|
45 |
+
provide the source code of the modified version running there to the
|
46 |
+
users of that server. Therefore, public use of a modified version, on
|
47 |
+
a publicly accessible server, gives the public access to the source
|
48 |
+
code of the modified version.
|
49 |
+
|
50 |
+
An older license, called the Affero General Public License and
|
51 |
+
published by Affero, was designed to accomplish similar goals. This is
|
52 |
+
a different license, not a version of the Affero GPL, but Affero has
|
53 |
+
released a new version of the Affero GPL which permits relicensing under
|
54 |
+
this license.
|
55 |
+
|
56 |
+
The precise terms and conditions for copying, distribution and
|
57 |
+
modification follow.
|
58 |
+
|
59 |
+
TERMS AND CONDITIONS
|
60 |
+
|
61 |
+
0. Definitions.
|
62 |
+
|
63 |
+
"This License" refers to version 3 of the GNU Affero General Public License.
|
64 |
+
|
65 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
66 |
+
works, such as semiconductor masks.
|
67 |
+
|
68 |
+
"The Program" refers to any copyrightable work licensed under this
|
69 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
70 |
+
"recipients" may be individuals or organizations.
|
71 |
+
|
72 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
73 |
+
in a fashion requiring copyright permission, other than the making of an
|
74 |
+
exact copy. The resulting work is called a "modified version" of the
|
75 |
+
earlier work or a work "based on" the earlier work.
|
76 |
+
|
77 |
+
A "covered work" means either the unmodified Program or a work based
|
78 |
+
on the Program.
|
79 |
+
|
80 |
+
To "propagate" a work means to do anything with it that, without
|
81 |
+
permission, would make you directly or secondarily liable for
|
82 |
+
infringement under applicable copyright law, except executing it on a
|
83 |
+
computer or modifying a private copy. Propagation includes copying,
|
84 |
+
distribution (with or without modification), making available to the
|
85 |
+
public, and in some countries other activities as well.
|
86 |
+
|
87 |
+
To "convey" a work means any kind of propagation that enables other
|
88 |
+
parties to make or receive copies. Mere interaction with a user through
|
89 |
+
a computer network, with no transfer of a copy, is not conveying.
|
90 |
+
|
91 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
92 |
+
to the extent that it includes a convenient and prominently visible
|
93 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
94 |
+
tells the user that there is no warranty for the work (except to the
|
95 |
+
extent that warranties are provided), that licensees may convey the
|
96 |
+
work under this License, and how to view a copy of this License. If
|
97 |
+
the interface presents a list of user commands or options, such as a
|
98 |
+
menu, a prominent item in the list meets this criterion.
|
99 |
+
|
100 |
+
1. Source Code.
|
101 |
+
|
102 |
+
The "source code" for a work means the preferred form of the work
|
103 |
+
for making modifications to it. "Object code" means any non-source
|
104 |
+
form of a work.
|
105 |
+
|
106 |
+
A "Standard Interface" means an interface that either is an official
|
107 |
+
standard defined by a recognized standards body, or, in the case of
|
108 |
+
interfaces specified for a particular programming language, one that
|
109 |
+
is widely used among developers working in that language.
|
110 |
+
|
111 |
+
The "System Libraries" of an executable work include anything, other
|
112 |
+
than the work as a whole, that (a) is included in the normal form of
|
113 |
+
packaging a Major Component, but which is not part of that Major
|
114 |
+
Component, and (b) serves only to enable use of the work with that
|
115 |
+
Major Component, or to implement a Standard Interface for which an
|
116 |
+
implementation is available to the public in source code form. A
|
117 |
+
"Major Component", in this context, means a major essential component
|
118 |
+
(kernel, window system, and so on) of the specific operating system
|
119 |
+
(if any) on which the executable work runs, or a compiler used to
|
120 |
+
produce the work, or an object code interpreter used to run it.
|
121 |
+
|
122 |
+
The "Corresponding Source" for a work in object code form means all
|
123 |
+
the source code needed to generate, install, and (for an executable
|
124 |
+
work) run the object code and to modify the work, including scripts to
|
125 |
+
control those activities. However, it does not include the work's
|
126 |
+
System Libraries, or general-purpose tools or generally available free
|
127 |
+
programs which are used unmodified in performing those activities but
|
128 |
+
which are not part of the work. For example, Corresponding Source
|
129 |
+
includes interface definition files associated with source files for
|
130 |
+
the work, and the source code for shared libraries and dynamically
|
131 |
+
linked subprograms that the work is specifically designed to require,
|
132 |
+
such as by intimate data communication or control flow between those
|
133 |
+
subprograms and other parts of the work.
|
134 |
+
|
135 |
+
The Corresponding Source need not include anything that users
|
136 |
+
can regenerate automatically from other parts of the Corresponding
|
137 |
+
Source.
|
138 |
+
|
139 |
+
The Corresponding Source for a work in source code form is that
|
140 |
+
same work.
|
141 |
+
|
142 |
+
2. Basic Permissions.
|
143 |
+
|
144 |
+
All rights granted under this License are granted for the term of
|
145 |
+
copyright on the Program, and are irrevocable provided the stated
|
146 |
+
conditions are met. This License explicitly affirms your unlimited
|
147 |
+
permission to run the unmodified Program. The output from running a
|
148 |
+
covered work is covered by this License only if the output, given its
|
149 |
+
content, constitutes a covered work. This License acknowledges your
|
150 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
151 |
+
|
152 |
+
You may make, run and propagate covered works that you do not
|
153 |
+
convey, without conditions so long as your license otherwise remains
|
154 |
+
in force. You may convey covered works to others for the sole purpose
|
155 |
+
of having them make modifications exclusively for you, or provide you
|
156 |
+
with facilities for running those works, provided that you comply with
|
157 |
+
the terms of this License in conveying all material for which you do
|
158 |
+
not control copyright. Those thus making or running the covered works
|
159 |
+
for you must do so exclusively on your behalf, under your direction
|
160 |
+
and control, on terms that prohibit them from making any copies of
|
161 |
+
your copyrighted material outside their relationship with you.
|
162 |
+
|
163 |
+
Conveying under any other circumstances is permitted solely under
|
164 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
165 |
+
makes it unnecessary.
|
166 |
+
|
167 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
168 |
+
|
169 |
+
No covered work shall be deemed part of an effective technological
|
170 |
+
measure under any applicable law fulfilling obligations under article
|
171 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
172 |
+
similar laws prohibiting or restricting circumvention of such
|
173 |
+
measures.
|
174 |
+
|
175 |
+
When you convey a covered work, you waive any legal power to forbid
|
176 |
+
circumvention of technological measures to the extent such circumvention
|
177 |
+
is effected by exercising rights under this License with respect to
|
178 |
+
the covered work, and you disclaim any intention to limit operation or
|
179 |
+
modification of the work as a means of enforcing, against the work's
|
180 |
+
users, your or third parties' legal rights to forbid circumvention of
|
181 |
+
technological measures.
|
182 |
+
|
183 |
+
4. Conveying Verbatim Copies.
|
184 |
+
|
185 |
+
You may convey verbatim copies of the Program's source code as you
|
186 |
+
receive it, in any medium, provided that you conspicuously and
|
187 |
+
appropriately publish on each copy an appropriate copyright notice;
|
188 |
+
keep intact all notices stating that this License and any
|
189 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
190 |
+
keep intact all notices of the absence of any warranty; and give all
|
191 |
+
recipients a copy of this License along with the Program.
|
192 |
+
|
193 |
+
You may charge any price or no price for each copy that you convey,
|
194 |
+
and you may offer support or warranty protection for a fee.
|
195 |
+
|
196 |
+
5. Conveying Modified Source Versions.
|
197 |
+
|
198 |
+
You may convey a work based on the Program, or the modifications to
|
199 |
+
produce it from the Program, in the form of source code under the
|
200 |
+
terms of section 4, provided that you also meet all of these conditions:
|
201 |
+
|
202 |
+
a) The work must carry prominent notices stating that you modified
|
203 |
+
it, and giving a relevant date.
|
204 |
+
|
205 |
+
b) The work must carry prominent notices stating that it is
|
206 |
+
released under this License and any conditions added under section
|
207 |
+
7. This requirement modifies the requirement in section 4 to
|
208 |
+
"keep intact all notices".
|
209 |
+
|
210 |
+
c) You must license the entire work, as a whole, under this
|
211 |
+
License to anyone who comes into possession of a copy. This
|
212 |
+
License will therefore apply, along with any applicable section 7
|
213 |
+
additional terms, to the whole of the work, and all its parts,
|
214 |
+
regardless of how they are packaged. This License gives no
|
215 |
+
permission to license the work in any other way, but it does not
|
216 |
+
invalidate such permission if you have separately received it.
|
217 |
+
|
218 |
+
d) If the work has interactive user interfaces, each must display
|
219 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
220 |
+
interfaces that do not display Appropriate Legal Notices, your
|
221 |
+
work need not make them do so.
|
222 |
+
|
223 |
+
A compilation of a covered work with other separate and independent
|
224 |
+
works, which are not by their nature extensions of the covered work,
|
225 |
+
and which are not combined with it such as to form a larger program,
|
226 |
+
in or on a volume of a storage or distribution medium, is called an
|
227 |
+
"aggregate" if the compilation and its resulting copyright are not
|
228 |
+
used to limit the access or legal rights of the compilation's users
|
229 |
+
beyond what the individual works permit. Inclusion of a covered work
|
230 |
+
in an aggregate does not cause this License to apply to the other
|
231 |
+
parts of the aggregate.
|
232 |
+
|
233 |
+
6. Conveying Non-Source Forms.
|
234 |
+
|
235 |
+
You may convey a covered work in object code form under the terms
|
236 |
+
of sections 4 and 5, provided that you also convey the
|
237 |
+
machine-readable Corresponding Source under the terms of this License,
|
238 |
+
in one of these ways:
|
239 |
+
|
240 |
+
a) Convey the object code in, or embodied in, a physical product
|
241 |
+
(including a physical distribution medium), accompanied by the
|
242 |
+
Corresponding Source fixed on a durable physical medium
|
243 |
+
customarily used for software interchange.
|
244 |
+
|
245 |
+
b) Convey the object code in, or embodied in, a physical product
|
246 |
+
(including a physical distribution medium), accompanied by a
|
247 |
+
written offer, valid for at least three years and valid for as
|
248 |
+
long as you offer spare parts or customer support for that product
|
249 |
+
model, to give anyone who possesses the object code either (1) a
|
250 |
+
copy of the Corresponding Source for all the software in the
|
251 |
+
product that is covered by this License, on a durable physical
|
252 |
+
medium customarily used for software interchange, for a price no
|
253 |
+
more than your reasonable cost of physically performing this
|
254 |
+
conveying of source, or (2) access to copy the
|
255 |
+
Corresponding Source from a network server at no charge.
|
256 |
+
|
257 |
+
c) Convey individual copies of the object code with a copy of the
|
258 |
+
written offer to provide the Corresponding Source. This
|
259 |
+
alternative is allowed only occasionally and noncommercially, and
|
260 |
+
only if you received the object code with such an offer, in accord
|
261 |
+
with subsection 6b.
|
262 |
+
|
263 |
+
d) Convey the object code by offering access from a designated
|
264 |
+
place (gratis or for a charge), and offer equivalent access to the
|
265 |
+
Corresponding Source in the same way through the same place at no
|
266 |
+
further charge. You need not require recipients to copy the
|
267 |
+
Corresponding Source along with the object code. If the place to
|
268 |
+
copy the object code is a network server, the Corresponding Source
|
269 |
+
may be on a different server (operated by you or a third party)
|
270 |
+
that supports equivalent copying facilities, provided you maintain
|
271 |
+
clear directions next to the object code saying where to find the
|
272 |
+
Corresponding Source. Regardless of what server hosts the
|
273 |
+
Corresponding Source, you remain obligated to ensure that it is
|
274 |
+
available for as long as needed to satisfy these requirements.
|
275 |
+
|
276 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
277 |
+
you inform other peers where the object code and Corresponding
|
278 |
+
Source of the work are being offered to the general public at no
|
279 |
+
charge under subsection 6d.
|
280 |
+
|
281 |
+
A separable portion of the object code, whose source code is excluded
|
282 |
+
from the Corresponding Source as a System Library, need not be
|
283 |
+
included in conveying the object code work.
|
284 |
+
|
285 |
+
A "User Product" is either (1) a "consumer product", which means any
|
286 |
+
tangible personal property which is normally used for personal, family,
|
287 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
288 |
+
into a dwelling. In determining whether a product is a consumer product,
|
289 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
290 |
+
product received by a particular user, "normally used" refers to a
|
291 |
+
typical or common use of that class of product, regardless of the status
|
292 |
+
of the particular user or of the way in which the particular user
|
293 |
+
actually uses, or expects or is expected to use, the product. A product
|
294 |
+
is a consumer product regardless of whether the product has substantial
|
295 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
296 |
+
the only significant mode of use of the product.
|
297 |
+
|
298 |
+
"Installation Information" for a User Product means any methods,
|
299 |
+
procedures, authorization keys, or other information required to install
|
300 |
+
and execute modified versions of a covered work in that User Product from
|
301 |
+
a modified version of its Corresponding Source. The information must
|
302 |
+
suffice to ensure that the continued functioning of the modified object
|
303 |
+
code is in no case prevented or interfered with solely because
|
304 |
+
modification has been made.
|
305 |
+
|
306 |
+
If you convey an object code work under this section in, or with, or
|
307 |
+
specifically for use in, a User Product, and the conveying occurs as
|
308 |
+
part of a transaction in which the right of possession and use of the
|
309 |
+
User Product is transferred to the recipient in perpetuity or for a
|
310 |
+
fixed term (regardless of how the transaction is characterized), the
|
311 |
+
Corresponding Source conveyed under this section must be accompanied
|
312 |
+
by the Installation Information. But this requirement does not apply
|
313 |
+
if neither you nor any third party retains the ability to install
|
314 |
+
modified object code on the User Product (for example, the work has
|
315 |
+
been installed in ROM).
|
316 |
+
|
317 |
+
The requirement to provide Installation Information does not include a
|
318 |
+
requirement to continue to provide support service, warranty, or updates
|
319 |
+
for a work that has been modified or installed by the recipient, or for
|
320 |
+
the User Product in which it has been modified or installed. Access to a
|
321 |
+
network may be denied when the modification itself materially and
|
322 |
+
adversely affects the operation of the network or violates the rules and
|
323 |
+
protocols for communication across the network.
|
324 |
+
|
325 |
+
Corresponding Source conveyed, and Installation Information provided,
|
326 |
+
in accord with this section must be in a format that is publicly
|
327 |
+
documented (and with an implementation available to the public in
|
328 |
+
source code form), and must require no special password or key for
|
329 |
+
unpacking, reading or copying.
|
330 |
+
|
331 |
+
7. Additional Terms.
|
332 |
+
|
333 |
+
"Additional permissions" are terms that supplement the terms of this
|
334 |
+
License by making exceptions from one or more of its conditions.
|
335 |
+
Additional permissions that are applicable to the entire Program shall
|
336 |
+
be treated as though they were included in this License, to the extent
|
337 |
+
that they are valid under applicable law. If additional permissions
|
338 |
+
apply only to part of the Program, that part may be used separately
|
339 |
+
under those permissions, but the entire Program remains governed by
|
340 |
+
this License without regard to the additional permissions.
|
341 |
+
|
342 |
+
When you convey a copy of a covered work, you may at your option
|
343 |
+
remove any additional permissions from that copy, or from any part of
|
344 |
+
it. (Additional permissions may be written to require their own
|
345 |
+
removal in certain cases when you modify the work.) You may place
|
346 |
+
additional permissions on material, added by you to a covered work,
|
347 |
+
for which you have or can give appropriate copyright permission.
|
348 |
+
|
349 |
+
Notwithstanding any other provision of this License, for material you
|
350 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
351 |
+
that material) supplement the terms of this License with terms:
|
352 |
+
|
353 |
+
a) Disclaiming warranty or limiting liability differently from the
|
354 |
+
terms of sections 15 and 16 of this License; or
|
355 |
+
|
356 |
+
b) Requiring preservation of specified reasonable legal notices or
|
357 |
+
author attributions in that material or in the Appropriate Legal
|
358 |
+
Notices displayed by works containing it; or
|
359 |
+
|
360 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
361 |
+
requiring that modified versions of such material be marked in
|
362 |
+
reasonable ways as different from the original version; or
|
363 |
+
|
364 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
365 |
+
authors of the material; or
|
366 |
+
|
367 |
+
e) Declining to grant rights under trademark law for use of some
|
368 |
+
trade names, trademarks, or service marks; or
|
369 |
+
|
370 |
+
f) Requiring indemnification of licensors and authors of that
|
371 |
+
material by anyone who conveys the material (or modified versions of
|
372 |
+
it) with contractual assumptions of liability to the recipient, for
|
373 |
+
any liability that these contractual assumptions directly impose on
|
374 |
+
those licensors and authors.
|
375 |
+
|
376 |
+
All other non-permissive additional terms are considered "further
|
377 |
+
restrictions" within the meaning of section 10. If the Program as you
|
378 |
+
received it, or any part of it, contains a notice stating that it is
|
379 |
+
governed by this License along with a term that is a further
|
380 |
+
restriction, you may remove that term. If a license document contains
|
381 |
+
a further restriction but permits relicensing or conveying under this
|
382 |
+
License, you may add to a covered work material governed by the terms
|
383 |
+
of that license document, provided that the further restriction does
|
384 |
+
not survive such relicensing or conveying.
|
385 |
+
|
386 |
+
If you add terms to a covered work in accord with this section, you
|
387 |
+
must place, in the relevant source files, a statement of the
|
388 |
+
additional terms that apply to those files, or a notice indicating
|
389 |
+
where to find the applicable terms.
|
390 |
+
|
391 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
392 |
+
form of a separately written license, or stated as exceptions;
|
393 |
+
the above requirements apply either way.
|
394 |
+
|
395 |
+
8. Termination.
|
396 |
+
|
397 |
+
You may not propagate or modify a covered work except as expressly
|
398 |
+
provided under this License. Any attempt otherwise to propagate or
|
399 |
+
modify it is void, and will automatically terminate your rights under
|
400 |
+
this License (including any patent licenses granted under the third
|
401 |
+
paragraph of section 11).
|
402 |
+
|
403 |
+
However, if you cease all violation of this License, then your
|
404 |
+
license from a particular copyright holder is reinstated (a)
|
405 |
+
provisionally, unless and until the copyright holder explicitly and
|
406 |
+
finally terminates your license, and (b) permanently, if the copyright
|
407 |
+
holder fails to notify you of the violation by some reasonable means
|
408 |
+
prior to 60 days after the cessation.
|
409 |
+
|
410 |
+
Moreover, your license from a particular copyright holder is
|
411 |
+
reinstated permanently if the copyright holder notifies you of the
|
412 |
+
violation by some reasonable means, this is the first time you have
|
413 |
+
received notice of violation of this License (for any work) from that
|
414 |
+
copyright holder, and you cure the violation prior to 30 days after
|
415 |
+
your receipt of the notice.
|
416 |
+
|
417 |
+
Termination of your rights under this section does not terminate the
|
418 |
+
licenses of parties who have received copies or rights from you under
|
419 |
+
this License. If your rights have been terminated and not permanently
|
420 |
+
reinstated, you do not qualify to receive new licenses for the same
|
421 |
+
material under section 10.
|
422 |
+
|
423 |
+
9. Acceptance Not Required for Having Copies.
|
424 |
+
|
425 |
+
You are not required to accept this License in order to receive or
|
426 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
427 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
428 |
+
to receive a copy likewise does not require acceptance. However,
|
429 |
+
nothing other than this License grants you permission to propagate or
|
430 |
+
modify any covered work. These actions infringe copyright if you do
|
431 |
+
not accept this License. Therefore, by modifying or propagating a
|
432 |
+
covered work, you indicate your acceptance of this License to do so.
|
433 |
+
|
434 |
+
10. Automatic Licensing of Downstream Recipients.
|
435 |
+
|
436 |
+
Each time you convey a covered work, the recipient automatically
|
437 |
+
receives a license from the original licensors, to run, modify and
|
438 |
+
propagate that work, subject to this License. You are not responsible
|
439 |
+
for enforcing compliance by third parties with this License.
|
440 |
+
|
441 |
+
An "entity transaction" is a transaction transferring control of an
|
442 |
+
organization, or substantially all assets of one, or subdividing an
|
443 |
+
organization, or merging organizations. If propagation of a covered
|
444 |
+
work results from an entity transaction, each party to that
|
445 |
+
transaction who receives a copy of the work also receives whatever
|
446 |
+
licenses to the work the party's predecessor in interest had or could
|
447 |
+
give under the previous paragraph, plus a right to possession of the
|
448 |
+
Corresponding Source of the work from the predecessor in interest, if
|
449 |
+
the predecessor has it or can get it with reasonable efforts.
|
450 |
+
|
451 |
+
You may not impose any further restrictions on the exercise of the
|
452 |
+
rights granted or affirmed under this License. For example, you may
|
453 |
+
not impose a license fee, royalty, or other charge for exercise of
|
454 |
+
rights granted under this License, and you may not initiate litigation
|
455 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
456 |
+
any patent claim is infringed by making, using, selling, offering for
|
457 |
+
sale, or importing the Program or any portion of it.
|
458 |
+
|
459 |
+
11. Patents.
|
460 |
+
|
461 |
+
A "contributor" is a copyright holder who authorizes use under this
|
462 |
+
License of the Program or a work on which the Program is based. The
|
463 |
+
work thus licensed is called the contributor's "contributor version".
|
464 |
+
|
465 |
+
A contributor's "essential patent claims" are all patent claims
|
466 |
+
owned or controlled by the contributor, whether already acquired or
|
467 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
468 |
+
by this License, of making, using, or selling its contributor version,
|
469 |
+
but do not include claims that would be infringed only as a
|
470 |
+
consequence of further modification of the contributor version. For
|
471 |
+
purposes of this definition, "control" includes the right to grant
|
472 |
+
patent sublicenses in a manner consistent with the requirements of
|
473 |
+
this License.
|
474 |
+
|
475 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
476 |
+
patent license under the contributor's essential patent claims, to
|
477 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
478 |
+
propagate the contents of its contributor version.
|
479 |
+
|
480 |
+
In the following three paragraphs, a "patent license" is any express
|
481 |
+
agreement or commitment, however denominated, not to enforce a patent
|
482 |
+
(such as an express permission to practice a patent or covenant not to
|
483 |
+
sue for patent infringement). To "grant" such a patent license to a
|
484 |
+
party means to make such an agreement or commitment not to enforce a
|
485 |
+
patent against the party.
|
486 |
+
|
487 |
+
If you convey a covered work, knowingly relying on a patent license,
|
488 |
+
and the Corresponding Source of the work is not available for anyone
|
489 |
+
to copy, free of charge and under the terms of this License, through a
|
490 |
+
publicly available network server or other readily accessible means,
|
491 |
+
then you must either (1) cause the Corresponding Source to be so
|
492 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
493 |
+
patent license for this particular work, or (3) arrange, in a manner
|
494 |
+
consistent with the requirements of this License, to extend the patent
|
495 |
+
license to downstream recipients. "Knowingly relying" means you have
|
496 |
+
actual knowledge that, but for the patent license, your conveying the
|
497 |
+
covered work in a country, or your recipient's use of the covered work
|
498 |
+
in a country, would infringe one or more identifiable patents in that
|
499 |
+
country that you have reason to believe are valid.
|
500 |
+
|
501 |
+
If, pursuant to or in connection with a single transaction or
|
502 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
503 |
+
covered work, and grant a patent license to some of the parties
|
504 |
+
receiving the covered work authorizing them to use, propagate, modify
|
505 |
+
or convey a specific copy of the covered work, then the patent license
|
506 |
+
you grant is automatically extended to all recipients of the covered
|
507 |
+
work and works based on it.
|
508 |
+
|
509 |
+
A patent license is "discriminatory" if it does not include within
|
510 |
+
the scope of its coverage, prohibits the exercise of, or is
|
511 |
+
conditioned on the non-exercise of one or more of the rights that are
|
512 |
+
specifically granted under this License. You may not convey a covered
|
513 |
+
work if you are a party to an arrangement with a third party that is
|
514 |
+
in the business of distributing software, under which you make payment
|
515 |
+
to the third party based on the extent of your activity of conveying
|
516 |
+
the work, and under which the third party grants, to any of the
|
517 |
+
parties who would receive the covered work from you, a discriminatory
|
518 |
+
patent license (a) in connection with copies of the covered work
|
519 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
520 |
+
for and in connection with specific products or compilations that
|
521 |
+
contain the covered work, unless you entered into that arrangement,
|
522 |
+
or that patent license was granted, prior to 28 March 2007.
|
523 |
+
|
524 |
+
Nothing in this License shall be construed as excluding or limiting
|
525 |
+
any implied license or other defenses to infringement that may
|
526 |
+
otherwise be available to you under applicable patent law.
|
527 |
+
|
528 |
+
12. No Surrender of Others' Freedom.
|
529 |
+
|
530 |
+
If conditions are imposed on you (whether by court order, agreement or
|
531 |
+
otherwise) that contradict the conditions of this License, they do not
|
532 |
+
excuse you from the conditions of this License. If you cannot convey a
|
533 |
+
covered work so as to satisfy simultaneously your obligations under this
|
534 |
+
License and any other pertinent obligations, then as a consequence you may
|
535 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
536 |
+
to collect a royalty for further conveying from those to whom you convey
|
537 |
+
the Program, the only way you could satisfy both those terms and this
|
538 |
+
License would be to refrain entirely from conveying the Program.
|
539 |
+
|
540 |
+
13. Remote Network Interaction; Use with the GNU General Public License.
|
541 |
+
|
542 |
+
Notwithstanding any other provision of this License, if you modify the
|
543 |
+
Program, your modified version must prominently offer all users
|
544 |
+
interacting with it remotely through a computer network (if your version
|
545 |
+
supports such interaction) an opportunity to receive the Corresponding
|
546 |
+
Source of your version by providing access to the Corresponding Source
|
547 |
+
from a network server at no charge, through some standard or customary
|
548 |
+
means of facilitating copying of software. This Corresponding Source
|
549 |
+
shall include the Corresponding Source for any work covered by version 3
|
550 |
+
of the GNU General Public License that is incorporated pursuant to the
|
551 |
+
following paragraph.
|
552 |
+
|
553 |
+
Notwithstanding any other provision of this License, you have
|
554 |
+
permission to link or combine any covered work with a work licensed
|
555 |
+
under version 3 of the GNU General Public License into a single
|
556 |
+
combined work, and to convey the resulting work. The terms of this
|
557 |
+
License will continue to apply to the part which is the covered work,
|
558 |
+
but the work with which it is combined will remain governed by version
|
559 |
+
3 of the GNU General Public License.
|
560 |
+
|
561 |
+
14. Revised Versions of this License.
|
562 |
+
|
563 |
+
The Free Software Foundation may publish revised and/or new versions of
|
564 |
+
the GNU Affero General Public License from time to time. Such new versions
|
565 |
+
will be similar in spirit to the present version, but may differ in detail to
|
566 |
+
address new problems or concerns.
|
567 |
+
|
568 |
+
Each version is given a distinguishing version number. If the
|
569 |
+
Program specifies that a certain numbered version of the GNU Affero General
|
570 |
+
Public License "or any later version" applies to it, you have the
|
571 |
+
option of following the terms and conditions either of that numbered
|
572 |
+
version or of any later version published by the Free Software
|
573 |
+
Foundation. If the Program does not specify a version number of the
|
574 |
+
GNU Affero General Public License, you may choose any version ever published
|
575 |
+
by the Free Software Foundation.
|
576 |
+
|
577 |
+
If the Program specifies that a proxy can decide which future
|
578 |
+
versions of the GNU Affero General Public License can be used, that proxy's
|
579 |
+
public statement of acceptance of a version permanently authorizes you
|
580 |
+
to choose that version for the Program.
|
581 |
+
|
582 |
+
Later license versions may give you additional or different
|
583 |
+
permissions. However, no additional obligations are imposed on any
|
584 |
+
author or copyright holder as a result of your choosing to follow a
|
585 |
+
later version.
|
586 |
+
|
587 |
+
15. Disclaimer of Warranty.
|
588 |
+
|
589 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
590 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
591 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
592 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
593 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
594 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
595 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
596 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
597 |
+
|
598 |
+
16. Limitation of Liability.
|
599 |
+
|
600 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
601 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
602 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
603 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
604 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
605 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
606 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
607 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
608 |
+
SUCH DAMAGES.
|
609 |
+
|
610 |
+
17. Interpretation of Sections 15 and 16.
|
611 |
+
|
612 |
+
If the disclaimer of warranty and limitation of liability provided
|
613 |
+
above cannot be given local legal effect according to their terms,
|
614 |
+
reviewing courts shall apply local law that most closely approximates
|
615 |
+
an absolute waiver of all civil liability in connection with the
|
616 |
+
Program, unless a warranty or assumption of liability accompanies a
|
617 |
+
copy of the Program in return for a fee.
|
618 |
+
|
619 |
+
END OF TERMS AND CONDITIONS
|
620 |
+
|
621 |
+
How to Apply These Terms to Your New Programs
|
622 |
+
|
623 |
+
If you develop a new program, and you want it to be of the greatest
|
624 |
+
possible use to the public, the best way to achieve this is to make it
|
625 |
+
free software which everyone can redistribute and change under these terms.
|
626 |
+
|
627 |
+
To do so, attach the following notices to the program. It is safest
|
628 |
+
to attach them to the start of each source file to most effectively
|
629 |
+
state the exclusion of warranty; and each file should have at least
|
630 |
+
the "copyright" line and a pointer to where the full notice is found.
|
631 |
+
|
632 |
+
<one line to give the program's name and a brief idea of what it does.>
|
633 |
+
Copyright (C) <year> <name of author>
|
634 |
+
|
635 |
+
This program is free software: you can redistribute it and/or modify
|
636 |
+
it under the terms of the GNU Affero General Public License as published by
|
637 |
+
the Free Software Foundation, either version 3 of the License, or
|
638 |
+
(at your option) any later version.
|
639 |
+
|
640 |
+
This program is distributed in the hope that it will be useful,
|
641 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
642 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
643 |
+
GNU Affero General Public License for more details.
|
644 |
+
|
645 |
+
You should have received a copy of the GNU Affero General Public License
|
646 |
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
647 |
+
|
648 |
+
Also add information on how to contact you by electronic and paper mail.
|
649 |
+
|
650 |
+
If your software can interact with users remotely through a computer
|
651 |
+
network, you should also make sure that it provides a way for users to
|
652 |
+
get its source. For example, if your program is a web application, its
|
653 |
+
interface could display a "Source" link that leads users to an archive
|
654 |
+
of the code. There are many ways you could offer source, and different
|
655 |
+
solutions will be better for different programs; see section 13 for the
|
656 |
+
specific requirements.
|
657 |
+
|
658 |
+
You should also get your employer (if you work as a programmer) or school,
|
659 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
660 |
+
For more information on this, and how to apply and follow the GNU AGPL, see
|
661 |
+
<https://www.gnu.org/licenses/>.
|
models/yolov5/README.md
ADDED
@@ -0,0 +1,473 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div align="center">
|
2 |
+
<p>
|
3 |
+
<a href="http://www.ultralytics.com/blog/ultralytics-yolov8-turns-one-a-year-of-breakthroughs-and-innovations" target="_blank">
|
4 |
+
<img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/main/yolov8/banner-yolov8.png"></a>
|
5 |
+
<!--
|
6 |
+
<a align="center" href="https://ultralytics.com/yolov5" target="_blank">
|
7 |
+
<img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/main/yolov5/v70/splash.png"></a>
|
8 |
+
-->
|
9 |
+
</p>
|
10 |
+
|
11 |
+
[中文](https://docs.ultralytics.com/zh/) | [한국어](https://docs.ultralytics.com/ko/) | [日本語](https://docs.ultralytics.com/ja/) | [Русский](https://docs.ultralytics.com/ru/) | [Deutsch](https://docs.ultralytics.com/de/) | [Français](https://docs.ultralytics.com/fr/) | [Español](https://docs.ultralytics.com/es/) | [Português](https://docs.ultralytics.com/pt/) | [हिन्दी](https://docs.ultralytics.com/hi/) | [العربية](https://docs.ultralytics.com/ar/)
|
12 |
+
|
13 |
+
<div>
|
14 |
+
<a href="https://github.com/ultralytics/yolov5/actions/workflows/ci-testing.yml"><img src="https://github.com/ultralytics/yolov5/actions/workflows/ci-testing.yml/badge.svg" alt="YOLOv5 CI"></a>
|
15 |
+
<a href="https://zenodo.org/badge/latestdoi/264818686"><img src="https://zenodo.org/badge/264818686.svg" alt="YOLOv5 Citation"></a>
|
16 |
+
<a href="https://hub.docker.com/r/ultralytics/yolov5"><img src="https://img.shields.io/docker/pulls/ultralytics/yolov5?logo=docker" alt="Docker Pulls"></a>
|
17 |
+
<br>
|
18 |
+
<a href="https://bit.ly/yolov5-paperspace-notebook"><img src="https://assets.paperspace.io/img/gradient-badge.svg" alt="Run on Gradient"></a>
|
19 |
+
<a href="https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a>
|
20 |
+
<a href="https://www.kaggle.com/ultralytics/yolov5"><img src="https://kaggle.com/static/images/open-in-kaggle.svg" alt="Open In Kaggle"></a>
|
21 |
+
</div>
|
22 |
+
<br>
|
23 |
+
|
24 |
+
YOLOv5 🚀 is the world's most loved vision AI, representing <a href="https://ultralytics.com">Ultralytics</a> open-source research into future vision AI methods, incorporating lessons learned and best practices evolved over thousands of hours of research and development.
|
25 |
+
|
26 |
+
We hope that the resources here will help you get the most out of YOLOv5. Please browse the YOLOv5 <a href="https://docs.ultralytics.com/yolov5">Docs</a> for details, raise an issue on <a href="https://github.com/ultralytics/yolov5/issues/new/choose">GitHub</a> for support, and join our <a href="https://ultralytics.com/discord">Discord</a> community for questions and discussions!
|
27 |
+
|
28 |
+
To request an Enterprise License please complete the form at [Ultralytics Licensing](https://ultralytics.com/license).
|
29 |
+
|
30 |
+
<div align="center">
|
31 |
+
<a href="https://github.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-github.png" width="2%" alt="Ultralytics GitHub"></a>
|
32 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%">
|
33 |
+
<a href="https://www.linkedin.com/company/ultralytics/"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-linkedin.png" width="2%" alt="Ultralytics LinkedIn"></a>
|
34 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%">
|
35 |
+
<a href="https://twitter.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-twitter.png" width="2%" alt="Ultralytics Twitter"></a>
|
36 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%">
|
37 |
+
<a href="https://youtube.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-youtube.png" width="2%" alt="Ultralytics YouTube"></a>
|
38 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%">
|
39 |
+
<a href="https://www.tiktok.com/@ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-tiktok.png" width="2%" alt="Ultralytics TikTok"></a>
|
40 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%">
|
41 |
+
<a href="https://www.instagram.com/ultralytics/"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-instagram.png" width="2%" alt="Ultralytics Instagram"></a>
|
42 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%">
|
43 |
+
<a href="https://ultralytics.com/discord"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-discord.png" width="2%" alt="Ultralytics Discord"></a>
|
44 |
+
</div>
|
45 |
+
|
46 |
+
</div>
|
47 |
+
<br>
|
48 |
+
|
49 |
+
## <div align="center">YOLOv8 🚀 NEW</div>
|
50 |
+
|
51 |
+
We are thrilled to announce the launch of Ultralytics YOLOv8 🚀, our NEW cutting-edge, state-of-the-art (SOTA) model released at **[https://github.com/ultralytics/ultralytics](https://github.com/ultralytics/ultralytics)**. YOLOv8 is designed to be fast, accurate, and easy to use, making it an excellent choice for a wide range of object detection, image segmentation and image classification tasks.
|
52 |
+
|
53 |
+
See the [YOLOv8 Docs](https://docs.ultralytics.com) for details and get started with:
|
54 |
+
|
55 |
+
[![PyPI version](https://badge.fury.io/py/ultralytics.svg)](https://badge.fury.io/py/ultralytics) [![Downloads](https://static.pepy.tech/badge/ultralytics)](https://pepy.tech/project/ultralytics)
|
56 |
+
|
57 |
+
```bash
|
58 |
+
pip install ultralytics
|
59 |
+
```
|
60 |
+
|
61 |
+
<div align="center">
|
62 |
+
<a href="https://ultralytics.com/yolov8" target="_blank">
|
63 |
+
<img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/main/yolov8/yolo-comparison-plots.png"></a>
|
64 |
+
</div>
|
65 |
+
|
66 |
+
## <div align="center">Documentation</div>
|
67 |
+
|
68 |
+
See the [YOLOv5 Docs](https://docs.ultralytics.com/yolov5) for full documentation on training, testing and deployment. See below for quickstart examples.
|
69 |
+
|
70 |
+
<details open>
|
71 |
+
<summary>Install</summary>
|
72 |
+
|
73 |
+
Clone repo and install [requirements.txt](https://github.com/ultralytics/yolov5/blob/master/requirements.txt) in a [**Python>=3.8.0**](https://www.python.org/) environment, including [**PyTorch>=1.8**](https://pytorch.org/get-started/locally/).
|
74 |
+
|
75 |
+
```bash
|
76 |
+
git clone https://github.com/ultralytics/yolov5 # clone
|
77 |
+
cd yolov5
|
78 |
+
pip install -r requirements.txt # install
|
79 |
+
```
|
80 |
+
|
81 |
+
</details>
|
82 |
+
|
83 |
+
<details>
|
84 |
+
<summary>Inference</summary>
|
85 |
+
|
86 |
+
YOLOv5 [PyTorch Hub](https://docs.ultralytics.com/yolov5/tutorials/pytorch_hub_model_loading) inference. [Models](https://github.com/ultralytics/yolov5/tree/master/models) download automatically from the latest YOLOv5 [release](https://github.com/ultralytics/yolov5/releases).
|
87 |
+
|
88 |
+
```python
|
89 |
+
import torch
|
90 |
+
|
91 |
+
# Model
|
92 |
+
model = torch.hub.load("ultralytics/yolov5", "yolov5s") # or yolov5n - yolov5x6, custom
|
93 |
+
|
94 |
+
# Images
|
95 |
+
img = "https://ultralytics.com/images/zidane.jpg" # or file, Path, PIL, OpenCV, numpy, list
|
96 |
+
|
97 |
+
# Inference
|
98 |
+
results = model(img)
|
99 |
+
|
100 |
+
# Results
|
101 |
+
results.print() # or .show(), .save(), .crop(), .pandas(), etc.
|
102 |
+
```
|
103 |
+
|
104 |
+
</details>
|
105 |
+
|
106 |
+
<details>
|
107 |
+
<summary>Inference with detect.py</summary>
|
108 |
+
|
109 |
+
`detect.py` runs inference on a variety of sources, downloading [models](https://github.com/ultralytics/yolov5/tree/master/models) automatically from the latest YOLOv5 [release](https://github.com/ultralytics/yolov5/releases) and saving results to `runs/detect`.
|
110 |
+
|
111 |
+
```bash
|
112 |
+
python detect.py --weights yolov5s.pt --source 0 # webcam
|
113 |
+
img.jpg # image
|
114 |
+
vid.mp4 # video
|
115 |
+
screen # screenshot
|
116 |
+
path/ # directory
|
117 |
+
list.txt # list of images
|
118 |
+
list.streams # list of streams
|
119 |
+
'path/*.jpg' # glob
|
120 |
+
'https://youtu.be/LNwODJXcvt4' # YouTube
|
121 |
+
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
|
122 |
+
```
|
123 |
+
|
124 |
+
</details>
|
125 |
+
|
126 |
+
<details>
|
127 |
+
<summary>Training</summary>
|
128 |
+
|
129 |
+
The commands below reproduce YOLOv5 [COCO](https://github.com/ultralytics/yolov5/blob/master/data/scripts/get_coco.sh) results. [Models](https://github.com/ultralytics/yolov5/tree/master/models) and [datasets](https://github.com/ultralytics/yolov5/tree/master/data) download automatically from the latest YOLOv5 [release](https://github.com/ultralytics/yolov5/releases). Training times for YOLOv5n/s/m/l/x are 1/2/4/6/8 days on a V100 GPU ([Multi-GPU](https://docs.ultralytics.com/yolov5/tutorials/multi_gpu_training) times faster). Use the largest `--batch-size` possible, or pass `--batch-size -1` for YOLOv5 [AutoBatch](https://github.com/ultralytics/yolov5/pull/5092). Batch sizes shown for V100-16GB.
|
130 |
+
|
131 |
+
```bash
|
132 |
+
python train.py --data coco.yaml --epochs 300 --weights '' --cfg yolov5n.yaml --batch-size 128
|
133 |
+
yolov5s 64
|
134 |
+
yolov5m 40
|
135 |
+
yolov5l 24
|
136 |
+
yolov5x 16
|
137 |
+
```
|
138 |
+
|
139 |
+
<img width="800" src="https://user-images.githubusercontent.com/26833433/90222759-949d8800-ddc1-11ea-9fa1-1c97eed2b963.png">
|
140 |
+
|
141 |
+
</details>
|
142 |
+
|
143 |
+
<details open>
|
144 |
+
<summary>Tutorials</summary>
|
145 |
+
|
146 |
+
- [Train Custom Data](https://docs.ultralytics.com/yolov5/tutorials/train_custom_data) 🚀 RECOMMENDED
|
147 |
+
- [Tips for Best Training Results](https://docs.ultralytics.com/yolov5/tutorials/tips_for_best_training_results) ☘️
|
148 |
+
- [Multi-GPU Training](https://docs.ultralytics.com/yolov5/tutorials/multi_gpu_training)
|
149 |
+
- [PyTorch Hub](https://docs.ultralytics.com/yolov5/tutorials/pytorch_hub_model_loading) 🌟 NEW
|
150 |
+
- [TFLite, ONNX, CoreML, TensorRT Export](https://docs.ultralytics.com/yolov5/tutorials/model_export) 🚀
|
151 |
+
- [NVIDIA Jetson platform Deployment](https://docs.ultralytics.com/yolov5/tutorials/running_on_jetson_nano) 🌟 NEW
|
152 |
+
- [Test-Time Augmentation (TTA)](https://docs.ultralytics.com/yolov5/tutorials/test_time_augmentation)
|
153 |
+
- [Model Ensembling](https://docs.ultralytics.com/yolov5/tutorials/model_ensembling)
|
154 |
+
- [Model Pruning/Sparsity](https://docs.ultralytics.com/yolov5/tutorials/model_pruning_and_sparsity)
|
155 |
+
- [Hyperparameter Evolution](https://docs.ultralytics.com/yolov5/tutorials/hyperparameter_evolution)
|
156 |
+
- [Transfer Learning with Frozen Layers](https://docs.ultralytics.com/yolov5/tutorials/transfer_learning_with_frozen_layers)
|
157 |
+
- [Architecture Summary](https://docs.ultralytics.com/yolov5/tutorials/architecture_description) 🌟 NEW
|
158 |
+
- [Roboflow for Datasets, Labeling, and Active Learning](https://docs.ultralytics.com/yolov5/tutorials/roboflow_datasets_integration)
|
159 |
+
- [ClearML Logging](https://docs.ultralytics.com/yolov5/tutorials/clearml_logging_integration) 🌟 NEW
|
160 |
+
- [YOLOv5 with Neural Magic's Deepsparse](https://docs.ultralytics.com/yolov5/tutorials/neural_magic_pruning_quantization) 🌟 NEW
|
161 |
+
- [Comet Logging](https://docs.ultralytics.com/yolov5/tutorials/comet_logging_integration) 🌟 NEW
|
162 |
+
|
163 |
+
</details>
|
164 |
+
|
165 |
+
## <div align="center">Integrations</div>
|
166 |
+
|
167 |
+
<br>
|
168 |
+
<a align="center" href="https://bit.ly/ultralytics_hub" target="_blank">
|
169 |
+
<img width="100%" src="https://github.com/ultralytics/assets/raw/main/im/integrations-loop.png"></a>
|
170 |
+
<br>
|
171 |
+
<br>
|
172 |
+
|
173 |
+
<div align="center">
|
174 |
+
<a href="https://roboflow.com/?ref=ultralytics">
|
175 |
+
<img src="https://github.com/ultralytics/assets/raw/main/partners/logo-roboflow.png" width="10%" /></a>
|
176 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="15%" height="0" alt="" />
|
177 |
+
<a href="https://cutt.ly/yolov5-readme-clearml">
|
178 |
+
<img src="https://github.com/ultralytics/assets/raw/main/partners/logo-clearml.png" width="10%" /></a>
|
179 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="15%" height="0" alt="" />
|
180 |
+
<a href="https://bit.ly/yolov5-readme-comet2">
|
181 |
+
<img src="https://github.com/ultralytics/assets/raw/main/partners/logo-comet.png" width="10%" /></a>
|
182 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="15%" height="0" alt="" />
|
183 |
+
<a href="https://bit.ly/yolov5-neuralmagic">
|
184 |
+
<img src="https://github.com/ultralytics/assets/raw/main/partners/logo-neuralmagic.png" width="10%" /></a>
|
185 |
+
</div>
|
186 |
+
|
187 |
+
| Roboflow | ClearML ⭐ NEW | Comet ⭐ NEW | Neural Magic ⭐ NEW |
|
188 |
+
| :--------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------: |
|
189 |
+
| Label and export your custom datasets directly to YOLOv5 for training with [Roboflow](https://roboflow.com/?ref=ultralytics) | Automatically track, visualize and even remotely train YOLOv5 using [ClearML](https://cutt.ly/yolov5-readme-clearml) (open-source!) | Free forever, [Comet](https://bit.ly/yolov5-readme-comet2) lets you save YOLOv5 models, resume training, and interactively visualise and debug predictions | Run YOLOv5 inference up to 6x faster with [Neural Magic DeepSparse](https://bit.ly/yolov5-neuralmagic) |
|
190 |
+
|
191 |
+
## <div align="center">Ultralytics HUB</div>
|
192 |
+
|
193 |
+
Experience seamless AI with [Ultralytics HUB](https://bit.ly/ultralytics_hub) ⭐, the all-in-one solution for data visualization, YOLOv5 and YOLOv8 🚀 model training and deployment, without any coding. Transform images into actionable insights and bring your AI visions to life with ease using our cutting-edge platform and user-friendly [Ultralytics App](https://ultralytics.com/app_install). Start your journey for **Free** now!
|
194 |
+
|
195 |
+
<a align="center" href="https://bit.ly/ultralytics_hub" target="_blank">
|
196 |
+
<img width="100%" src="https://github.com/ultralytics/assets/raw/main/im/ultralytics-hub.png"></a>
|
197 |
+
|
198 |
+
## <div align="center">Why YOLOv5</div>
|
199 |
+
|
200 |
+
YOLOv5 has been designed to be super easy to get started and simple to learn. We prioritize real-world results.
|
201 |
+
|
202 |
+
<p align="left"><img width="800" src="https://user-images.githubusercontent.com/26833433/155040763-93c22a27-347c-4e3c-847a-8094621d3f4e.png"></p>
|
203 |
+
<details>
|
204 |
+
<summary>YOLOv5-P5 640 Figure</summary>
|
205 |
+
|
206 |
+
<p align="left"><img width="800" src="https://user-images.githubusercontent.com/26833433/155040757-ce0934a3-06a6-43dc-a979-2edbbd69ea0e.png"></p>
|
207 |
+
</details>
|
208 |
+
<details>
|
209 |
+
<summary>Figure Notes</summary>
|
210 |
+
|
211 |
+
- **COCO AP val** denotes mAP@0.5:0.95 metric measured on the 5000-image [COCO val2017](http://cocodataset.org) dataset over various inference sizes from 256 to 1536.
|
212 |
+
- **GPU Speed** measures average inference time per image on [COCO val2017](http://cocodataset.org) dataset using a [AWS p3.2xlarge](https://aws.amazon.com/ec2/instance-types/p3/) V100 instance at batch-size 32.
|
213 |
+
- **EfficientDet** data from [google/automl](https://github.com/google/automl) at batch size 8.
|
214 |
+
- **Reproduce** by `python val.py --task study --data coco.yaml --iou 0.7 --weights yolov5n6.pt yolov5s6.pt yolov5m6.pt yolov5l6.pt yolov5x6.pt`
|
215 |
+
|
216 |
+
</details>
|
217 |
+
|
218 |
+
### Pretrained Checkpoints
|
219 |
+
|
220 |
+
| Model | size<br><sup>(pixels) | mAP<sup>val<br>50-95 | mAP<sup>val<br>50 | Speed<br><sup>CPU b1<br>(ms) | Speed<br><sup>V100 b1<br>(ms) | Speed<br><sup>V100 b32<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>@640 (B) |
|
221 |
+
| ----------------------------------------------------------------------------------------------- | --------------------- | -------------------- | ----------------- | ---------------------------- | ----------------------------- | ------------------------------ | ------------------ | ---------------------- |
|
222 |
+
| [YOLOv5n](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5n.pt) | 640 | 28.0 | 45.7 | **45** | **6.3** | **0.6** | **1.9** | **4.5** |
|
223 |
+
| [YOLOv5s](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s.pt) | 640 | 37.4 | 56.8 | 98 | 6.4 | 0.9 | 7.2 | 16.5 |
|
224 |
+
| [YOLOv5m](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5m.pt) | 640 | 45.4 | 64.1 | 224 | 8.2 | 1.7 | 21.2 | 49.0 |
|
225 |
+
| [YOLOv5l](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5l.pt) | 640 | 49.0 | 67.3 | 430 | 10.1 | 2.7 | 46.5 | 109.1 |
|
226 |
+
| [YOLOv5x](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5x.pt) | 640 | 50.7 | 68.9 | 766 | 12.1 | 4.8 | 86.7 | 205.7 |
|
227 |
+
| | | | | | | | | |
|
228 |
+
| [YOLOv5n6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5n6.pt) | 1280 | 36.0 | 54.4 | 153 | 8.1 | 2.1 | 3.2 | 4.6 |
|
229 |
+
| [YOLOv5s6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s6.pt) | 1280 | 44.8 | 63.7 | 385 | 8.2 | 3.6 | 12.6 | 16.8 |
|
230 |
+
| [YOLOv5m6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5m6.pt) | 1280 | 51.3 | 69.3 | 887 | 11.1 | 6.8 | 35.7 | 50.0 |
|
231 |
+
| [YOLOv5l6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5l6.pt) | 1280 | 53.7 | 71.3 | 1784 | 15.8 | 10.5 | 76.8 | 111.4 |
|
232 |
+
| [YOLOv5x6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5x6.pt)<br>+ [TTA] | 1280<br>1536 | 55.0<br>**55.8** | 72.7<br>**72.7** | 3136<br>- | 26.2<br>- | 19.4<br>- | 140.7<br>- | 209.8<br>- |
|
233 |
+
|
234 |
+
<details>
|
235 |
+
<summary>Table Notes</summary>
|
236 |
+
|
237 |
+
- All checkpoints are trained to 300 epochs with default settings. Nano and Small models use [hyp.scratch-low.yaml](https://github.com/ultralytics/yolov5/blob/master/data/hyps/hyp.scratch-low.yaml) hyps, all others use [hyp.scratch-high.yaml](https://github.com/ultralytics/yolov5/blob/master/data/hyps/hyp.scratch-high.yaml).
|
238 |
+
- **mAP<sup>val</sup>** values are for single-model single-scale on [COCO val2017](http://cocodataset.org) dataset.<br>Reproduce by `python val.py --data coco.yaml --img 640 --conf 0.001 --iou 0.65`
|
239 |
+
- **Speed** averaged over COCO val images using a [AWS p3.2xlarge](https://aws.amazon.com/ec2/instance-types/p3/) instance. NMS times (~1 ms/img) not included.<br>Reproduce by `python val.py --data coco.yaml --img 640 --task speed --batch 1`
|
240 |
+
- **TTA** [Test Time Augmentation](https://docs.ultralytics.com/yolov5/tutorials/test_time_augmentation) includes reflection and scale augmentations.<br>Reproduce by `python val.py --data coco.yaml --img 1536 --iou 0.7 --augment`
|
241 |
+
|
242 |
+
</details>
|
243 |
+
|
244 |
+
## <div align="center">Segmentation</div>
|
245 |
+
|
246 |
+
Our new YOLOv5 [release v7.0](https://github.com/ultralytics/yolov5/releases/v7.0) instance segmentation models are the fastest and most accurate in the world, beating all current [SOTA benchmarks](https://paperswithcode.com/sota/real-time-instance-segmentation-on-mscoco). We've made them super simple to train, validate and deploy. See full details in our [Release Notes](https://github.com/ultralytics/yolov5/releases/v7.0) and visit our [YOLOv5 Segmentation Colab Notebook](https://github.com/ultralytics/yolov5/blob/master/segment/tutorial.ipynb) for quickstart tutorials.
|
247 |
+
|
248 |
+
<details>
|
249 |
+
<summary>Segmentation Checkpoints</summary>
|
250 |
+
|
251 |
+
<div align="center">
|
252 |
+
<a align="center" href="https://ultralytics.com/yolov5" target="_blank">
|
253 |
+
<img width="800" src="https://user-images.githubusercontent.com/61612323/204180385-84f3aca9-a5e9-43d8-a617-dda7ca12e54a.png"></a>
|
254 |
+
</div>
|
255 |
+
|
256 |
+
We trained YOLOv5 segmentations models on COCO for 300 epochs at image size 640 using A100 GPUs. We exported all models to ONNX FP32 for CPU speed tests and to TensorRT FP16 for GPU speed tests. We ran all speed tests on Google [Colab Pro](https://colab.research.google.com/signup) notebooks for easy reproducibility.
|
257 |
+
|
258 |
+
| Model | size<br><sup>(pixels) | mAP<sup>box<br>50-95 | mAP<sup>mask<br>50-95 | Train time<br><sup>300 epochs<br>A100 (hours) | Speed<br><sup>ONNX CPU<br>(ms) | Speed<br><sup>TRT A100<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>@640 (B) |
|
259 |
+
| ------------------------------------------------------------------------------------------ | --------------------- | -------------------- | --------------------- | --------------------------------------------- | ------------------------------ | ------------------------------ | ------------------ | ---------------------- |
|
260 |
+
| [YOLOv5n-seg](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5n-seg.pt) | 640 | 27.6 | 23.4 | 80:17 | **62.7** | **1.2** | **2.0** | **7.1** |
|
261 |
+
| [YOLOv5s-seg](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s-seg.pt) | 640 | 37.6 | 31.7 | 88:16 | 173.3 | 1.4 | 7.6 | 26.4 |
|
262 |
+
| [YOLOv5m-seg](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5m-seg.pt) | 640 | 45.0 | 37.1 | 108:36 | 427.0 | 2.2 | 22.0 | 70.8 |
|
263 |
+
| [YOLOv5l-seg](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5l-seg.pt) | 640 | 49.0 | 39.9 | 66:43 (2x) | 857.4 | 2.9 | 47.9 | 147.7 |
|
264 |
+
| [YOLOv5x-seg](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5x-seg.pt) | 640 | **50.7** | **41.4** | 62:56 (3x) | 1579.2 | 4.5 | 88.8 | 265.7 |
|
265 |
+
|
266 |
+
- All checkpoints are trained to 300 epochs with SGD optimizer with `lr0=0.01` and `weight_decay=5e-5` at image size 640 and all default settings.<br>Runs logged to https://wandb.ai/glenn-jocher/YOLOv5_v70_official
|
267 |
+
- **Accuracy** values are for single-model single-scale on COCO dataset.<br>Reproduce by `python segment/val.py --data coco.yaml --weights yolov5s-seg.pt`
|
268 |
+
- **Speed** averaged over 100 inference images using a [Colab Pro](https://colab.research.google.com/signup) A100 High-RAM instance. Values indicate inference speed only (NMS adds about 1ms per image). <br>Reproduce by `python segment/val.py --data coco.yaml --weights yolov5s-seg.pt --batch 1`
|
269 |
+
- **Export** to ONNX at FP32 and TensorRT at FP16 done with `export.py`. <br>Reproduce by `python export.py --weights yolov5s-seg.pt --include engine --device 0 --half`
|
270 |
+
|
271 |
+
</details>
|
272 |
+
|
273 |
+
<details>
|
274 |
+
<summary>Segmentation Usage Examples <a href="https://colab.research.google.com/github/ultralytics/yolov5/blob/master/segment/tutorial.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a></summary>
|
275 |
+
|
276 |
+
### Train
|
277 |
+
|
278 |
+
YOLOv5 segmentation training supports auto-download COCO128-seg segmentation dataset with `--data coco128-seg.yaml` argument and manual download of COCO-segments dataset with `bash data/scripts/get_coco.sh --train --val --segments` and then `python train.py --data coco.yaml`.
|
279 |
+
|
280 |
+
```bash
|
281 |
+
# Single-GPU
|
282 |
+
python segment/train.py --data coco128-seg.yaml --weights yolov5s-seg.pt --img 640
|
283 |
+
|
284 |
+
# Multi-GPU DDP
|
285 |
+
python -m torch.distributed.run --nproc_per_node 4 --master_port 1 segment/train.py --data coco128-seg.yaml --weights yolov5s-seg.pt --img 640 --device 0,1,2,3
|
286 |
+
```
|
287 |
+
|
288 |
+
### Val
|
289 |
+
|
290 |
+
Validate YOLOv5s-seg mask mAP on COCO dataset:
|
291 |
+
|
292 |
+
```bash
|
293 |
+
bash data/scripts/get_coco.sh --val --segments # download COCO val segments split (780MB, 5000 images)
|
294 |
+
python segment/val.py --weights yolov5s-seg.pt --data coco.yaml --img 640 # validate
|
295 |
+
```
|
296 |
+
|
297 |
+
### Predict
|
298 |
+
|
299 |
+
Use pretrained YOLOv5m-seg.pt to predict bus.jpg:
|
300 |
+
|
301 |
+
```bash
|
302 |
+
python segment/predict.py --weights yolov5m-seg.pt --source data/images/bus.jpg
|
303 |
+
```
|
304 |
+
|
305 |
+
```python
|
306 |
+
model = torch.hub.load(
|
307 |
+
"ultralytics/yolov5", "custom", "yolov5m-seg.pt"
|
308 |
+
) # load from PyTorch Hub (WARNING: inference not yet supported)
|
309 |
+
```
|
310 |
+
|
311 |
+
| ![zidane](https://user-images.githubusercontent.com/26833433/203113421-decef4c4-183d-4a0a-a6c2-6435b33bc5d3.jpg) | ![bus](https://user-images.githubusercontent.com/26833433/203113416-11fe0025-69f7-4874-a0a6-65d0bfe2999a.jpg) |
|
312 |
+
| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
313 |
+
|
314 |
+
### Export
|
315 |
+
|
316 |
+
Export YOLOv5s-seg model to ONNX and TensorRT:
|
317 |
+
|
318 |
+
```bash
|
319 |
+
python export.py --weights yolov5s-seg.pt --include onnx engine --img 640 --device 0
|
320 |
+
```
|
321 |
+
|
322 |
+
</details>
|
323 |
+
|
324 |
+
## <div align="center">Classification</div>
|
325 |
+
|
326 |
+
YOLOv5 [release v6.2](https://github.com/ultralytics/yolov5/releases) brings support for classification model training, validation and deployment! See full details in our [Release Notes](https://github.com/ultralytics/yolov5/releases/v6.2) and visit our [YOLOv5 Classification Colab Notebook](https://github.com/ultralytics/yolov5/blob/master/classify/tutorial.ipynb) for quickstart tutorials.
|
327 |
+
|
328 |
+
<details>
|
329 |
+
<summary>Classification Checkpoints</summary>
|
330 |
+
|
331 |
+
<br>
|
332 |
+
|
333 |
+
We trained YOLOv5-cls classification models on ImageNet for 90 epochs using a 4xA100 instance, and we trained ResNet and EfficientNet models alongside with the same default training settings to compare. We exported all models to ONNX FP32 for CPU speed tests and to TensorRT FP16 for GPU speed tests. We ran all speed tests on Google [Colab Pro](https://colab.research.google.com/signup) for easy reproducibility.
|
334 |
+
|
335 |
+
| Model | size<br><sup>(pixels) | acc<br><sup>top1 | acc<br><sup>top5 | Training<br><sup>90 epochs<br>4xA100 (hours) | Speed<br><sup>ONNX CPU<br>(ms) | Speed<br><sup>TensorRT V100<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>@224 (B) |
|
336 |
+
| -------------------------------------------------------------------------------------------------- | --------------------- | ---------------- | ---------------- | -------------------------------------------- | ------------------------------ | ----------------------------------- | ------------------ | ---------------------- |
|
337 |
+
| [YOLOv5n-cls](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5n-cls.pt) | 224 | 64.6 | 85.4 | 7:59 | **3.3** | **0.5** | **2.5** | **0.5** |
|
338 |
+
| [YOLOv5s-cls](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s-cls.pt) | 224 | 71.5 | 90.2 | 8:09 | 6.6 | 0.6 | 5.4 | 1.4 |
|
339 |
+
| [YOLOv5m-cls](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5m-cls.pt) | 224 | 75.9 | 92.9 | 10:06 | 15.5 | 0.9 | 12.9 | 3.9 |
|
340 |
+
| [YOLOv5l-cls](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5l-cls.pt) | 224 | 78.0 | 94.0 | 11:56 | 26.9 | 1.4 | 26.5 | 8.5 |
|
341 |
+
| [YOLOv5x-cls](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5x-cls.pt) | 224 | **79.0** | **94.4** | 15:04 | 54.3 | 1.8 | 48.1 | 15.9 |
|
342 |
+
| | | | | | | | | |
|
343 |
+
| [ResNet18](https://github.com/ultralytics/yolov5/releases/download/v7.0/resnet18.pt) | 224 | 70.3 | 89.5 | **6:47** | 11.2 | 0.5 | 11.7 | 3.7 |
|
344 |
+
| [ResNet34](https://github.com/ultralytics/yolov5/releases/download/v7.0/resnet34.pt) | 224 | 73.9 | 91.8 | 8:33 | 20.6 | 0.9 | 21.8 | 7.4 |
|
345 |
+
| [ResNet50](https://github.com/ultralytics/yolov5/releases/download/v7.0/resnet50.pt) | 224 | 76.8 | 93.4 | 11:10 | 23.4 | 1.0 | 25.6 | 8.5 |
|
346 |
+
| [ResNet101](https://github.com/ultralytics/yolov5/releases/download/v7.0/resnet101.pt) | 224 | 78.5 | 94.3 | 17:10 | 42.1 | 1.9 | 44.5 | 15.9 |
|
347 |
+
| | | | | | | | | |
|
348 |
+
| [EfficientNet_b0](https://github.com/ultralytics/yolov5/releases/download/v7.0/efficientnet_b0.pt) | 224 | 75.1 | 92.4 | 13:03 | 12.5 | 1.3 | 5.3 | 1.0 |
|
349 |
+
| [EfficientNet_b1](https://github.com/ultralytics/yolov5/releases/download/v7.0/efficientnet_b1.pt) | 224 | 76.4 | 93.2 | 17:04 | 14.9 | 1.6 | 7.8 | 1.5 |
|
350 |
+
| [EfficientNet_b2](https://github.com/ultralytics/yolov5/releases/download/v7.0/efficientnet_b2.pt) | 224 | 76.6 | 93.4 | 17:10 | 15.9 | 1.6 | 9.1 | 1.7 |
|
351 |
+
| [EfficientNet_b3](https://github.com/ultralytics/yolov5/releases/download/v7.0/efficientnet_b3.pt) | 224 | 77.7 | 94.0 | 19:19 | 18.9 | 1.9 | 12.2 | 2.4 |
|
352 |
+
|
353 |
+
<details>
|
354 |
+
<summary>Table Notes (click to expand)</summary>
|
355 |
+
|
356 |
+
- All checkpoints are trained to 90 epochs with SGD optimizer with `lr0=0.001` and `weight_decay=5e-5` at image size 224 and all default settings.<br>Runs logged to https://wandb.ai/glenn-jocher/YOLOv5-Classifier-v6-2
|
357 |
+
- **Accuracy** values are for single-model single-scale on [ImageNet-1k](https://www.image-net.org/index.php) dataset.<br>Reproduce by `python classify/val.py --data ../datasets/imagenet --img 224`
|
358 |
+
- **Speed** averaged over 100 inference images using a Google [Colab Pro](https://colab.research.google.com/signup) V100 High-RAM instance.<br>Reproduce by `python classify/val.py --data ../datasets/imagenet --img 224 --batch 1`
|
359 |
+
- **Export** to ONNX at FP32 and TensorRT at FP16 done with `export.py`. <br>Reproduce by `python export.py --weights yolov5s-cls.pt --include engine onnx --imgsz 224`
|
360 |
+
|
361 |
+
</details>
|
362 |
+
</details>
|
363 |
+
|
364 |
+
<details>
|
365 |
+
<summary>Classification Usage Examples <a href="https://colab.research.google.com/github/ultralytics/yolov5/blob/master/classify/tutorial.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a></summary>
|
366 |
+
|
367 |
+
### Train
|
368 |
+
|
369 |
+
YOLOv5 classification training supports auto-download of MNIST, Fashion-MNIST, CIFAR10, CIFAR100, Imagenette, Imagewoof, and ImageNet datasets with the `--data` argument. To start training on MNIST for example use `--data mnist`.
|
370 |
+
|
371 |
+
```bash
|
372 |
+
# Single-GPU
|
373 |
+
python classify/train.py --model yolov5s-cls.pt --data cifar100 --epochs 5 --img 224 --batch 128
|
374 |
+
|
375 |
+
# Multi-GPU DDP
|
376 |
+
python -m torch.distributed.run --nproc_per_node 4 --master_port 1 classify/train.py --model yolov5s-cls.pt --data imagenet --epochs 5 --img 224 --device 0,1,2,3
|
377 |
+
```
|
378 |
+
|
379 |
+
### Val
|
380 |
+
|
381 |
+
Validate YOLOv5m-cls accuracy on ImageNet-1k dataset:
|
382 |
+
|
383 |
+
```bash
|
384 |
+
bash data/scripts/get_imagenet.sh --val # download ImageNet val split (6.3G, 50000 images)
|
385 |
+
python classify/val.py --weights yolov5m-cls.pt --data ../datasets/imagenet --img 224 # validate
|
386 |
+
```
|
387 |
+
|
388 |
+
### Predict
|
389 |
+
|
390 |
+
Use pretrained YOLOv5s-cls.pt to predict bus.jpg:
|
391 |
+
|
392 |
+
```bash
|
393 |
+
python classify/predict.py --weights yolov5s-cls.pt --source data/images/bus.jpg
|
394 |
+
```
|
395 |
+
|
396 |
+
```python
|
397 |
+
model = torch.hub.load(
|
398 |
+
"ultralytics/yolov5", "custom", "yolov5s-cls.pt"
|
399 |
+
) # load from PyTorch Hub
|
400 |
+
```
|
401 |
+
|
402 |
+
### Export
|
403 |
+
|
404 |
+
Export a group of trained YOLOv5s-cls, ResNet and EfficientNet models to ONNX and TensorRT:
|
405 |
+
|
406 |
+
```bash
|
407 |
+
python export.py --weights yolov5s-cls.pt resnet50.pt efficientnet_b0.pt --include onnx engine --img 224
|
408 |
+
```
|
409 |
+
|
410 |
+
</details>
|
411 |
+
|
412 |
+
## <div align="center">Environments</div>
|
413 |
+
|
414 |
+
Get started in seconds with our verified environments. Click each icon below for details.
|
415 |
+
|
416 |
+
<div align="center">
|
417 |
+
<a href="https://bit.ly/yolov5-paperspace-notebook">
|
418 |
+
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-gradient.png" width="10%" /></a>
|
419 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="5%" alt="" />
|
420 |
+
<a href="https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb">
|
421 |
+
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-colab-small.png" width="10%" /></a>
|
422 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="5%" alt="" />
|
423 |
+
<a href="https://www.kaggle.com/ultralytics/yolov5">
|
424 |
+
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-kaggle-small.png" width="10%" /></a>
|
425 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="5%" alt="" />
|
426 |
+
<a href="https://hub.docker.com/r/ultralytics/yolov5">
|
427 |
+
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-docker-small.png" width="10%" /></a>
|
428 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="5%" alt="" />
|
429 |
+
<a href="https://docs.ultralytics.com/yolov5/environments/aws_quickstart_tutorial/">
|
430 |
+
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-aws-small.png" width="10%" /></a>
|
431 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="5%" alt="" />
|
432 |
+
<a href="https://docs.ultralytics.com/yolov5/environments/google_cloud_quickstart_tutorial/">
|
433 |
+
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-gcp-small.png" width="10%" /></a>
|
434 |
+
</div>
|
435 |
+
|
436 |
+
## <div align="center">Contribute</div>
|
437 |
+
|
438 |
+
We love your input! We want to make contributing to YOLOv5 as easy and transparent as possible. Please see our [Contributing Guide](https://docs.ultralytics.com/help/contributing/) to get started, and fill out the [YOLOv5 Survey](https://ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey) to send us feedback on your experiences. Thank you to all our contributors!
|
439 |
+
|
440 |
+
<!-- SVG image from https://opencollective.com/ultralytics/contributors.svg?width=990 -->
|
441 |
+
|
442 |
+
<a href="https://github.com/ultralytics/yolov5/graphs/contributors">
|
443 |
+
<img src="https://github.com/ultralytics/assets/raw/main/im/image-contributors.png" /></a>
|
444 |
+
|
445 |
+
## <div align="center">License</div>
|
446 |
+
|
447 |
+
Ultralytics offers two licensing options to accommodate diverse use cases:
|
448 |
+
|
449 |
+
- **AGPL-3.0 License**: This [OSI-approved](https://opensource.org/licenses/) open-source license is ideal for students and enthusiasts, promoting open collaboration and knowledge sharing. See the [LICENSE](https://github.com/ultralytics/yolov5/blob/master/LICENSE) file for more details.
|
450 |
+
- **Enterprise License**: Designed for commercial use, this license permits seamless integration of Ultralytics software and AI models into commercial goods and services, bypassing the open-source requirements of AGPL-3.0. If your scenario involves embedding our solutions into a commercial offering, reach out through [Ultralytics Licensing](https://ultralytics.com/license).
|
451 |
+
|
452 |
+
## <div align="center">Contact</div>
|
453 |
+
|
454 |
+
For YOLOv5 bug reports and feature requests please visit [GitHub Issues](https://github.com/ultralytics/yolov5/issues), and join our [Discord](https://ultralytics.com/discord) community for questions and discussions!
|
455 |
+
|
456 |
+
<br>
|
457 |
+
<div align="center">
|
458 |
+
<a href="https://github.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-github.png" width="3%" alt="Ultralytics GitHub"></a>
|
459 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%">
|
460 |
+
<a href="https://www.linkedin.com/company/ultralytics/"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-linkedin.png" width="3%" alt="Ultralytics LinkedIn"></a>
|
461 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%">
|
462 |
+
<a href="https://twitter.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-twitter.png" width="3%" alt="Ultralytics Twitter"></a>
|
463 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%">
|
464 |
+
<a href="https://youtube.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-youtube.png" width="3%" alt="Ultralytics YouTube"></a>
|
465 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%">
|
466 |
+
<a href="https://www.tiktok.com/@ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-tiktok.png" width="3%" alt="Ultralytics TikTok"></a>
|
467 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%">
|
468 |
+
<a href="https://www.instagram.com/ultralytics/"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-instagram.png" width="3%" alt="Ultralytics Instagram"></a>
|
469 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%">
|
470 |
+
<a href="https://ultralytics.com/discord"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-discord.png" width="3%" alt="Ultralytics Discord"></a>
|
471 |
+
</div>
|
472 |
+
|
473 |
+
[tta]: https://docs.ultralytics.com/yolov5/tutorials/test_time_augmentation
|
models/yolov5/README.zh-CN.md
ADDED
@@ -0,0 +1,473 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div align="center">
|
2 |
+
<p>
|
3 |
+
<a href="http://www.ultralytics.com/blog/ultralytics-yolov8-turns-one-a-year-of-breakthroughs-and-innovations" target="_blank">
|
4 |
+
<img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/main/yolov8/banner-yolov8.png"></a>
|
5 |
+
<!--
|
6 |
+
<a align="center" href="https://ultralytics.com/yolov5" target="_blank">
|
7 |
+
<img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/main/yolov5/v70/splash.png"></a>
|
8 |
+
-->
|
9 |
+
</p>
|
10 |
+
|
11 |
+
[中文](https://docs.ultralytics.com/zh/) | [한국어](https://docs.ultralytics.com/ko/) | [日本語](https://docs.ultralytics.com/ja/) | [Русский](https://docs.ultralytics.com/ru/) | [Deutsch](https://docs.ultralytics.com/de/) | [Français](https://docs.ultralytics.com/fr/) | [Español](https://docs.ultralytics.com/es/) | [Português](https://docs.ultralytics.com/pt/) | [हिन्दी](https://docs.ultralytics.com/hi/) | [العربية](https://docs.ultralytics.com/ar/)
|
12 |
+
|
13 |
+
<div>
|
14 |
+
<a href="https://github.com/ultralytics/yolov5/actions/workflows/ci-testing.yml"><img src="https://github.com/ultralytics/yolov5/actions/workflows/ci-testing.yml/badge.svg" alt="YOLOv5 CI"></a>
|
15 |
+
<a href="https://zenodo.org/badge/latestdoi/264818686"><img src="https://zenodo.org/badge/264818686.svg" alt="YOLOv5 Citation"></a>
|
16 |
+
<a href="https://hub.docker.com/r/ultralytics/yolov5"><img src="https://img.shields.io/docker/pulls/ultralytics/yolov5?logo=docker" alt="Docker Pulls"></a>
|
17 |
+
<br>
|
18 |
+
<a href="https://bit.ly/yolov5-paperspace-notebook"><img src="https://assets.paperspace.io/img/gradient-badge.svg" alt="Run on Gradient"></a>
|
19 |
+
<a href="https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a>
|
20 |
+
<a href="https://www.kaggle.com/ultralytics/yolov5"><img src="https://kaggle.com/static/images/open-in-kaggle.svg" alt="Open In Kaggle"></a>
|
21 |
+
</div>
|
22 |
+
<br>
|
23 |
+
|
24 |
+
YOLOv5 🚀 是世界上最受欢迎的视觉 AI,代表<a href="https://ultralytics.com"> Ultralytics </a>对未来视觉 AI 方法的开源研究,结合在数千小时的研究和开发中积累的经验教训和最佳实践。
|
25 |
+
|
26 |
+
我们希望这里的资源能帮助您充分利用 YOLOv5。请浏览 YOLOv5 <a href="https://docs.ultralytics.com/yolov5/">文档</a> 了解详细信息,在 <a href="https://github.com/ultralytics/yolov5/issues/new/choose">GitHub</a> 上提交问题以获得支持,并加入我们的 <a href="https://ultralytics.com/discord">Discord</a> 社区进行问题和讨论!
|
27 |
+
|
28 |
+
如需申请企业许可,请在 [Ultralytics Licensing](https://ultralytics.com/license) 处填写表格
|
29 |
+
|
30 |
+
<div align="center">
|
31 |
+
<a href="https://github.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-github.png" width="2%" alt="Ultralytics GitHub"></a>
|
32 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%">
|
33 |
+
<a href="https://www.linkedin.com/company/ultralytics/"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-linkedin.png" width="2%" alt="Ultralytics LinkedIn"></a>
|
34 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%">
|
35 |
+
<a href="https://twitter.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-twitter.png" width="2%" alt="Ultralytics Twitter"></a>
|
36 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%">
|
37 |
+
<a href="https://youtube.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-youtube.png" width="2%" alt="Ultralytics YouTube"></a>
|
38 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%">
|
39 |
+
<a href="https://www.tiktok.com/@ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-tiktok.png" width="2%" alt="Ultralytics TikTok"></a>
|
40 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%">
|
41 |
+
<a href="https://www.instagram.com/ultralytics/"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-instagram.png" width="2%" alt="Ultralytics Instagram"></a>
|
42 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%">
|
43 |
+
<a href="https://ultralytics.com/discord"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-discord.png" width="2%" alt="Ultralytics Discord"></a>
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
|
47 |
+
## <div align="center">YOLOv8 🚀 新品</div>
|
48 |
+
|
49 |
+
我们很高兴宣布 Ultralytics YOLOv8 🚀 的发布,这是我们新推出的领先水平、最先进的(SOTA)模型,发布于 **[https://github.com/ultralytics/ultralytics](https://github.com/ultralytics/ultralytics)**。 YOLOv8 旨在快速、准确且易于使用,使其成为广泛的物体检测、图像分割和图像分类任务的极佳选择。
|
50 |
+
|
51 |
+
请查看 [YOLOv8 文档](https://docs.ultralytics.com)了解详细信息,并开始使用:
|
52 |
+
|
53 |
+
[![PyPI 版本](https://badge.fury.io/py/ultralytics.svg)](https://badge.fury.io/py/ultralytics) [![下载量](https://static.pepy.tech/badge/ultralytics)](https://pepy.tech/project/ultralytics)
|
54 |
+
|
55 |
+
```commandline
|
56 |
+
pip install ultralytics
|
57 |
+
```
|
58 |
+
|
59 |
+
<div align="center">
|
60 |
+
<a href="https://ultralytics.com/yolov8" target="_blank">
|
61 |
+
<img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/main/yolov8/yolo-comparison-plots.png"></a>
|
62 |
+
</div>
|
63 |
+
|
64 |
+
## <div align="center">文档</div>
|
65 |
+
|
66 |
+
有关训练、测试和部署的完整文档见[YOLOv5 文档](https://docs.ultralytics.com/yolov5/)。请参阅下面的快速入门示例。
|
67 |
+
|
68 |
+
<details open>
|
69 |
+
<summary>安装</summary>
|
70 |
+
|
71 |
+
克隆 repo,并要求在 [**Python>=3.8.0**](https://www.python.org/) 环境中安装 [requirements.txt](https://github.com/ultralytics/yolov5/blob/master/requirements.txt) ,且要求 [**PyTorch>=1.8**](https://pytorch.org/get-started/locally/) 。
|
72 |
+
|
73 |
+
```bash
|
74 |
+
git clone https://github.com/ultralytics/yolov5 # clone
|
75 |
+
cd yolov5
|
76 |
+
pip install -r requirements.txt # install
|
77 |
+
```
|
78 |
+
|
79 |
+
</details>
|
80 |
+
|
81 |
+
<details>
|
82 |
+
<summary>推理</summary>
|
83 |
+
|
84 |
+
使用 YOLOv5 [PyTorch Hub](https://docs.ultralytics.com/yolov5/tutorials/pytorch_hub_model_loading) 推理。最新 [模型](https://github.com/ultralytics/yolov5/tree/master/models) 将自动的从 YOLOv5 [release](https://github.com/ultralytics/yolov5/releases) 中下载。
|
85 |
+
|
86 |
+
```python
|
87 |
+
import torch
|
88 |
+
|
89 |
+
# Model
|
90 |
+
model = torch.hub.load("ultralytics/yolov5", "yolov5s") # or yolov5n - yolov5x6, custom
|
91 |
+
|
92 |
+
# Images
|
93 |
+
img = "https://ultralytics.com/images/zidane.jpg" # or file, Path, PIL, OpenCV, numpy, list
|
94 |
+
|
95 |
+
# Inference
|
96 |
+
results = model(img)
|
97 |
+
|
98 |
+
# Results
|
99 |
+
results.print() # or .show(), .save(), .crop(), .pandas(), etc.
|
100 |
+
```
|
101 |
+
|
102 |
+
</details>
|
103 |
+
|
104 |
+
<details>
|
105 |
+
<summary>使用 detect.py 推理</summary>
|
106 |
+
|
107 |
+
`detect.py` 在各种来源上运行推理, [模型](https://github.com/ultralytics/yolov5/tree/master/models) 自动从 最新的YOLOv5 [release](https://github.com/ultralytics/yolov5/releases) 中下载,并将结果保存到 `runs/detect` 。
|
108 |
+
|
109 |
+
```bash
|
110 |
+
python detect.py --weights yolov5s.pt --source 0 # webcam
|
111 |
+
img.jpg # image
|
112 |
+
vid.mp4 # video
|
113 |
+
screen # screenshot
|
114 |
+
path/ # directory
|
115 |
+
list.txt # list of images
|
116 |
+
list.streams # list of streams
|
117 |
+
'path/*.jpg' # glob
|
118 |
+
'https://youtu.be/LNwODJXcvt4' # YouTube
|
119 |
+
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
|
120 |
+
```
|
121 |
+
|
122 |
+
</details>
|
123 |
+
|
124 |
+
<details>
|
125 |
+
<summary>训练</summary>
|
126 |
+
|
127 |
+
下面的命令重现 YOLOv5 在 [COCO](https://github.com/ultralytics/yolov5/blob/master/data/scripts/get_coco.sh) 数据集上的结果。 最新的 [模型](https://github.com/ultralytics/yolov5/tree/master/models) 和 [数据集](https://github.com/ultralytics/yolov5/tree/master/data)
|
128 |
+
将自动的从 YOLOv5 [release](https://github.com/ultralytics/yolov5/releases) 中下载。 YOLOv5n/s/m/l/x 在 V100 GPU 的训练时间为 1/2/4/6/8 天( [多GPU](https://docs.ultralytics.com/yolov5/tutorials/multi_gpu_training) 训练速度更快)。 尽可能使用更大的 `--batch-size` ,或通过 `--batch-size -1` 实现 YOLOv5 [自动批处理](https://github.com/ultralytics/yolov5/pull/5092) 。下方显示的 batchsize 适用于 V100-16GB。
|
129 |
+
|
130 |
+
```bash
|
131 |
+
python train.py --data coco.yaml --epochs 300 --weights '' --cfg yolov5n.yaml --batch-size 128
|
132 |
+
yolov5s 64
|
133 |
+
yolov5m 40
|
134 |
+
yolov5l 24
|
135 |
+
yolov5x 16
|
136 |
+
```
|
137 |
+
|
138 |
+
<img width="800" src="https://user-images.githubusercontent.com/26833433/90222759-949d8800-ddc1-11ea-9fa1-1c97eed2b963.png">
|
139 |
+
|
140 |
+
</details>
|
141 |
+
|
142 |
+
<details open>
|
143 |
+
<summary>教程</summary>
|
144 |
+
|
145 |
+
- [训练自定义数据](https://docs.ultralytics.com/yolov5/tutorials/train_custom_data) 🚀 推荐
|
146 |
+
- [获得最佳训练结果的技巧](https://docs.ultralytics.com/yolov5/tutorials/tips_for_best_training_results) ☘️
|
147 |
+
- [多GPU训练](https://docs.ultralytics.com/yolov5/tutorials/multi_gpu_training)
|
148 |
+
- [PyTorch Hub](https://docs.ultralytics.com/yolov5/tutorials/pytorch_hub_model_loading) 🌟 新
|
149 |
+
- [TFLite,ONNX,CoreML,TensorRT导出](https://docs.ultralytics.com/yolov5/tutorials/model_export) 🚀
|
150 |
+
- [NVIDIA Jetson平台部署](https://docs.ultralytics.com/yolov5/tutorials/running_on_jetson_nano) 🌟 新
|
151 |
+
- [测试时增强 (TTA)](https://docs.ultralytics.com/yolov5/tutorials/test_time_augmentation)
|
152 |
+
- [模型集成](https://docs.ultralytics.com/yolov5/tutorials/model_ensembling)
|
153 |
+
- [模型剪枝/稀疏](https://docs.ultralytics.com/yolov5/tutorials/model_pruning_and_sparsity)
|
154 |
+
- [超参数进化](https://docs.ultralytics.com/yolov5/tutorials/hyperparameter_evolution)
|
155 |
+
- [冻结层的迁移学习](https://docs.ultralytics.com/yolov5/tutorials/transfer_learning_with_frozen_layers)
|
156 |
+
- [架构概述](https://docs.ultralytics.com/yolov5/tutorials/architecture_description) 🌟 新
|
157 |
+
- [Roboflow用于数据集、标注和主动学习](https://docs.ultralytics.com/yolov5/tutorials/roboflow_datasets_integration)
|
158 |
+
- [ClearML日志记录](https://docs.ultralytics.com/yolov5/tutorials/clearml_logging_integration) 🌟 新
|
159 |
+
- [使用Neural Magic的Deepsparse的YOLOv5](https://docs.ultralytics.com/yolov5/tutorials/neural_magic_pruning_quantization) 🌟 新
|
160 |
+
- [Comet日志记录](https://docs.ultralytics.com/yolov5/tutorials/comet_logging_integration) 🌟 新
|
161 |
+
|
162 |
+
</details>
|
163 |
+
|
164 |
+
## <div align="center">模块集成</div>
|
165 |
+
|
166 |
+
<br>
|
167 |
+
<a align="center" href="https://bit.ly/ultralytics_hub" target="_blank">
|
168 |
+
<img width="100%" src="https://github.com/ultralytics/assets/raw/main/im/integrations-loop.png"></a>
|
169 |
+
<br>
|
170 |
+
<br>
|
171 |
+
|
172 |
+
<div align="center">
|
173 |
+
<a href="https://roboflow.com/?ref=ultralytics">
|
174 |
+
<img src="https://github.com/ultralytics/assets/raw/main/partners/logo-roboflow.png" width="10%" /></a>
|
175 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="15%" height="0" alt="" />
|
176 |
+
<a href="https://cutt.ly/yolov5-readme-clearml">
|
177 |
+
<img src="https://github.com/ultralytics/assets/raw/main/partners/logo-clearml.png" width="10%" /></a>
|
178 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="15%" height="0" alt="" />
|
179 |
+
<a href="https://bit.ly/yolov5-readme-comet2">
|
180 |
+
<img src="https://github.com/ultralytics/assets/raw/main/partners/logo-comet.png" width="10%" /></a>
|
181 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="15%" height="0" alt="" />
|
182 |
+
<a href="https://bit.ly/yolov5-neuralmagic">
|
183 |
+
<img src="https://github.com/ultralytics/assets/raw/main/partners/logo-neuralmagic.png" width="10%" /></a>
|
184 |
+
</div>
|
185 |
+
|
186 |
+
| Roboflow | ClearML ⭐ 新 | Comet ⭐ 新 | Neural Magic ⭐ 新 |
|
187 |
+
| :--------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------: |
|
188 |
+
| 将您的自定义数据集进行标注并直接导出到 YOLOv5 以进行训练 [Roboflow](https://roboflow.com/?ref=ultralytics) | 自动跟踪、可视化甚至远程训练 YOLOv5 [ClearML](https://cutt.ly/yolov5-readme-clearml)(开源!) | 永远免费,[Comet](https://bit.ly/yolov5-readme-comet2)可让您保存 YOLOv5 模型、恢复训练以及交互式可视化和调试预测 | 使用 [Neural Magic DeepSparse](https://bit.ly/yolov5-neuralmagic),运行 YOLOv5 推理的速度最高可提高6倍 |
|
189 |
+
|
190 |
+
## <div align="center">Ultralytics HUB</div>
|
191 |
+
|
192 |
+
[Ultralytics HUB](https://bit.ly/ultralytics_hub) 是我们的⭐**新的**用于可视化数据集、训练 YOLOv5 🚀 模型并以无缝体验部署到现实世界的无代码解决方案。现在开始 **免费** 使用他!
|
193 |
+
|
194 |
+
<a align="center" href="https://bit.ly/ultralytics_hub" target="_blank">
|
195 |
+
<img width="100%" src="https://github.com/ultralytics/assets/raw/main/im/ultralytics-hub.png"></a>
|
196 |
+
|
197 |
+
## <div align="center">为什么选择 YOLOv5</div>
|
198 |
+
|
199 |
+
YOLOv5 超级容易上手,简单易学。我们优先考虑现实世界的结果。
|
200 |
+
|
201 |
+
<p align="left"><img width="800" src="https://user-images.githubusercontent.com/26833433/155040763-93c22a27-347c-4e3c-847a-8094621d3f4e.png"></p>
|
202 |
+
<details>
|
203 |
+
<summary>YOLOv5-P5 640 图</summary>
|
204 |
+
|
205 |
+
<p align="left"><img width="800" src="https://user-images.githubusercontent.com/26833433/155040757-ce0934a3-06a6-43dc-a979-2edbbd69ea0e.png"></p>
|
206 |
+
</details>
|
207 |
+
<details>
|
208 |
+
<summary>图表笔记</summary>
|
209 |
+
|
210 |
+
- **COCO AP val** 表示 mAP@0.5:0.95 指标,在 [COCO val2017](http://cocodataset.org) 数据集的 5000 张图像上测得, 图像包含 256 到 1536 各种推理大小。
|
211 |
+
- **显卡推理速度** 为在 [COCO val2017](http://cocodataset.org) 数据集上���平均推理时间,使用 [AWS p3.2xlarge](https://aws.amazon.com/ec2/instance-types/p3/) V100实例,batchsize 为 32 。
|
212 |
+
- **EfficientDet** 数据来自 [google/automl](https://github.com/google/automl) , batchsize 为32。
|
213 |
+
- **复现命令** 为 `python val.py --task study --data coco.yaml --iou 0.7 --weights yolov5n6.pt yolov5s6.pt yolov5m6.pt yolov5l6.pt yolov5x6.pt`
|
214 |
+
|
215 |
+
</details>
|
216 |
+
|
217 |
+
### 预训练模型
|
218 |
+
|
219 |
+
| 模型 | 尺寸<br><sup>(像素) | mAP<sup>val<br>50-95 | mAP<sup>val<br>50 | 推理速度<br><sup>CPU b1<br>(ms) | 推理速度<br><sup>V100 b1<br>(ms) | 速度<br><sup>V100 b32<br>(ms) | 参数量<br><sup>(M) | FLOPs<br><sup>@640 (B) |
|
220 |
+
| ---------------------------------------------------------------------------------------------- | --------------------- | -------------------- | ----------------- | --------------------------------- | ---------------------------------- | ------------------------------- | ------------------ | ---------------------- |
|
221 |
+
| [YOLOv5n](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5n.pt) | 640 | 28.0 | 45.7 | **45** | **6.3** | **0.6** | **1.9** | **4.5** |
|
222 |
+
| [YOLOv5s](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s.pt) | 640 | 37.4 | 56.8 | 98 | 6.4 | 0.9 | 7.2 | 16.5 |
|
223 |
+
| [YOLOv5m](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5m.pt) | 640 | 45.4 | 64.1 | 224 | 8.2 | 1.7 | 21.2 | 49.0 |
|
224 |
+
| [YOLOv5l](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5l.pt) | 640 | 49.0 | 67.3 | 430 | 10.1 | 2.7 | 46.5 | 109.1 |
|
225 |
+
| [YOLOv5x](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5x.pt) | 640 | 50.7 | 68.9 | 766 | 12.1 | 4.8 | 86.7 | 205.7 |
|
226 |
+
| | | | | | | | | |
|
227 |
+
| [YOLOv5n6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5n6.pt) | 1280 | 36.0 | 54.4 | 153 | 8.1 | 2.1 | 3.2 | 4.6 |
|
228 |
+
| [YOLOv5s6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s6.pt) | 1280 | 44.8 | 63.7 | 385 | 8.2 | 3.6 | 12.6 | 16.8 |
|
229 |
+
| [YOLOv5m6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5m6.pt) | 1280 | 51.3 | 69.3 | 887 | 11.1 | 6.8 | 35.7 | 50.0 |
|
230 |
+
| [YOLOv5l6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5l6.pt) | 1280 | 53.7 | 71.3 | 1784 | 15.8 | 10.5 | 76.8 | 111.4 |
|
231 |
+
| [YOLOv5x6](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5x6.pt)<br>+[TTA] | 1280<br>1536 | 55.0<br>**55.8** | 72.7<br>**72.7** | 3136<br>- | 26.2<br>- | 19.4<br>- | 140.7<br>- | 209.8<br>- |
|
232 |
+
|
233 |
+
<details>
|
234 |
+
<summary>笔记</summary>
|
235 |
+
|
236 |
+
- 所有模型都使用默认配置,训练 300 epochs。n和s模型使用 [hyp.scratch-low.yaml](https://github.com/ultralytics/yolov5/blob/master/data/hyps/hyp.scratch-low.yaml) ,其他模型都使用 [hyp.scratch-high.yaml](https://github.com/ultralytics/yolov5/blob/master/data/hyps/hyp.scratch-high.yaml) 。
|
237 |
+
- \*\*mAP<sup>val</sup>\*\*在单模型单尺度上计算,数据集使用 [COCO val2017](http://cocodataset.org) 。<br>复现命令 `python val.py --data coco.yaml --img 640 --conf 0.001 --iou 0.65`
|
238 |
+
- **推理速度**在 COCO val 图像总体时间上进行平均得到,测试环境使用[AWS p3.2xlarge](https://aws.amazon.com/ec2/instance-types/p3/)实例。 NMS 时间 (大约 1 ms/img) 不包括在内。<br>复现命令 `python val.py --data coco.yaml --img 640 --task speed --batch 1`
|
239 |
+
- **TTA** [测试时数据增强](https://docs.ultralytics.com/yolov5/tutorials/test_time_augmentation) 包括反射和尺度变换。<br>复现命令 `python val.py --data coco.yaml --img 1536 --iou 0.7 --augment`
|
240 |
+
|
241 |
+
</details>
|
242 |
+
|
243 |
+
## <div align="center">实例分割模型 ⭐ 新</div>
|
244 |
+
|
245 |
+
我们新的 YOLOv5 [release v7.0](https://github.com/ultralytics/yolov5/releases/v7.0) 实例分割模型是世界上最快和最准确的模型,击败所有当前 [SOTA 基准](https://paperswithcode.com/sota/real-time-instance-segmentation-on-mscoco)。我们使它非常易于训练、验证和部署。更多细节请查看 [发行说明](https://github.com/ultralytics/yolov5/releases/v7.0) 或访问我们的 [YOLOv5 分割 Colab 笔记本](https://github.com/ultralytics/yolov5/blob/master/segment/tutorial.ipynb) 以快速入门。
|
246 |
+
|
247 |
+
<details>
|
248 |
+
<summary>实例分割模型列表</summary>
|
249 |
+
|
250 |
+
<br>
|
251 |
+
|
252 |
+
<div align="center">
|
253 |
+
<a align="center" href="https://ultralytics.com/yolov5" target="_blank">
|
254 |
+
<img width="800" src="https://user-images.githubusercontent.com/61612323/204180385-84f3aca9-a5e9-43d8-a617-dda7ca12e54a.png"></a>
|
255 |
+
</div>
|
256 |
+
|
257 |
+
我们使用 A100 GPU 在 COCO 上以 640 图像大小训练了 300 epochs 得到 YOLOv5 分割模型。我们将所有模型导出到 ONNX FP32 以进行 CPU 速度测试,并导出到 TensorRT FP16 以进行 GPU 速度测试。为了便于再现,我们在 Google [Colab Pro](https://colab.research.google.com/signup) 上进行了所有速度测试。
|
258 |
+
|
259 |
+
| 模型 | 尺寸<br><sup>(像素) | mAP<sup>box<br>50-95 | mAP<sup>mask<br>50-95 | 训练时长<br><sup>300 epochs<br>A100 GPU(小时) | 推理速度<br><sup>ONNX CPU<br>(ms) | 推理速度<br><sup>TRT A100<br>(ms) | 参数量<br><sup>(M) | FLOPs<br><sup>@640 (B) |
|
260 |
+
| ------------------------------------------------------------------------------------------ | --------------------- | -------------------- | --------------------- | ----------------------------------------------- | ----------------------------------- | ----------------------------------- | ------------------ | ---------------------- |
|
261 |
+
| [YOLOv5n-seg](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5n-seg.pt) | 640 | 27.6 | 23.4 | 80:17 | **62.7** | **1.2** | **2.0** | **7.1** |
|
262 |
+
| [YOLOv5s-seg](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s-seg.pt) | 640 | 37.6 | 31.7 | 88:16 | 173.3 | 1.4 | 7.6 | 26.4 |
|
263 |
+
| [YOLOv5m-seg](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5m-seg.pt) | 640 | 45.0 | 37.1 | 108:36 | 427.0 | 2.2 | 22.0 | 70.8 |
|
264 |
+
| [YOLOv5l-seg](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5l-seg.pt) | 640 | 49.0 | 39.9 | 66:43 (2x) | 857.4 | 2.9 | 47.9 | 147.7 |
|
265 |
+
| [YOLOv5x-seg](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5x-seg.pt) | 640 | **50.7** | **41.4** | 62:56 (3x) | 1579.2 | 4.5 | 88.8 | 265.7 |
|
266 |
+
|
267 |
+
- 所有模型使用 SGD 优化器训练, 都使用 `lr0=0.01` 和 `weight_decay=5e-5` 参数, 图像大小为 640 。<br>训练 log 可以查看 https://wandb.ai/glenn-jocher/YOLOv5_v70_official
|
268 |
+
- **准确性**结果都在 COCO 数据集上,使用单模型单尺度测试得到。<br>复现命令 `python segment/val.py --data coco.yaml --weights yolov5s-seg.pt`
|
269 |
+
- **推理速度**是使用 100 张图像推理时间进行平均得到,测试环境使用 [Colab Pro](https://colab.research.google.com/signup) 上 A100 高 RAM 实例。结果仅表示推理速度(NMS 每张图像增加约 1 毫秒)。<br>复现命令 `python segment/val.py --data coco.yaml --weights yolov5s-seg.pt --batch 1`
|
270 |
+
- **模型转换**到 FP32 的 ONNX 和 FP16 的 TensorRT 脚本为 `export.py`.<br>运行命令 `python export.py --weights yolov5s-seg.pt --include engine --device 0 --half`
|
271 |
+
|
272 |
+
</details>
|
273 |
+
|
274 |
+
<details>
|
275 |
+
<summary>分割模型使用示例 <a href="https://colab.research.google.com/github/ultralytics/yolov5/blob/master/segment/tutorial.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a></summary>
|
276 |
+
|
277 |
+
### 训练
|
278 |
+
|
279 |
+
YOLOv5分割训练支持自动下载 COCO128-seg 分割数据集,用户仅需在启动指令中包含 `--data coco128-seg.yaml` 参数。 若要手动下载,使用命令 `bash data/scripts/get_coco.sh --train --val --segments`, 在下载完毕后,使用命令 `python train.py --data coco.yaml` 开启训练。
|
280 |
+
|
281 |
+
```bash
|
282 |
+
# 单 GPU
|
283 |
+
python segment/train.py --data coco128-seg.yaml --weights yolov5s-seg.pt --img 640
|
284 |
+
|
285 |
+
# 多 GPU, DDP 模式
|
286 |
+
python -m torch.distributed.run --nproc_per_node 4 --master_port 1 segment/train.py --data coco128-seg.yaml --weights yolov5s-seg.pt --img 640 --device 0,1,2,3
|
287 |
+
```
|
288 |
+
|
289 |
+
### 验证
|
290 |
+
|
291 |
+
在 COCO 数据集上验证 YOLOv5s-seg mask mAP:
|
292 |
+
|
293 |
+
```bash
|
294 |
+
bash data/scripts/get_coco.sh --val --segments # 下载 COCO val segments 数据集 (780MB, 5000 images)
|
295 |
+
python segment/val.py --weights yolov5s-seg.pt --data coco.yaml --img 640 # 验证
|
296 |
+
```
|
297 |
+
|
298 |
+
### 预测
|
299 |
+
|
300 |
+
使用预训练的 YOLOv5m-seg.pt 来预测 bus.jpg:
|
301 |
+
|
302 |
+
```bash
|
303 |
+
python segment/predict.py --weights yolov5m-seg.pt --source data/images/bus.jpg
|
304 |
+
```
|
305 |
+
|
306 |
+
```python
|
307 |
+
model = torch.hub.load(
|
308 |
+
"ultralytics/yolov5", "custom", "yolov5m-seg.pt"
|
309 |
+
) # 从load from PyTorch Hub 加载模型 (WARNING: 推理暂未支持)
|
310 |
+
```
|
311 |
+
|
312 |
+
| ![zidane](https://user-images.githubusercontent.com/26833433/203113421-decef4c4-183d-4a0a-a6c2-6435b33bc5d3.jpg) | ![bus](https://user-images.githubusercontent.com/26833433/203113416-11fe0025-69f7-4874-a0a6-65d0bfe2999a.jpg) |
|
313 |
+
| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
314 |
+
|
315 |
+
### 模型导出
|
316 |
+
|
317 |
+
将 YOLOv5s-seg 模型导出到 ONNX 和 TensorRT:
|
318 |
+
|
319 |
+
```bash
|
320 |
+
python export.py --weights yolov5s-seg.pt --include onnx engine --img 640 --device 0
|
321 |
+
```
|
322 |
+
|
323 |
+
</details>
|
324 |
+
|
325 |
+
## <div align="center">分类网络 ⭐ 新</div>
|
326 |
+
|
327 |
+
YOLOv5 [release v6.2](https://github.com/ultralytics/yolov5/releases) 带来对分类模型训练、验证和部署的支持!详情请查看 [发行说明](https://github.com/ultralytics/yolov5/releases/v6.2) 或访问我们的 [YOLOv5 分类 Colab 笔记本](https://github.com/ultralytics/yolov5/blob/master/classify/tutorial.ipynb) 以快速入门。
|
328 |
+
|
329 |
+
<details>
|
330 |
+
<summary>分类网络模型</summary>
|
331 |
+
|
332 |
+
<br>
|
333 |
+
|
334 |
+
我们使用 4xA100 实例在 ImageNet 上训练了 90 个 epochs 得到 YOLOv5-cls 分类模型,我们训练了 ResNet 和 EfficientNet 模型以及相同的默认训练设置以进行比较。我们将所有模型导出到 ONNX FP32 以进行 CPU 速度测试,并导出到 TensorRT FP16 以进行 GPU 速度测试。为了便于重现,我们在 Google 上进行了所有速度测试 [Colab Pro](https://colab.research.google.com/signup) 。
|
335 |
+
|
336 |
+
| 模型 | 尺寸<br><sup>(像素) | acc<br><sup>top1 | acc<br><sup>top5 | 训练时长<br><sup>90 epochs<br>4xA100(小时) | 推理速度<br><sup>ONNX CPU<br>(ms) | 推理速度<br><sup>TensorRT V100<br>(ms) | 参数<br><sup>(M) | FLOPs<br><sup>@640 (B) |
|
337 |
+
| -------------------------------------------------------------------------------------------------- | --------------------- | ---------------- | ---------------- | -------------------------------------------- | ----------------------------------- | ---------------------------------------- | ---------------- | ---------------------- |
|
338 |
+
| [YOLOv5n-cls](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5n-cls.pt) | 224 | 64.6 | 85.4 | 7:59 | **3.3** | **0.5** | **2.5** | **0.5** |
|
339 |
+
| [YOLOv5s-cls](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s-cls.pt) | 224 | 71.5 | 90.2 | 8:09 | 6.6 | 0.6 | 5.4 | 1.4 |
|
340 |
+
| [YOLOv5m-cls](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5m-cls.pt) | 224 | 75.9 | 92.9 | 10:06 | 15.5 | 0.9 | 12.9 | 3.9 |
|
341 |
+
| [YOLOv5l-cls](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5l-cls.pt) | 224 | 78.0 | 94.0 | 11:56 | 26.9 | 1.4 | 26.5 | 8.5 |
|
342 |
+
| [YOLOv5x-cls](https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5x-cls.pt) | 224 | **79.0** | **94.4** | 15:04 | 54.3 | 1.8 | 48.1 | 15.9 |
|
343 |
+
| | | | | | | | | |
|
344 |
+
| [ResNet18](https://github.com/ultralytics/yolov5/releases/download/v7.0/resnet18.pt) | 224 | 70.3 | 89.5 | **6:47** | 11.2 | 0.5 | 11.7 | 3.7 |
|
345 |
+
| [Resnetzch](https://github.com/ultralytics/yolov5/releases/download/v7.0/resnet34.pt) | 224 | 73.9 | 91.8 | 8:33 | 20.6 | 0.9 | 21.8 | 7.4 |
|
346 |
+
| [ResNet50](https://github.com/ultralytics/yolov5/releases/download/v7.0/resnet50.pt) | 224 | 76.8 | 93.4 | 11:10 | 23.4 | 1.0 | 25.6 | 8.5 |
|
347 |
+
| [ResNet101](https://github.com/ultralytics/yolov5/releases/download/v7.0/resnet101.pt) | 224 | 78.5 | 94.3 | 17:10 | 42.1 | 1.9 | 44.5 | 15.9 |
|
348 |
+
| | | | | | | | | |
|
349 |
+
| [EfficientNet_b0](https://github.com/ultralytics/yolov5/releases/download/v7.0/efficientnet_b0.pt) | 224 | 75.1 | 92.4 | 13:03 | 12.5 | 1.3 | 5.3 | 1.0 |
|
350 |
+
| [EfficientNet_b1](https://github.com/ultralytics/yolov5/releases/download/v7.0/efficientnet_b1.pt) | 224 | 76.4 | 93.2 | 17:04 | 14.9 | 1.6 | 7.8 | 1.5 |
|
351 |
+
| [EfficientNet_b2](https://github.com/ultralytics/yolov5/releases/download/v7.0/efficientnet_b2.pt) | 224 | 76.6 | 93.4 | 17:10 | 15.9 | 1.6 | 9.1 | 1.7 |
|
352 |
+
| [EfficientNet_b3](https://github.com/ultralytics/yolov5/releases/download/v7.0/efficientnet_b3.pt) | 224 | 77.7 | 94.0 | 19:19 | 18.9 | 1.9 | 12.2 | 2.4 |
|
353 |
+
|
354 |
+
<details>
|
355 |
+
<summary>Table Notes (点击以展开)</summary>
|
356 |
+
|
357 |
+
- 所有模型都使用 SGD 优化器训练 90 个 epochs,都使用 `lr0=0.001` 和 `weight_decay=5e-5` 参数, 图像大小为 224 ,且都使用默认设置。<br>训练 log 可以查看 https://wandb.ai/glenn-jocher/YOLOv5-Classifier-v6-2
|
358 |
+
- **准确性**都在单模型单尺度上计算,数据集使用 [ImageNet-1k](https://www.image-net.org/index.php) 。<br>复现命令 `python classify/val.py --data ../datasets/imagenet --img 224`
|
359 |
+
- **推理速度**是使用 100 个推理图像进行平均得到,测试环境使用谷歌 [Colab Pro](https://colab.research.google.com/signup) V100 高 RAM 实例。<br>复现命令 `python classify/val.py --data ../datasets/imagenet --img 224 --batch 1`
|
360 |
+
- **模型导出**到 FP32 的 ONNX 和 FP16 的 TensorRT 使用 `export.py` 。<br>复现命令 `python export.py --weights yolov5s-cls.pt --include engine onnx --imgsz 224`
|
361 |
+
</details>
|
362 |
+
</details>
|
363 |
+
|
364 |
+
<details>
|
365 |
+
<summary>分类训练示例 <a href="https://colab.research.google.com/github/ultralytics/yolov5/blob/master/classify/tutorial.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a></summary>
|
366 |
+
|
367 |
+
### 训练
|
368 |
+
|
369 |
+
YOLOv5 分类训练支持自动下载 MNIST、Fashion-MNIST、CIFAR10、CIFAR100、Imagenette、Imagewoof 和 ImageNet 数据集,命令中使用 `--data` 即可。 MNIST 示例 `--data mnist` 。
|
370 |
+
|
371 |
+
```bash
|
372 |
+
# 单 GPU
|
373 |
+
python classify/train.py --model yolov5s-cls.pt --data cifar100 --epochs 5 --img 224 --batch 128
|
374 |
+
|
375 |
+
# 多 GPU, DDP 模式
|
376 |
+
python -m torch.distributed.run --nproc_per_node 4 --master_port 1 classify/train.py --model yolov5s-cls.pt --data imagenet --epochs 5 --img 224 --device 0,1,2,3
|
377 |
+
```
|
378 |
+
|
379 |
+
### 验证
|
380 |
+
|
381 |
+
在 ImageNet-1k 数据集上验证 YOLOv5m-cls 的准确性:
|
382 |
+
|
383 |
+
```bash
|
384 |
+
bash data/scripts/get_imagenet.sh --val # download ImageNet val split (6.3G, 50000 images)
|
385 |
+
python classify/val.py --weights yolov5m-cls.pt --data ../datasets/imagenet --img 224 # validate
|
386 |
+
```
|
387 |
+
|
388 |
+
### 预测
|
389 |
+
|
390 |
+
使用预训练的 YOLOv5s-cls.pt 来预测 bus.jpg:
|
391 |
+
|
392 |
+
```bash
|
393 |
+
python classify/predict.py --weights yolov5s-cls.pt --source data/images/bus.jpg
|
394 |
+
```
|
395 |
+
|
396 |
+
```python
|
397 |
+
model = torch.hub.load(
|
398 |
+
"ultralytics/yolov5", "custom", "yolov5s-cls.pt"
|
399 |
+
) # load from PyTorch Hub
|
400 |
+
```
|
401 |
+
|
402 |
+
### 模型导出
|
403 |
+
|
404 |
+
将一组经过训练的 YOLOv5s-cls、ResNet 和 EfficientNet 模型导出到 ONNX 和 TensorRT:
|
405 |
+
|
406 |
+
```bash
|
407 |
+
python export.py --weights yolov5s-cls.pt resnet50.pt efficientnet_b0.pt --include onnx engine --img 224
|
408 |
+
```
|
409 |
+
|
410 |
+
</details>
|
411 |
+
|
412 |
+
## <div align="center">环境</div>
|
413 |
+
|
414 |
+
使用下面我们经过验证的环境,在几秒钟内开始使用 YOLOv5 。单击下面的图标了解详细信息。
|
415 |
+
|
416 |
+
<div align="center">
|
417 |
+
<a href="https://bit.ly/yolov5-paperspace-notebook">
|
418 |
+
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-gradient.png" width="10%" /></a>
|
419 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="5%" alt="" />
|
420 |
+
<a href="https://colab.research.google.com/github/ultralytics/yolov5/blob/master/tutorial.ipynb">
|
421 |
+
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-colab-small.png" width="10%" /></a>
|
422 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="5%" alt="" />
|
423 |
+
<a href="https://www.kaggle.com/ultralytics/yolov5">
|
424 |
+
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-kaggle-small.png" width="10%" /></a>
|
425 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="5%" alt="" />
|
426 |
+
<a href="https://hub.docker.com/r/ultralytics/yolov5">
|
427 |
+
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-docker-small.png" width="10%" /></a>
|
428 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="5%" alt="" />
|
429 |
+
<a href="https://docs.ultralytics.com/yolov5/environments/aws_quickstart_tutorial/">
|
430 |
+
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-aws-small.png" width="10%" /></a>
|
431 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="5%" alt="" />
|
432 |
+
<a href="https://docs.ultralytics.com/yolov5/environments/google_cloud_quickstart_tutorial/">
|
433 |
+
<img src="https://github.com/ultralytics/yolov5/releases/download/v1.0/logo-gcp-small.png" width="10%" /></a>
|
434 |
+
</div>
|
435 |
+
|
436 |
+
## <div align="center">贡献</div>
|
437 |
+
|
438 |
+
我们喜欢您的意见或建议!我们希望尽可能简单和透明地为 YOLOv5 做出贡献。请看我们的 [投稿指南](https://docs.ultralytics.com/help/contributing/),并填写 [YOLOv5调查](https://ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey) 向我们发送您的体验反馈。感谢我们所有的贡献者!
|
439 |
+
|
440 |
+
<!-- SVG image from https://opencollective.com/ultralytics/contributors.svg?width=990 -->
|
441 |
+
|
442 |
+
<a href="https://github.com/ultralytics/yolov5/graphs/contributors">
|
443 |
+
<img src="https://github.com/ultralytics/assets/raw/main/im/image-contributors.png" /></a>
|
444 |
+
|
445 |
+
## <div align="center">许可证</div>
|
446 |
+
|
447 |
+
Ultralytics 提供两种许可证选项以适应各种使用场景:
|
448 |
+
|
449 |
+
- **AGPL-3.0 许可证**:这个[OSI 批准](https://opensource.org/licenses/)的开源许可证非常适合学生和爱好者,可以推动开放的协作和知识分享。请查看[LICENSE](https://github.com/ultralytics/yolov5/blob/master/LICENSE) 文件以了解更多细节。
|
450 |
+
- **企业许可证**:专为商业用途设计,该许可证允许将 Ultralytics 的软件和 AI 模型无缝集成到商业产品和服务中,从而绕过 AGPL-3.0 的开源要求。如果您的场景涉及将我们的解决方案嵌入到商业产品中,请通过 [Ultralytics Licensing](https://ultralytics.com/license)与我们联系。
|
451 |
+
|
452 |
+
## <div align="center">联系方式</div>
|
453 |
+
|
454 |
+
对于 Ultralytics 的错误报告和功能请求,请访问 [GitHub Issues](https://github.com/ultralytics/yolov5/issues),并加入我们的 [Discord](https://ultralytics.com/discord) 社区进行问题和讨论!
|
455 |
+
|
456 |
+
<br>
|
457 |
+
<div align="center">
|
458 |
+
<a href="https://github.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-github.png" width="3%" alt="Ultralytics GitHub"></a>
|
459 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%">
|
460 |
+
<a href="https://www.linkedin.com/company/ultralytics/"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-linkedin.png" width="3%" alt="Ultralytics LinkedIn"></a>
|
461 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%">
|
462 |
+
<a href="https://twitter.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-twitter.png" width="3%" alt="Ultralytics Twitter"></a>
|
463 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%">
|
464 |
+
<a href="https://youtube.com/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-youtube.png" width="3%" alt="Ultralytics YouTube"></a>
|
465 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%">
|
466 |
+
<a href="https://www.tiktok.com/@ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-tiktok.png" width="3%" alt="Ultralytics TikTok"></a>
|
467 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%">
|
468 |
+
<a href="https://www.instagram.com/ultralytics/"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-instagram.png" width="3%" alt="Ultralytics Instagram"></a>
|
469 |
+
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%">
|
470 |
+
<a href="https://ultralytics.com/discord"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-discord.png" width="3%" alt="Ultralytics Discord"></a>
|
471 |
+
</div>
|
472 |
+
|
473 |
+
[tta]: https://docs.ultralytics.com/yolov5/tutorials/test_time_augmentation
|
models/yolov5/__pycache__/export.cpython-310.pyc
ADDED
Binary file (31.6 kB). View file
|
|
models/yolov5/__pycache__/export.cpython-311.pyc
ADDED
Binary file (59.7 kB). View file
|
|
models/yolov5/__pycache__/hubconf.cpython-310.pyc
ADDED
Binary file (5.29 kB). View file
|
|
models/yolov5/__pycache__/hubconf.cpython-311.pyc
ADDED
Binary file (8.56 kB). View file
|
|
models/yolov5/benchmarks.py
ADDED
@@ -0,0 +1,174 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
"""
|
3 |
+
Run YOLOv5 benchmarks on all supported export formats.
|
4 |
+
|
5 |
+
Format | `export.py --include` | Model
|
6 |
+
--- | --- | ---
|
7 |
+
PyTorch | - | yolov5s.pt
|
8 |
+
TorchScript | `torchscript` | yolov5s.torchscript
|
9 |
+
ONNX | `onnx` | yolov5s.onnx
|
10 |
+
OpenVINO | `openvino` | yolov5s_openvino_model/
|
11 |
+
TensorRT | `engine` | yolov5s.engine
|
12 |
+
CoreML | `coreml` | yolov5s.mlmodel
|
13 |
+
TensorFlow SavedModel | `saved_model` | yolov5s_saved_model/
|
14 |
+
TensorFlow GraphDef | `pb` | yolov5s.pb
|
15 |
+
TensorFlow Lite | `tflite` | yolov5s.tflite
|
16 |
+
TensorFlow Edge TPU | `edgetpu` | yolov5s_edgetpu.tflite
|
17 |
+
TensorFlow.js | `tfjs` | yolov5s_web_model/
|
18 |
+
|
19 |
+
Requirements:
|
20 |
+
$ pip install -r requirements.txt coremltools onnx onnx-simplifier onnxruntime openvino-dev tensorflow-cpu # CPU
|
21 |
+
$ pip install -r requirements.txt coremltools onnx onnx-simplifier onnxruntime-gpu openvino-dev tensorflow # GPU
|
22 |
+
$ pip install -U nvidia-tensorrt --index-url https://pypi.ngc.nvidia.com # TensorRT
|
23 |
+
|
24 |
+
Usage:
|
25 |
+
$ python benchmarks.py --weights yolov5s.pt --img 640
|
26 |
+
"""
|
27 |
+
|
28 |
+
import argparse
|
29 |
+
import platform
|
30 |
+
import sys
|
31 |
+
import time
|
32 |
+
from pathlib import Path
|
33 |
+
|
34 |
+
import pandas as pd
|
35 |
+
|
36 |
+
FILE = Path(__file__).resolve()
|
37 |
+
ROOT = FILE.parents[0] # YOLOv5 root directory
|
38 |
+
if str(ROOT) not in sys.path:
|
39 |
+
sys.path.append(str(ROOT)) # add ROOT to PATH
|
40 |
+
# ROOT = ROOT.relative_to(Path.cwd()) # relative
|
41 |
+
|
42 |
+
import export
|
43 |
+
from models.experimental import attempt_load
|
44 |
+
from models.yolo import SegmentationModel
|
45 |
+
from segment.val import run as val_seg
|
46 |
+
from utils import notebook_init
|
47 |
+
from utils.general import LOGGER, check_yaml, file_size, print_args
|
48 |
+
from utils.torch_utils import select_device
|
49 |
+
from val import run as val_det
|
50 |
+
|
51 |
+
|
52 |
+
def run(
|
53 |
+
weights=ROOT / "yolov5s.pt", # weights path
|
54 |
+
imgsz=640, # inference size (pixels)
|
55 |
+
batch_size=1, # batch size
|
56 |
+
data=ROOT / "data/coco128.yaml", # dataset.yaml path
|
57 |
+
device="", # cuda device, i.e. 0 or 0,1,2,3 or cpu
|
58 |
+
half=False, # use FP16 half-precision inference
|
59 |
+
test=False, # test exports only
|
60 |
+
pt_only=False, # test PyTorch only
|
61 |
+
hard_fail=False, # throw error on benchmark failure
|
62 |
+
):
|
63 |
+
y, t = [], time.time()
|
64 |
+
device = select_device(device)
|
65 |
+
model_type = type(attempt_load(weights, fuse=False)) # DetectionModel, SegmentationModel, etc.
|
66 |
+
for i, (name, f, suffix, cpu, gpu) in export.export_formats().iterrows(): # index, (name, file, suffix, CPU, GPU)
|
67 |
+
try:
|
68 |
+
assert i not in (9, 10), "inference not supported" # Edge TPU and TF.js are unsupported
|
69 |
+
assert i != 5 or platform.system() == "Darwin", "inference only supported on macOS>=10.13" # CoreML
|
70 |
+
if "cpu" in device.type:
|
71 |
+
assert cpu, "inference not supported on CPU"
|
72 |
+
if "cuda" in device.type:
|
73 |
+
assert gpu, "inference not supported on GPU"
|
74 |
+
|
75 |
+
# Export
|
76 |
+
if f == "-":
|
77 |
+
w = weights # PyTorch format
|
78 |
+
else:
|
79 |
+
w = export.run(
|
80 |
+
weights=weights, imgsz=[imgsz], include=[f], batch_size=batch_size, device=device, half=half
|
81 |
+
)[-1] # all others
|
82 |
+
assert suffix in str(w), "export failed"
|
83 |
+
|
84 |
+
# Validate
|
85 |
+
if model_type == SegmentationModel:
|
86 |
+
result = val_seg(data, w, batch_size, imgsz, plots=False, device=device, task="speed", half=half)
|
87 |
+
metric = result[0][7] # (box(p, r, map50, map), mask(p, r, map50, map), *loss(box, obj, cls))
|
88 |
+
else: # DetectionModel:
|
89 |
+
result = val_det(data, w, batch_size, imgsz, plots=False, device=device, task="speed", half=half)
|
90 |
+
metric = result[0][3] # (p, r, map50, map, *loss(box, obj, cls))
|
91 |
+
speed = result[2][1] # times (preprocess, inference, postprocess)
|
92 |
+
y.append([name, round(file_size(w), 1), round(metric, 4), round(speed, 2)]) # MB, mAP, t_inference
|
93 |
+
except Exception as e:
|
94 |
+
if hard_fail:
|
95 |
+
assert type(e) is AssertionError, f"Benchmark --hard-fail for {name}: {e}"
|
96 |
+
LOGGER.warning(f"WARNING ⚠️ Benchmark failure for {name}: {e}")
|
97 |
+
y.append([name, None, None, None]) # mAP, t_inference
|
98 |
+
if pt_only and i == 0:
|
99 |
+
break # break after PyTorch
|
100 |
+
|
101 |
+
# Print results
|
102 |
+
LOGGER.info("\n")
|
103 |
+
parse_opt()
|
104 |
+
notebook_init() # print system info
|
105 |
+
c = ["Format", "Size (MB)", "mAP50-95", "Inference time (ms)"] if map else ["Format", "Export", "", ""]
|
106 |
+
py = pd.DataFrame(y, columns=c)
|
107 |
+
LOGGER.info(f"\nBenchmarks complete ({time.time() - t:.2f}s)")
|
108 |
+
LOGGER.info(str(py if map else py.iloc[:, :2]))
|
109 |
+
if hard_fail and isinstance(hard_fail, str):
|
110 |
+
metrics = py["mAP50-95"].array # values to compare to floor
|
111 |
+
floor = eval(hard_fail) # minimum metric floor to pass, i.e. = 0.29 mAP for YOLOv5n
|
112 |
+
assert all(x > floor for x in metrics if pd.notna(x)), f"HARD FAIL: mAP50-95 < floor {floor}"
|
113 |
+
return py
|
114 |
+
|
115 |
+
|
116 |
+
def test(
|
117 |
+
weights=ROOT / "yolov5s.pt", # weights path
|
118 |
+
imgsz=640, # inference size (pixels)
|
119 |
+
batch_size=1, # batch size
|
120 |
+
data=ROOT / "data/coco128.yaml", # dataset.yaml path
|
121 |
+
device="", # cuda device, i.e. 0 or 0,1,2,3 or cpu
|
122 |
+
half=False, # use FP16 half-precision inference
|
123 |
+
test=False, # test exports only
|
124 |
+
pt_only=False, # test PyTorch only
|
125 |
+
hard_fail=False, # throw error on benchmark failure
|
126 |
+
):
|
127 |
+
y, t = [], time.time()
|
128 |
+
device = select_device(device)
|
129 |
+
for i, (name, f, suffix, gpu) in export.export_formats().iterrows(): # index, (name, file, suffix, gpu-capable)
|
130 |
+
try:
|
131 |
+
w = (
|
132 |
+
weights
|
133 |
+
if f == "-"
|
134 |
+
else export.run(weights=weights, imgsz=[imgsz], include=[f], device=device, half=half)[-1]
|
135 |
+
) # weights
|
136 |
+
assert suffix in str(w), "export failed"
|
137 |
+
y.append([name, True])
|
138 |
+
except Exception:
|
139 |
+
y.append([name, False]) # mAP, t_inference
|
140 |
+
|
141 |
+
# Print results
|
142 |
+
LOGGER.info("\n")
|
143 |
+
parse_opt()
|
144 |
+
notebook_init() # print system info
|
145 |
+
py = pd.DataFrame(y, columns=["Format", "Export"])
|
146 |
+
LOGGER.info(f"\nExports complete ({time.time() - t:.2f}s)")
|
147 |
+
LOGGER.info(str(py))
|
148 |
+
return py
|
149 |
+
|
150 |
+
|
151 |
+
def parse_opt():
|
152 |
+
parser = argparse.ArgumentParser()
|
153 |
+
parser.add_argument("--weights", type=str, default=ROOT / "yolov5s.pt", help="weights path")
|
154 |
+
parser.add_argument("--imgsz", "--img", "--img-size", type=int, default=640, help="inference size (pixels)")
|
155 |
+
parser.add_argument("--batch-size", type=int, default=1, help="batch size")
|
156 |
+
parser.add_argument("--data", type=str, default=ROOT / "data/coco128.yaml", help="dataset.yaml path")
|
157 |
+
parser.add_argument("--device", default="", help="cuda device, i.e. 0 or 0,1,2,3 or cpu")
|
158 |
+
parser.add_argument("--half", action="store_true", help="use FP16 half-precision inference")
|
159 |
+
parser.add_argument("--test", action="store_true", help="test exports only")
|
160 |
+
parser.add_argument("--pt-only", action="store_true", help="test PyTorch only")
|
161 |
+
parser.add_argument("--hard-fail", nargs="?", const=True, default=False, help="Exception on error or < min metric")
|
162 |
+
opt = parser.parse_args()
|
163 |
+
opt.data = check_yaml(opt.data) # check YAML
|
164 |
+
print_args(vars(opt))
|
165 |
+
return opt
|
166 |
+
|
167 |
+
|
168 |
+
def main(opt):
|
169 |
+
test(**vars(opt)) if opt.test else run(**vars(opt))
|
170 |
+
|
171 |
+
|
172 |
+
if __name__ == "__main__":
|
173 |
+
opt = parse_opt()
|
174 |
+
main(opt)
|
models/yolov5/classify/predict.py
ADDED
@@ -0,0 +1,238 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
"""
|
3 |
+
Run YOLOv5 classification inference on images, videos, directories, globs, YouTube, webcam, streams, etc.
|
4 |
+
|
5 |
+
Usage - sources:
|
6 |
+
$ python classify/predict.py --weights yolov5s-cls.pt --source 0 # webcam
|
7 |
+
img.jpg # image
|
8 |
+
vid.mp4 # video
|
9 |
+
screen # screenshot
|
10 |
+
path/ # directory
|
11 |
+
list.txt # list of images
|
12 |
+
list.streams # list of streams
|
13 |
+
'path/*.jpg' # glob
|
14 |
+
'https://youtu.be/LNwODJXcvt4' # YouTube
|
15 |
+
'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
|
16 |
+
|
17 |
+
Usage - formats:
|
18 |
+
$ python classify/predict.py --weights yolov5s-cls.pt # PyTorch
|
19 |
+
yolov5s-cls.torchscript # TorchScript
|
20 |
+
yolov5s-cls.onnx # ONNX Runtime or OpenCV DNN with --dnn
|
21 |
+
yolov5s-cls_openvino_model # OpenVINO
|
22 |
+
yolov5s-cls.engine # TensorRT
|
23 |
+
yolov5s-cls.mlmodel # CoreML (macOS-only)
|
24 |
+
yolov5s-cls_saved_model # TensorFlow SavedModel
|
25 |
+
yolov5s-cls.pb # TensorFlow GraphDef
|
26 |
+
yolov5s-cls.tflite # TensorFlow Lite
|
27 |
+
yolov5s-cls_edgetpu.tflite # TensorFlow Edge TPU
|
28 |
+
yolov5s-cls_paddle_model # PaddlePaddle
|
29 |
+
"""
|
30 |
+
|
31 |
+
import argparse
|
32 |
+
import os
|
33 |
+
import platform
|
34 |
+
import sys
|
35 |
+
from pathlib import Path
|
36 |
+
|
37 |
+
import torch
|
38 |
+
import torch.nn.functional as F
|
39 |
+
|
40 |
+
FILE = Path(__file__).resolve()
|
41 |
+
ROOT = FILE.parents[1] # YOLOv5 root directory
|
42 |
+
if str(ROOT) not in sys.path:
|
43 |
+
sys.path.append(str(ROOT)) # add ROOT to PATH
|
44 |
+
ROOT = Path(os.path.relpath(ROOT, Path.cwd())) # relative
|
45 |
+
|
46 |
+
from ultralytics.utils.plotting import Annotator
|
47 |
+
|
48 |
+
from models.common import DetectMultiBackend
|
49 |
+
from utils.augmentations import classify_transforms
|
50 |
+
from utils.dataloaders import IMG_FORMATS, VID_FORMATS, LoadImages, LoadScreenshots, LoadStreams
|
51 |
+
from utils.general import (
|
52 |
+
LOGGER,
|
53 |
+
Profile,
|
54 |
+
check_file,
|
55 |
+
check_img_size,
|
56 |
+
check_imshow,
|
57 |
+
check_requirements,
|
58 |
+
colorstr,
|
59 |
+
cv2,
|
60 |
+
increment_path,
|
61 |
+
print_args,
|
62 |
+
strip_optimizer,
|
63 |
+
)
|
64 |
+
from utils.torch_utils import select_device, smart_inference_mode
|
65 |
+
|
66 |
+
|
67 |
+
@smart_inference_mode()
|
68 |
+
def run(
|
69 |
+
weights=ROOT / "yolov5s-cls.pt", # model.pt path(s)
|
70 |
+
source=ROOT / "data/images", # file/dir/URL/glob/screen/0(webcam)
|
71 |
+
data=ROOT / "data/coco128.yaml", # dataset.yaml path
|
72 |
+
imgsz=(224, 224), # inference size (height, width)
|
73 |
+
device="", # cuda device, i.e. 0 or 0,1,2,3 or cpu
|
74 |
+
view_img=False, # show results
|
75 |
+
save_txt=False, # save results to *.txt
|
76 |
+
nosave=False, # do not save images/videos
|
77 |
+
augment=False, # augmented inference
|
78 |
+
visualize=False, # visualize features
|
79 |
+
update=False, # update all models
|
80 |
+
project=ROOT / "runs/predict-cls", # save results to project/name
|
81 |
+
name="exp", # save results to project/name
|
82 |
+
exist_ok=False, # existing project/name ok, do not increment
|
83 |
+
half=False, # use FP16 half-precision inference
|
84 |
+
dnn=False, # use OpenCV DNN for ONNX inference
|
85 |
+
vid_stride=1, # video frame-rate stride
|
86 |
+
):
|
87 |
+
source = str(source)
|
88 |
+
save_img = not nosave and not source.endswith(".txt") # save inference images
|
89 |
+
is_file = Path(source).suffix[1:] in (IMG_FORMATS + VID_FORMATS)
|
90 |
+
is_url = source.lower().startswith(("rtsp://", "rtmp://", "http://", "https://"))
|
91 |
+
webcam = source.isnumeric() or source.endswith(".streams") or (is_url and not is_file)
|
92 |
+
screenshot = source.lower().startswith("screen")
|
93 |
+
if is_url and is_file:
|
94 |
+
source = check_file(source) # download
|
95 |
+
|
96 |
+
# Directories
|
97 |
+
save_dir = increment_path(Path(project) / name, exist_ok=exist_ok) # increment run
|
98 |
+
(save_dir / "labels" if save_txt else save_dir).mkdir(parents=True, exist_ok=True) # make dir
|
99 |
+
|
100 |
+
# Load model
|
101 |
+
device = select_device(device)
|
102 |
+
model = DetectMultiBackend(weights, device=device, dnn=dnn, data=data, fp16=half)
|
103 |
+
stride, names, pt = model.stride, model.names, model.pt
|
104 |
+
imgsz = check_img_size(imgsz, s=stride) # check image size
|
105 |
+
|
106 |
+
# Dataloader
|
107 |
+
bs = 1 # batch_size
|
108 |
+
if webcam:
|
109 |
+
view_img = check_imshow(warn=True)
|
110 |
+
dataset = LoadStreams(source, img_size=imgsz, transforms=classify_transforms(imgsz[0]), vid_stride=vid_stride)
|
111 |
+
bs = len(dataset)
|
112 |
+
elif screenshot:
|
113 |
+
dataset = LoadScreenshots(source, img_size=imgsz, stride=stride, auto=pt)
|
114 |
+
else:
|
115 |
+
dataset = LoadImages(source, img_size=imgsz, transforms=classify_transforms(imgsz[0]), vid_stride=vid_stride)
|
116 |
+
vid_path, vid_writer = [None] * bs, [None] * bs
|
117 |
+
|
118 |
+
# Run inference
|
119 |
+
model.warmup(imgsz=(1 if pt else bs, 3, *imgsz)) # warmup
|
120 |
+
seen, windows, dt = 0, [], (Profile(device=device), Profile(device=device), Profile(device=device))
|
121 |
+
for path, im, im0s, vid_cap, s in dataset:
|
122 |
+
with dt[0]:
|
123 |
+
im = torch.Tensor(im).to(model.device)
|
124 |
+
im = im.half() if model.fp16 else im.float() # uint8 to fp16/32
|
125 |
+
if len(im.shape) == 3:
|
126 |
+
im = im[None] # expand for batch dim
|
127 |
+
|
128 |
+
# Inference
|
129 |
+
with dt[1]:
|
130 |
+
results = model(im)
|
131 |
+
|
132 |
+
# Post-process
|
133 |
+
with dt[2]:
|
134 |
+
pred = F.softmax(results, dim=1) # probabilities
|
135 |
+
|
136 |
+
# Process predictions
|
137 |
+
for i, prob in enumerate(pred): # per image
|
138 |
+
seen += 1
|
139 |
+
if webcam: # batch_size >= 1
|
140 |
+
p, im0, frame = path[i], im0s[i].copy(), dataset.count
|
141 |
+
s += f"{i}: "
|
142 |
+
else:
|
143 |
+
p, im0, frame = path, im0s.copy(), getattr(dataset, "frame", 0)
|
144 |
+
|
145 |
+
p = Path(p) # to Path
|
146 |
+
save_path = str(save_dir / p.name) # im.jpg
|
147 |
+
txt_path = str(save_dir / "labels" / p.stem) + ("" if dataset.mode == "image" else f"_{frame}") # im.txt
|
148 |
+
|
149 |
+
s += "%gx%g " % im.shape[2:] # print string
|
150 |
+
annotator = Annotator(im0, example=str(names), pil=True)
|
151 |
+
|
152 |
+
# Print results
|
153 |
+
top5i = prob.argsort(0, descending=True)[:5].tolist() # top 5 indices
|
154 |
+
s += f"{', '.join(f'{names[j]} {prob[j]:.2f}' for j in top5i)}, "
|
155 |
+
|
156 |
+
# Write results
|
157 |
+
text = "\n".join(f"{prob[j]:.2f} {names[j]}" for j in top5i)
|
158 |
+
if save_img or view_img: # Add bbox to image
|
159 |
+
annotator.text([32, 32], text, txt_color=(255, 255, 255))
|
160 |
+
if save_txt: # Write to file
|
161 |
+
with open(f"{txt_path}.txt", "a") as f:
|
162 |
+
f.write(text + "\n")
|
163 |
+
|
164 |
+
# Stream results
|
165 |
+
im0 = annotator.result()
|
166 |
+
if view_img:
|
167 |
+
if platform.system() == "Linux" and p not in windows:
|
168 |
+
windows.append(p)
|
169 |
+
cv2.namedWindow(str(p), cv2.WINDOW_NORMAL | cv2.WINDOW_KEEPRATIO) # allow window resize (Linux)
|
170 |
+
cv2.resizeWindow(str(p), im0.shape[1], im0.shape[0])
|
171 |
+
cv2.imshow(str(p), im0)
|
172 |
+
cv2.waitKey(1) # 1 millisecond
|
173 |
+
|
174 |
+
# Save results (image with detections)
|
175 |
+
if save_img:
|
176 |
+
if dataset.mode == "image":
|
177 |
+
cv2.imwrite(save_path, im0)
|
178 |
+
else: # 'video' or 'stream'
|
179 |
+
if vid_path[i] != save_path: # new video
|
180 |
+
vid_path[i] = save_path
|
181 |
+
if isinstance(vid_writer[i], cv2.VideoWriter):
|
182 |
+
vid_writer[i].release() # release previous video writer
|
183 |
+
if vid_cap: # video
|
184 |
+
fps = vid_cap.get(cv2.CAP_PROP_FPS)
|
185 |
+
w = int(vid_cap.get(cv2.CAP_PROP_FRAME_WIDTH))
|
186 |
+
h = int(vid_cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
|
187 |
+
else: # stream
|
188 |
+
fps, w, h = 30, im0.shape[1], im0.shape[0]
|
189 |
+
save_path = str(Path(save_path).with_suffix(".mp4")) # force *.mp4 suffix on results videos
|
190 |
+
vid_writer[i] = cv2.VideoWriter(save_path, cv2.VideoWriter_fourcc(*"mp4v"), fps, (w, h))
|
191 |
+
vid_writer[i].write(im0)
|
192 |
+
|
193 |
+
# Print time (inference-only)
|
194 |
+
LOGGER.info(f"{s}{dt[1].dt * 1E3:.1f}ms")
|
195 |
+
|
196 |
+
# Print results
|
197 |
+
t = tuple(x.t / seen * 1e3 for x in dt) # speeds per image
|
198 |
+
LOGGER.info(f"Speed: %.1fms pre-process, %.1fms inference, %.1fms NMS per image at shape {(1, 3, *imgsz)}" % t)
|
199 |
+
if save_txt or save_img:
|
200 |
+
s = f"\n{len(list(save_dir.glob('labels/*.txt')))} labels saved to {save_dir / 'labels'}" if save_txt else ""
|
201 |
+
LOGGER.info(f"Results saved to {colorstr('bold', save_dir)}{s}")
|
202 |
+
if update:
|
203 |
+
strip_optimizer(weights[0]) # update model (to fix SourceChangeWarning)
|
204 |
+
|
205 |
+
|
206 |
+
def parse_opt():
|
207 |
+
parser = argparse.ArgumentParser()
|
208 |
+
parser.add_argument("--weights", nargs="+", type=str, default=ROOT / "yolov5s-cls.pt", help="model path(s)")
|
209 |
+
parser.add_argument("--source", type=str, default=ROOT / "data/images", help="file/dir/URL/glob/screen/0(webcam)")
|
210 |
+
parser.add_argument("--data", type=str, default=ROOT / "data/coco128.yaml", help="(optional) dataset.yaml path")
|
211 |
+
parser.add_argument("--imgsz", "--img", "--img-size", nargs="+", type=int, default=[224], help="inference size h,w")
|
212 |
+
parser.add_argument("--device", default="", help="cuda device, i.e. 0 or 0,1,2,3 or cpu")
|
213 |
+
parser.add_argument("--view-img", action="store_true", help="show results")
|
214 |
+
parser.add_argument("--save-txt", action="store_true", help="save results to *.txt")
|
215 |
+
parser.add_argument("--nosave", action="store_true", help="do not save images/videos")
|
216 |
+
parser.add_argument("--augment", action="store_true", help="augmented inference")
|
217 |
+
parser.add_argument("--visualize", action="store_true", help="visualize features")
|
218 |
+
parser.add_argument("--update", action="store_true", help="update all models")
|
219 |
+
parser.add_argument("--project", default=ROOT / "runs/predict-cls", help="save results to project/name")
|
220 |
+
parser.add_argument("--name", default="exp", help="save results to project/name")
|
221 |
+
parser.add_argument("--exist-ok", action="store_true", help="existing project/name ok, do not increment")
|
222 |
+
parser.add_argument("--half", action="store_true", help="use FP16 half-precision inference")
|
223 |
+
parser.add_argument("--dnn", action="store_true", help="use OpenCV DNN for ONNX inference")
|
224 |
+
parser.add_argument("--vid-stride", type=int, default=1, help="video frame-rate stride")
|
225 |
+
opt = parser.parse_args()
|
226 |
+
opt.imgsz *= 2 if len(opt.imgsz) == 1 else 1 # expand
|
227 |
+
print_args(vars(opt))
|
228 |
+
return opt
|
229 |
+
|
230 |
+
|
231 |
+
def main(opt):
|
232 |
+
check_requirements(ROOT / "requirements.txt", exclude=("tensorboard", "thop"))
|
233 |
+
run(**vars(opt))
|
234 |
+
|
235 |
+
|
236 |
+
if __name__ == "__main__":
|
237 |
+
opt = parse_opt()
|
238 |
+
main(opt)
|
models/yolov5/classify/train.py
ADDED
@@ -0,0 +1,370 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
"""
|
3 |
+
Train a YOLOv5 classifier model on a classification dataset.
|
4 |
+
|
5 |
+
Usage - Single-GPU training:
|
6 |
+
$ python classify/train.py --model yolov5s-cls.pt --data imagenette160 --epochs 5 --img 224
|
7 |
+
|
8 |
+
Usage - Multi-GPU DDP training:
|
9 |
+
$ python -m torch.distributed.run --nproc_per_node 4 --master_port 2022 classify/train.py --model yolov5s-cls.pt --data imagenet --epochs 5 --img 224 --device 0,1,2,3
|
10 |
+
|
11 |
+
Datasets: --data mnist, fashion-mnist, cifar10, cifar100, imagenette, imagewoof, imagenet, or 'path/to/data'
|
12 |
+
YOLOv5-cls models: --model yolov5n-cls.pt, yolov5s-cls.pt, yolov5m-cls.pt, yolov5l-cls.pt, yolov5x-cls.pt
|
13 |
+
Torchvision models: --model resnet50, efficientnet_b0, etc. See https://pytorch.org/vision/stable/models.html
|
14 |
+
"""
|
15 |
+
|
16 |
+
import argparse
|
17 |
+
import os
|
18 |
+
import subprocess
|
19 |
+
import sys
|
20 |
+
import time
|
21 |
+
from copy import deepcopy
|
22 |
+
from datetime import datetime
|
23 |
+
from pathlib import Path
|
24 |
+
|
25 |
+
import torch
|
26 |
+
import torch.distributed as dist
|
27 |
+
import torch.hub as hub
|
28 |
+
import torch.optim.lr_scheduler as lr_scheduler
|
29 |
+
import torchvision
|
30 |
+
from torch.cuda import amp
|
31 |
+
from tqdm import tqdm
|
32 |
+
|
33 |
+
FILE = Path(__file__).resolve()
|
34 |
+
ROOT = FILE.parents[1] # YOLOv5 root directory
|
35 |
+
if str(ROOT) not in sys.path:
|
36 |
+
sys.path.append(str(ROOT)) # add ROOT to PATH
|
37 |
+
ROOT = Path(os.path.relpath(ROOT, Path.cwd())) # relative
|
38 |
+
|
39 |
+
from classify import val as validate
|
40 |
+
from models.experimental import attempt_load
|
41 |
+
from models.yolo import ClassificationModel, DetectionModel
|
42 |
+
from utils.dataloaders import create_classification_dataloader
|
43 |
+
from utils.general import (
|
44 |
+
DATASETS_DIR,
|
45 |
+
LOGGER,
|
46 |
+
TQDM_BAR_FORMAT,
|
47 |
+
WorkingDirectory,
|
48 |
+
check_git_info,
|
49 |
+
check_git_status,
|
50 |
+
check_requirements,
|
51 |
+
colorstr,
|
52 |
+
download,
|
53 |
+
increment_path,
|
54 |
+
init_seeds,
|
55 |
+
print_args,
|
56 |
+
yaml_save,
|
57 |
+
)
|
58 |
+
from utils.loggers import GenericLogger
|
59 |
+
from utils.plots import imshow_cls
|
60 |
+
from utils.torch_utils import (
|
61 |
+
ModelEMA,
|
62 |
+
de_parallel,
|
63 |
+
model_info,
|
64 |
+
reshape_classifier_output,
|
65 |
+
select_device,
|
66 |
+
smart_DDP,
|
67 |
+
smart_optimizer,
|
68 |
+
smartCrossEntropyLoss,
|
69 |
+
torch_distributed_zero_first,
|
70 |
+
)
|
71 |
+
|
72 |
+
LOCAL_RANK = int(os.getenv("LOCAL_RANK", -1)) # https://pytorch.org/docs/stable/elastic/run.html
|
73 |
+
RANK = int(os.getenv("RANK", -1))
|
74 |
+
WORLD_SIZE = int(os.getenv("WORLD_SIZE", 1))
|
75 |
+
GIT_INFO = check_git_info()
|
76 |
+
|
77 |
+
|
78 |
+
def train(opt, device):
|
79 |
+
init_seeds(opt.seed + 1 + RANK, deterministic=True)
|
80 |
+
save_dir, data, bs, epochs, nw, imgsz, pretrained = (
|
81 |
+
opt.save_dir,
|
82 |
+
Path(opt.data),
|
83 |
+
opt.batch_size,
|
84 |
+
opt.epochs,
|
85 |
+
min(os.cpu_count() - 1, opt.workers),
|
86 |
+
opt.imgsz,
|
87 |
+
str(opt.pretrained).lower() == "true",
|
88 |
+
)
|
89 |
+
cuda = device.type != "cpu"
|
90 |
+
|
91 |
+
# Directories
|
92 |
+
wdir = save_dir / "weights"
|
93 |
+
wdir.mkdir(parents=True, exist_ok=True) # make dir
|
94 |
+
last, best = wdir / "last.pt", wdir / "best.pt"
|
95 |
+
|
96 |
+
# Save run settings
|
97 |
+
yaml_save(save_dir / "opt.yaml", vars(opt))
|
98 |
+
|
99 |
+
# Logger
|
100 |
+
logger = GenericLogger(opt=opt, console_logger=LOGGER) if RANK in {-1, 0} else None
|
101 |
+
|
102 |
+
# Download Dataset
|
103 |
+
with torch_distributed_zero_first(LOCAL_RANK), WorkingDirectory(ROOT):
|
104 |
+
data_dir = data if data.is_dir() else (DATASETS_DIR / data)
|
105 |
+
if not data_dir.is_dir():
|
106 |
+
LOGGER.info(f"\nDataset not found ⚠️, missing path {data_dir}, attempting download...")
|
107 |
+
t = time.time()
|
108 |
+
if str(data) == "imagenet":
|
109 |
+
subprocess.run(["bash", str(ROOT / "data/scripts/get_imagenet.sh")], shell=True, check=True)
|
110 |
+
else:
|
111 |
+
url = f"https://github.com/ultralytics/yolov5/releases/download/v1.0/{data}.zip"
|
112 |
+
download(url, dir=data_dir.parent)
|
113 |
+
s = f"Dataset download success ✅ ({time.time() - t:.1f}s), saved to {colorstr('bold', data_dir)}\n"
|
114 |
+
LOGGER.info(s)
|
115 |
+
|
116 |
+
# Dataloaders
|
117 |
+
nc = len([x for x in (data_dir / "train").glob("*") if x.is_dir()]) # number of classes
|
118 |
+
trainloader = create_classification_dataloader(
|
119 |
+
path=data_dir / "train",
|
120 |
+
imgsz=imgsz,
|
121 |
+
batch_size=bs // WORLD_SIZE,
|
122 |
+
augment=True,
|
123 |
+
cache=opt.cache,
|
124 |
+
rank=LOCAL_RANK,
|
125 |
+
workers=nw,
|
126 |
+
)
|
127 |
+
|
128 |
+
test_dir = data_dir / "test" if (data_dir / "test").exists() else data_dir / "val" # data/test or data/val
|
129 |
+
if RANK in {-1, 0}:
|
130 |
+
testloader = create_classification_dataloader(
|
131 |
+
path=test_dir,
|
132 |
+
imgsz=imgsz,
|
133 |
+
batch_size=bs // WORLD_SIZE * 2,
|
134 |
+
augment=False,
|
135 |
+
cache=opt.cache,
|
136 |
+
rank=-1,
|
137 |
+
workers=nw,
|
138 |
+
)
|
139 |
+
|
140 |
+
# Model
|
141 |
+
with torch_distributed_zero_first(LOCAL_RANK), WorkingDirectory(ROOT):
|
142 |
+
if Path(opt.model).is_file() or opt.model.endswith(".pt"):
|
143 |
+
model = attempt_load(opt.model, device="cpu", fuse=False)
|
144 |
+
elif opt.model in torchvision.models.__dict__: # TorchVision models i.e. resnet50, efficientnet_b0
|
145 |
+
model = torchvision.models.__dict__[opt.model](weights="IMAGENET1K_V1" if pretrained else None)
|
146 |
+
else:
|
147 |
+
m = hub.list("ultralytics/yolov5") # + hub.list('pytorch/vision') # models
|
148 |
+
raise ModuleNotFoundError(f"--model {opt.model} not found. Available models are: \n" + "\n".join(m))
|
149 |
+
if isinstance(model, DetectionModel):
|
150 |
+
LOGGER.warning("WARNING ⚠️ pass YOLOv5 classifier model with '-cls' suffix, i.e. '--model yolov5s-cls.pt'")
|
151 |
+
model = ClassificationModel(model=model, nc=nc, cutoff=opt.cutoff or 10) # convert to classification model
|
152 |
+
reshape_classifier_output(model, nc) # update class count
|
153 |
+
for m in model.modules():
|
154 |
+
if not pretrained and hasattr(m, "reset_parameters"):
|
155 |
+
m.reset_parameters()
|
156 |
+
if isinstance(m, torch.nn.Dropout) and opt.dropout is not None:
|
157 |
+
m.p = opt.dropout # set dropout
|
158 |
+
for p in model.parameters():
|
159 |
+
p.requires_grad = True # for training
|
160 |
+
model = model.to(device)
|
161 |
+
|
162 |
+
# Info
|
163 |
+
if RANK in {-1, 0}:
|
164 |
+
model.names = trainloader.dataset.classes # attach class names
|
165 |
+
model.transforms = testloader.dataset.torch_transforms # attach inference transforms
|
166 |
+
model_info(model)
|
167 |
+
if opt.verbose:
|
168 |
+
LOGGER.info(model)
|
169 |
+
images, labels = next(iter(trainloader))
|
170 |
+
file = imshow_cls(images[:25], labels[:25], names=model.names, f=save_dir / "train_images.jpg")
|
171 |
+
logger.log_images(file, name="Train Examples")
|
172 |
+
logger.log_graph(model, imgsz) # log model
|
173 |
+
|
174 |
+
# Optimizer
|
175 |
+
optimizer = smart_optimizer(model, opt.optimizer, opt.lr0, momentum=0.9, decay=opt.decay)
|
176 |
+
|
177 |
+
# Scheduler
|
178 |
+
lrf = 0.01 # final lr (fraction of lr0)
|
179 |
+
# lf = lambda x: ((1 + math.cos(x * math.pi / epochs)) / 2) * (1 - lrf) + lrf # cosine
|
180 |
+
lf = lambda x: (1 - x / epochs) * (1 - lrf) + lrf # linear
|
181 |
+
scheduler = lr_scheduler.LambdaLR(optimizer, lr_lambda=lf)
|
182 |
+
# scheduler = lr_scheduler.OneCycleLR(optimizer, max_lr=lr0, total_steps=epochs, pct_start=0.1,
|
183 |
+
# final_div_factor=1 / 25 / lrf)
|
184 |
+
|
185 |
+
# EMA
|
186 |
+
ema = ModelEMA(model) if RANK in {-1, 0} else None
|
187 |
+
|
188 |
+
# DDP mode
|
189 |
+
if cuda and RANK != -1:
|
190 |
+
model = smart_DDP(model)
|
191 |
+
|
192 |
+
# Train
|
193 |
+
t0 = time.time()
|
194 |
+
criterion = smartCrossEntropyLoss(label_smoothing=opt.label_smoothing) # loss function
|
195 |
+
best_fitness = 0.0
|
196 |
+
scaler = amp.GradScaler(enabled=cuda)
|
197 |
+
val = test_dir.stem # 'val' or 'test'
|
198 |
+
LOGGER.info(
|
199 |
+
f'Image sizes {imgsz} train, {imgsz} test\n'
|
200 |
+
f'Using {nw * WORLD_SIZE} dataloader workers\n'
|
201 |
+
f"Logging results to {colorstr('bold', save_dir)}\n"
|
202 |
+
f'Starting {opt.model} training on {data} dataset with {nc} classes for {epochs} epochs...\n\n'
|
203 |
+
f"{'Epoch':>10}{'GPU_mem':>10}{'train_loss':>12}{f'{val}_loss':>12}{'top1_acc':>12}{'top5_acc':>12}"
|
204 |
+
)
|
205 |
+
for epoch in range(epochs): # loop over the dataset multiple times
|
206 |
+
tloss, vloss, fitness = 0.0, 0.0, 0.0 # train loss, val loss, fitness
|
207 |
+
model.train()
|
208 |
+
if RANK != -1:
|
209 |
+
trainloader.sampler.set_epoch(epoch)
|
210 |
+
pbar = enumerate(trainloader)
|
211 |
+
if RANK in {-1, 0}:
|
212 |
+
pbar = tqdm(enumerate(trainloader), total=len(trainloader), bar_format=TQDM_BAR_FORMAT)
|
213 |
+
for i, (images, labels) in pbar: # progress bar
|
214 |
+
images, labels = images.to(device, non_blocking=True), labels.to(device)
|
215 |
+
|
216 |
+
# Forward
|
217 |
+
with amp.autocast(enabled=cuda): # stability issues when enabled
|
218 |
+
loss = criterion(model(images), labels)
|
219 |
+
|
220 |
+
# Backward
|
221 |
+
scaler.scale(loss).backward()
|
222 |
+
|
223 |
+
# Optimize
|
224 |
+
scaler.unscale_(optimizer) # unscale gradients
|
225 |
+
torch.nn.utils.clip_grad_norm_(model.parameters(), max_norm=10.0) # clip gradients
|
226 |
+
scaler.step(optimizer)
|
227 |
+
scaler.update()
|
228 |
+
optimizer.zero_grad()
|
229 |
+
if ema:
|
230 |
+
ema.update(model)
|
231 |
+
|
232 |
+
if RANK in {-1, 0}:
|
233 |
+
# Print
|
234 |
+
tloss = (tloss * i + loss.item()) / (i + 1) # update mean losses
|
235 |
+
mem = "%.3gG" % (torch.cuda.memory_reserved() / 1e9 if torch.cuda.is_available() else 0) # (GB)
|
236 |
+
pbar.desc = f"{f'{epoch + 1}/{epochs}':>10}{mem:>10}{tloss:>12.3g}" + " " * 36
|
237 |
+
|
238 |
+
# Test
|
239 |
+
if i == len(pbar) - 1: # last batch
|
240 |
+
top1, top5, vloss = validate.run(
|
241 |
+
model=ema.ema, dataloader=testloader, criterion=criterion, pbar=pbar
|
242 |
+
) # test accuracy, loss
|
243 |
+
fitness = top1 # define fitness as top1 accuracy
|
244 |
+
|
245 |
+
# Scheduler
|
246 |
+
scheduler.step()
|
247 |
+
|
248 |
+
# Log metrics
|
249 |
+
if RANK in {-1, 0}:
|
250 |
+
# Best fitness
|
251 |
+
if fitness > best_fitness:
|
252 |
+
best_fitness = fitness
|
253 |
+
|
254 |
+
# Log
|
255 |
+
metrics = {
|
256 |
+
"train/loss": tloss,
|
257 |
+
f"{val}/loss": vloss,
|
258 |
+
"metrics/accuracy_top1": top1,
|
259 |
+
"metrics/accuracy_top5": top5,
|
260 |
+
"lr/0": optimizer.param_groups[0]["lr"],
|
261 |
+
} # learning rate
|
262 |
+
logger.log_metrics(metrics, epoch)
|
263 |
+
|
264 |
+
# Save model
|
265 |
+
final_epoch = epoch + 1 == epochs
|
266 |
+
if (not opt.nosave) or final_epoch:
|
267 |
+
ckpt = {
|
268 |
+
"epoch": epoch,
|
269 |
+
"best_fitness": best_fitness,
|
270 |
+
"model": deepcopy(ema.ema).half(), # deepcopy(de_parallel(model)).half(),
|
271 |
+
"ema": None, # deepcopy(ema.ema).half(),
|
272 |
+
"updates": ema.updates,
|
273 |
+
"optimizer": None, # optimizer.state_dict(),
|
274 |
+
"opt": vars(opt),
|
275 |
+
"git": GIT_INFO, # {remote, branch, commit} if a git repo
|
276 |
+
"date": datetime.now().isoformat(),
|
277 |
+
}
|
278 |
+
|
279 |
+
# Save last, best and delete
|
280 |
+
torch.save(ckpt, last)
|
281 |
+
if best_fitness == fitness:
|
282 |
+
torch.save(ckpt, best)
|
283 |
+
del ckpt
|
284 |
+
|
285 |
+
# Train complete
|
286 |
+
if RANK in {-1, 0} and final_epoch:
|
287 |
+
LOGGER.info(
|
288 |
+
f'\nTraining complete ({(time.time() - t0) / 3600:.3f} hours)'
|
289 |
+
f"\nResults saved to {colorstr('bold', save_dir)}"
|
290 |
+
f'\nPredict: python classify/predict.py --weights {best} --source im.jpg'
|
291 |
+
f'\nValidate: python classify/val.py --weights {best} --data {data_dir}'
|
292 |
+
f'\nExport: python export.py --weights {best} --include onnx'
|
293 |
+
f"\nPyTorch Hub: model = torch.hub.load('ultralytics/yolov5', 'custom', '{best}')"
|
294 |
+
f'\nVisualize: https://netron.app\n'
|
295 |
+
)
|
296 |
+
|
297 |
+
# Plot examples
|
298 |
+
images, labels = (x[:25] for x in next(iter(testloader))) # first 25 images and labels
|
299 |
+
pred = torch.max(ema.ema(images.to(device)), 1)[1]
|
300 |
+
file = imshow_cls(images, labels, pred, de_parallel(model).names, verbose=False, f=save_dir / "test_images.jpg")
|
301 |
+
|
302 |
+
# Log results
|
303 |
+
meta = {"epochs": epochs, "top1_acc": best_fitness, "date": datetime.now().isoformat()}
|
304 |
+
logger.log_images(file, name="Test Examples (true-predicted)", epoch=epoch)
|
305 |
+
logger.log_model(best, epochs, metadata=meta)
|
306 |
+
|
307 |
+
|
308 |
+
def parse_opt(known=False):
|
309 |
+
parser = argparse.ArgumentParser()
|
310 |
+
parser.add_argument("--model", type=str, default="yolov5s-cls.pt", help="initial weights path")
|
311 |
+
parser.add_argument("--data", type=str, default="imagenette160", help="cifar10, cifar100, mnist, imagenet, ...")
|
312 |
+
parser.add_argument("--epochs", type=int, default=10, help="total training epochs")
|
313 |
+
parser.add_argument("--batch-size", type=int, default=64, help="total batch size for all GPUs")
|
314 |
+
parser.add_argument("--imgsz", "--img", "--img-size", type=int, default=224, help="train, val image size (pixels)")
|
315 |
+
parser.add_argument("--nosave", action="store_true", help="only save final checkpoint")
|
316 |
+
parser.add_argument("--cache", type=str, nargs="?", const="ram", help='--cache images in "ram" (default) or "disk"')
|
317 |
+
parser.add_argument("--device", default="", help="cuda device, i.e. 0 or 0,1,2,3 or cpu")
|
318 |
+
parser.add_argument("--workers", type=int, default=8, help="max dataloader workers (per RANK in DDP mode)")
|
319 |
+
parser.add_argument("--project", default=ROOT / "runs/train-cls", help="save to project/name")
|
320 |
+
parser.add_argument("--name", default="exp", help="save to project/name")
|
321 |
+
parser.add_argument("--exist-ok", action="store_true", help="existing project/name ok, do not increment")
|
322 |
+
parser.add_argument("--pretrained", nargs="?", const=True, default=True, help="start from i.e. --pretrained False")
|
323 |
+
parser.add_argument("--optimizer", choices=["SGD", "Adam", "AdamW", "RMSProp"], default="Adam", help="optimizer")
|
324 |
+
parser.add_argument("--lr0", type=float, default=0.001, help="initial learning rate")
|
325 |
+
parser.add_argument("--decay", type=float, default=5e-5, help="weight decay")
|
326 |
+
parser.add_argument("--label-smoothing", type=float, default=0.1, help="Label smoothing epsilon")
|
327 |
+
parser.add_argument("--cutoff", type=int, default=None, help="Model layer cutoff index for Classify() head")
|
328 |
+
parser.add_argument("--dropout", type=float, default=None, help="Dropout (fraction)")
|
329 |
+
parser.add_argument("--verbose", action="store_true", help="Verbose mode")
|
330 |
+
parser.add_argument("--seed", type=int, default=0, help="Global training seed")
|
331 |
+
parser.add_argument("--local_rank", type=int, default=-1, help="Automatic DDP Multi-GPU argument, do not modify")
|
332 |
+
return parser.parse_known_args()[0] if known else parser.parse_args()
|
333 |
+
|
334 |
+
|
335 |
+
def main(opt):
|
336 |
+
# Checks
|
337 |
+
if RANK in {-1, 0}:
|
338 |
+
print_args(vars(opt))
|
339 |
+
check_git_status()
|
340 |
+
check_requirements(ROOT / "requirements.txt")
|
341 |
+
|
342 |
+
# DDP mode
|
343 |
+
device = select_device(opt.device, batch_size=opt.batch_size)
|
344 |
+
if LOCAL_RANK != -1:
|
345 |
+
assert opt.batch_size != -1, "AutoBatch is coming soon for classification, please pass a valid --batch-size"
|
346 |
+
assert opt.batch_size % WORLD_SIZE == 0, f"--batch-size {opt.batch_size} must be multiple of WORLD_SIZE"
|
347 |
+
assert torch.cuda.device_count() > LOCAL_RANK, "insufficient CUDA devices for DDP command"
|
348 |
+
torch.cuda.set_device(LOCAL_RANK)
|
349 |
+
device = torch.device("cuda", LOCAL_RANK)
|
350 |
+
dist.init_process_group(backend="nccl" if dist.is_nccl_available() else "gloo")
|
351 |
+
|
352 |
+
# Parameters
|
353 |
+
opt.save_dir = increment_path(Path(opt.project) / opt.name, exist_ok=opt.exist_ok) # increment run
|
354 |
+
|
355 |
+
# Train
|
356 |
+
train(opt, device)
|
357 |
+
|
358 |
+
|
359 |
+
def run(**kwargs):
|
360 |
+
# Usage: from yolov5 import classify; classify.train.run(data=mnist, imgsz=320, model='yolov5m')
|
361 |
+
opt = parse_opt(True)
|
362 |
+
for k, v in kwargs.items():
|
363 |
+
setattr(opt, k, v)
|
364 |
+
main(opt)
|
365 |
+
return opt
|
366 |
+
|
367 |
+
|
368 |
+
if __name__ == "__main__":
|
369 |
+
opt = parse_opt()
|
370 |
+
main(opt)
|
models/yolov5/classify/tutorial.ipynb
ADDED
The diff for this file is too large to render.
See raw diff
|
|
models/yolov5/classify/val.py
ADDED
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
"""
|
3 |
+
Validate a trained YOLOv5 classification model on a classification dataset.
|
4 |
+
|
5 |
+
Usage:
|
6 |
+
$ bash data/scripts/get_imagenet.sh --val # download ImageNet val split (6.3G, 50000 images)
|
7 |
+
$ python classify/val.py --weights yolov5m-cls.pt --data ../datasets/imagenet --img 224 # validate ImageNet
|
8 |
+
|
9 |
+
Usage - formats:
|
10 |
+
$ python classify/val.py --weights yolov5s-cls.pt # PyTorch
|
11 |
+
yolov5s-cls.torchscript # TorchScript
|
12 |
+
yolov5s-cls.onnx # ONNX Runtime or OpenCV DNN with --dnn
|
13 |
+
yolov5s-cls_openvino_model # OpenVINO
|
14 |
+
yolov5s-cls.engine # TensorRT
|
15 |
+
yolov5s-cls.mlmodel # CoreML (macOS-only)
|
16 |
+
yolov5s-cls_saved_model # TensorFlow SavedModel
|
17 |
+
yolov5s-cls.pb # TensorFlow GraphDef
|
18 |
+
yolov5s-cls.tflite # TensorFlow Lite
|
19 |
+
yolov5s-cls_edgetpu.tflite # TensorFlow Edge TPU
|
20 |
+
yolov5s-cls_paddle_model # PaddlePaddle
|
21 |
+
"""
|
22 |
+
|
23 |
+
import argparse
|
24 |
+
import os
|
25 |
+
import sys
|
26 |
+
from pathlib import Path
|
27 |
+
|
28 |
+
import torch
|
29 |
+
from tqdm import tqdm
|
30 |
+
|
31 |
+
FILE = Path(__file__).resolve()
|
32 |
+
ROOT = FILE.parents[1] # YOLOv5 root directory
|
33 |
+
if str(ROOT) not in sys.path:
|
34 |
+
sys.path.append(str(ROOT)) # add ROOT to PATH
|
35 |
+
ROOT = Path(os.path.relpath(ROOT, Path.cwd())) # relative
|
36 |
+
|
37 |
+
from models.common import DetectMultiBackend
|
38 |
+
from utils.dataloaders import create_classification_dataloader
|
39 |
+
from utils.general import (
|
40 |
+
LOGGER,
|
41 |
+
TQDM_BAR_FORMAT,
|
42 |
+
Profile,
|
43 |
+
check_img_size,
|
44 |
+
check_requirements,
|
45 |
+
colorstr,
|
46 |
+
increment_path,
|
47 |
+
print_args,
|
48 |
+
)
|
49 |
+
from utils.torch_utils import select_device, smart_inference_mode
|
50 |
+
|
51 |
+
|
52 |
+
@smart_inference_mode()
|
53 |
+
def run(
|
54 |
+
data=ROOT / "../datasets/mnist", # dataset dir
|
55 |
+
weights=ROOT / "yolov5s-cls.pt", # model.pt path(s)
|
56 |
+
batch_size=128, # batch size
|
57 |
+
imgsz=224, # inference size (pixels)
|
58 |
+
device="", # cuda device, i.e. 0 or 0,1,2,3 or cpu
|
59 |
+
workers=8, # max dataloader workers (per RANK in DDP mode)
|
60 |
+
verbose=False, # verbose output
|
61 |
+
project=ROOT / "runs/val-cls", # save to project/name
|
62 |
+
name="exp", # save to project/name
|
63 |
+
exist_ok=False, # existing project/name ok, do not increment
|
64 |
+
half=False, # use FP16 half-precision inference
|
65 |
+
dnn=False, # use OpenCV DNN for ONNX inference
|
66 |
+
model=None,
|
67 |
+
dataloader=None,
|
68 |
+
criterion=None,
|
69 |
+
pbar=None,
|
70 |
+
):
|
71 |
+
# Initialize/load model and set device
|
72 |
+
training = model is not None
|
73 |
+
if training: # called by train.py
|
74 |
+
device, pt, jit, engine = next(model.parameters()).device, True, False, False # get model device, PyTorch model
|
75 |
+
half &= device.type != "cpu" # half precision only supported on CUDA
|
76 |
+
model.half() if half else model.float()
|
77 |
+
else: # called directly
|
78 |
+
device = select_device(device, batch_size=batch_size)
|
79 |
+
|
80 |
+
# Directories
|
81 |
+
save_dir = increment_path(Path(project) / name, exist_ok=exist_ok) # increment run
|
82 |
+
save_dir.mkdir(parents=True, exist_ok=True) # make dir
|
83 |
+
|
84 |
+
# Load model
|
85 |
+
model = DetectMultiBackend(weights, device=device, dnn=dnn, fp16=half)
|
86 |
+
stride, pt, jit, engine = model.stride, model.pt, model.jit, model.engine
|
87 |
+
imgsz = check_img_size(imgsz, s=stride) # check image size
|
88 |
+
half = model.fp16 # FP16 supported on limited backends with CUDA
|
89 |
+
if engine:
|
90 |
+
batch_size = model.batch_size
|
91 |
+
else:
|
92 |
+
device = model.device
|
93 |
+
if not (pt or jit):
|
94 |
+
batch_size = 1 # export.py models default to batch-size 1
|
95 |
+
LOGGER.info(f"Forcing --batch-size 1 square inference (1,3,{imgsz},{imgsz}) for non-PyTorch models")
|
96 |
+
|
97 |
+
# Dataloader
|
98 |
+
data = Path(data)
|
99 |
+
test_dir = data / "test" if (data / "test").exists() else data / "val" # data/test or data/val
|
100 |
+
dataloader = create_classification_dataloader(
|
101 |
+
path=test_dir, imgsz=imgsz, batch_size=batch_size, augment=False, rank=-1, workers=workers
|
102 |
+
)
|
103 |
+
|
104 |
+
model.eval()
|
105 |
+
pred, targets, loss, dt = [], [], 0, (Profile(device=device), Profile(device=device), Profile(device=device))
|
106 |
+
n = len(dataloader) # number of batches
|
107 |
+
action = "validating" if dataloader.dataset.root.stem == "val" else "testing"
|
108 |
+
desc = f"{pbar.desc[:-36]}{action:>36}" if pbar else f"{action}"
|
109 |
+
bar = tqdm(dataloader, desc, n, not training, bar_format=TQDM_BAR_FORMAT, position=0)
|
110 |
+
with torch.cuda.amp.autocast(enabled=device.type != "cpu"):
|
111 |
+
for images, labels in bar:
|
112 |
+
with dt[0]:
|
113 |
+
images, labels = images.to(device, non_blocking=True), labels.to(device)
|
114 |
+
|
115 |
+
with dt[1]:
|
116 |
+
y = model(images)
|
117 |
+
|
118 |
+
with dt[2]:
|
119 |
+
pred.append(y.argsort(1, descending=True)[:, :5])
|
120 |
+
targets.append(labels)
|
121 |
+
if criterion:
|
122 |
+
loss += criterion(y, labels)
|
123 |
+
|
124 |
+
loss /= n
|
125 |
+
pred, targets = torch.cat(pred), torch.cat(targets)
|
126 |
+
correct = (targets[:, None] == pred).float()
|
127 |
+
acc = torch.stack((correct[:, 0], correct.max(1).values), dim=1) # (top1, top5) accuracy
|
128 |
+
top1, top5 = acc.mean(0).tolist()
|
129 |
+
|
130 |
+
if pbar:
|
131 |
+
pbar.desc = f"{pbar.desc[:-36]}{loss:>12.3g}{top1:>12.3g}{top5:>12.3g}"
|
132 |
+
if verbose: # all classes
|
133 |
+
LOGGER.info(f"{'Class':>24}{'Images':>12}{'top1_acc':>12}{'top5_acc':>12}")
|
134 |
+
LOGGER.info(f"{'all':>24}{targets.shape[0]:>12}{top1:>12.3g}{top5:>12.3g}")
|
135 |
+
for i, c in model.names.items():
|
136 |
+
acc_i = acc[targets == i]
|
137 |
+
top1i, top5i = acc_i.mean(0).tolist()
|
138 |
+
LOGGER.info(f"{c:>24}{acc_i.shape[0]:>12}{top1i:>12.3g}{top5i:>12.3g}")
|
139 |
+
|
140 |
+
# Print results
|
141 |
+
t = tuple(x.t / len(dataloader.dataset.samples) * 1e3 for x in dt) # speeds per image
|
142 |
+
shape = (1, 3, imgsz, imgsz)
|
143 |
+
LOGGER.info(f"Speed: %.1fms pre-process, %.1fms inference, %.1fms post-process per image at shape {shape}" % t)
|
144 |
+
LOGGER.info(f"Results saved to {colorstr('bold', save_dir)}")
|
145 |
+
|
146 |
+
return top1, top5, loss
|
147 |
+
|
148 |
+
|
149 |
+
def parse_opt():
|
150 |
+
parser = argparse.ArgumentParser()
|
151 |
+
parser.add_argument("--data", type=str, default=ROOT / "../datasets/mnist", help="dataset path")
|
152 |
+
parser.add_argument("--weights", nargs="+", type=str, default=ROOT / "yolov5s-cls.pt", help="model.pt path(s)")
|
153 |
+
parser.add_argument("--batch-size", type=int, default=128, help="batch size")
|
154 |
+
parser.add_argument("--imgsz", "--img", "--img-size", type=int, default=224, help="inference size (pixels)")
|
155 |
+
parser.add_argument("--device", default="", help="cuda device, i.e. 0 or 0,1,2,3 or cpu")
|
156 |
+
parser.add_argument("--workers", type=int, default=8, help="max dataloader workers (per RANK in DDP mode)")
|
157 |
+
parser.add_argument("--verbose", nargs="?", const=True, default=True, help="verbose output")
|
158 |
+
parser.add_argument("--project", default=ROOT / "runs/val-cls", help="save to project/name")
|
159 |
+
parser.add_argument("--name", default="exp", help="save to project/name")
|
160 |
+
parser.add_argument("--exist-ok", action="store_true", help="existing project/name ok, do not increment")
|
161 |
+
parser.add_argument("--half", action="store_true", help="use FP16 half-precision inference")
|
162 |
+
parser.add_argument("--dnn", action="store_true", help="use OpenCV DNN for ONNX inference")
|
163 |
+
opt = parser.parse_args()
|
164 |
+
print_args(vars(opt))
|
165 |
+
return opt
|
166 |
+
|
167 |
+
|
168 |
+
def main(opt):
|
169 |
+
check_requirements(ROOT / "requirements.txt", exclude=("tensorboard", "thop"))
|
170 |
+
run(**vars(opt))
|
171 |
+
|
172 |
+
|
173 |
+
if __name__ == "__main__":
|
174 |
+
opt = parse_opt()
|
175 |
+
main(opt)
|
models/yolov5/data/Argoverse.yaml
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
# Argoverse-HD dataset (ring-front-center camera) http://www.cs.cmu.edu/~mengtial/proj/streaming/ by Argo AI
|
3 |
+
# Example usage: python train.py --data Argoverse.yaml
|
4 |
+
# parent
|
5 |
+
# ├── yolov5
|
6 |
+
# └── datasets
|
7 |
+
# └── Argoverse ← downloads here (31.3 GB)
|
8 |
+
|
9 |
+
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
10 |
+
path: ../datasets/Argoverse # dataset root dir
|
11 |
+
train: Argoverse-1.1/images/train/ # train images (relative to 'path') 39384 images
|
12 |
+
val: Argoverse-1.1/images/val/ # val images (relative to 'path') 15062 images
|
13 |
+
test: Argoverse-1.1/images/test/ # test images (optional) https://eval.ai/web/challenges/challenge-page/800/overview
|
14 |
+
|
15 |
+
# Classes
|
16 |
+
names:
|
17 |
+
0: person
|
18 |
+
1: bicycle
|
19 |
+
2: car
|
20 |
+
3: motorcycle
|
21 |
+
4: bus
|
22 |
+
5: truck
|
23 |
+
6: traffic_light
|
24 |
+
7: stop_sign
|
25 |
+
|
26 |
+
# Download script/URL (optional) ---------------------------------------------------------------------------------------
|
27 |
+
download: |
|
28 |
+
import json
|
29 |
+
|
30 |
+
from tqdm import tqdm
|
31 |
+
from utils.general import download, Path
|
32 |
+
|
33 |
+
|
34 |
+
def argoverse2yolo(set):
|
35 |
+
labels = {}
|
36 |
+
a = json.load(open(set, "rb"))
|
37 |
+
for annot in tqdm(a['annotations'], desc=f"Converting {set} to YOLOv5 format..."):
|
38 |
+
img_id = annot['image_id']
|
39 |
+
img_name = a['images'][img_id]['name']
|
40 |
+
img_label_name = f'{img_name[:-3]}txt'
|
41 |
+
|
42 |
+
cls = annot['category_id'] # instance class id
|
43 |
+
x_center, y_center, width, height = annot['bbox']
|
44 |
+
x_center = (x_center + width / 2) / 1920.0 # offset and scale
|
45 |
+
y_center = (y_center + height / 2) / 1200.0 # offset and scale
|
46 |
+
width /= 1920.0 # scale
|
47 |
+
height /= 1200.0 # scale
|
48 |
+
|
49 |
+
img_dir = set.parents[2] / 'Argoverse-1.1' / 'labels' / a['seq_dirs'][a['images'][annot['image_id']]['sid']]
|
50 |
+
if not img_dir.exists():
|
51 |
+
img_dir.mkdir(parents=True, exist_ok=True)
|
52 |
+
|
53 |
+
k = str(img_dir / img_label_name)
|
54 |
+
if k not in labels:
|
55 |
+
labels[k] = []
|
56 |
+
labels[k].append(f"{cls} {x_center} {y_center} {width} {height}\n")
|
57 |
+
|
58 |
+
for k in labels:
|
59 |
+
with open(k, "w") as f:
|
60 |
+
f.writelines(labels[k])
|
61 |
+
|
62 |
+
|
63 |
+
# Download
|
64 |
+
dir = Path(yaml['path']) # dataset root dir
|
65 |
+
urls = ['https://argoverse-hd.s3.us-east-2.amazonaws.com/Argoverse-HD-Full.zip']
|
66 |
+
download(urls, dir=dir, delete=False)
|
67 |
+
|
68 |
+
# Convert
|
69 |
+
annotations_dir = 'Argoverse-HD/annotations/'
|
70 |
+
(dir / 'Argoverse-1.1' / 'tracking').rename(dir / 'Argoverse-1.1' / 'images') # rename 'tracking' to 'images'
|
71 |
+
for d in "train.json", "val.json":
|
72 |
+
argoverse2yolo(dir / annotations_dir / d) # convert VisDrone annotations to YOLO labels
|
models/yolov5/data/GlobalWheat2020.yaml
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
# Global Wheat 2020 dataset http://www.global-wheat.com/ by University of Saskatchewan
|
3 |
+
# Example usage: python train.py --data GlobalWheat2020.yaml
|
4 |
+
# parent
|
5 |
+
# ├── yolov5
|
6 |
+
# └── datasets
|
7 |
+
# └── GlobalWheat2020 ← downloads here (7.0 GB)
|
8 |
+
|
9 |
+
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
10 |
+
path: ../datasets/GlobalWheat2020 # dataset root dir
|
11 |
+
train: # train images (relative to 'path') 3422 images
|
12 |
+
- images/arvalis_1
|
13 |
+
- images/arvalis_2
|
14 |
+
- images/arvalis_3
|
15 |
+
- images/ethz_1
|
16 |
+
- images/rres_1
|
17 |
+
- images/inrae_1
|
18 |
+
- images/usask_1
|
19 |
+
val: # val images (relative to 'path') 748 images (WARNING: train set contains ethz_1)
|
20 |
+
- images/ethz_1
|
21 |
+
test: # test images (optional) 1276 images
|
22 |
+
- images/utokyo_1
|
23 |
+
- images/utokyo_2
|
24 |
+
- images/nau_1
|
25 |
+
- images/uq_1
|
26 |
+
|
27 |
+
# Classes
|
28 |
+
names:
|
29 |
+
0: wheat_head
|
30 |
+
|
31 |
+
# Download script/URL (optional) ---------------------------------------------------------------------------------------
|
32 |
+
download: |
|
33 |
+
from utils.general import download, Path
|
34 |
+
|
35 |
+
|
36 |
+
# Download
|
37 |
+
dir = Path(yaml['path']) # dataset root dir
|
38 |
+
urls = ['https://zenodo.org/record/4298502/files/global-wheat-codalab-official.zip',
|
39 |
+
'https://github.com/ultralytics/yolov5/releases/download/v1.0/GlobalWheat2020_labels.zip']
|
40 |
+
download(urls, dir=dir)
|
41 |
+
|
42 |
+
# Make Directories
|
43 |
+
for p in 'annotations', 'images', 'labels':
|
44 |
+
(dir / p).mkdir(parents=True, exist_ok=True)
|
45 |
+
|
46 |
+
# Move
|
47 |
+
for p in 'arvalis_1', 'arvalis_2', 'arvalis_3', 'ethz_1', 'rres_1', 'inrae_1', 'usask_1', \
|
48 |
+
'utokyo_1', 'utokyo_2', 'nau_1', 'uq_1':
|
49 |
+
(dir / p).rename(dir / 'images' / p) # move to /images
|
50 |
+
f = (dir / p).with_suffix('.json') # json file
|
51 |
+
if f.exists():
|
52 |
+
f.rename((dir / 'annotations' / p).with_suffix('.json')) # move to /annotations
|
models/yolov5/data/ImageNet.yaml
ADDED
@@ -0,0 +1,1020 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
# ImageNet-1k dataset https://www.image-net.org/index.php by Stanford University
|
3 |
+
# Simplified class names from https://github.com/anishathalye/imagenet-simple-labels
|
4 |
+
# Example usage: python classify/train.py --data imagenet
|
5 |
+
# parent
|
6 |
+
# ├── yolov5
|
7 |
+
# └── datasets
|
8 |
+
# └── imagenet ← downloads here (144 GB)
|
9 |
+
|
10 |
+
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
11 |
+
path: ../datasets/imagenet # dataset root dir
|
12 |
+
train: train # train images (relative to 'path') 1281167 images
|
13 |
+
val: val # val images (relative to 'path') 50000 images
|
14 |
+
test: # test images (optional)
|
15 |
+
|
16 |
+
# Classes
|
17 |
+
names:
|
18 |
+
0: tench
|
19 |
+
1: goldfish
|
20 |
+
2: great white shark
|
21 |
+
3: tiger shark
|
22 |
+
4: hammerhead shark
|
23 |
+
5: electric ray
|
24 |
+
6: stingray
|
25 |
+
7: cock
|
26 |
+
8: hen
|
27 |
+
9: ostrich
|
28 |
+
10: brambling
|
29 |
+
11: goldfinch
|
30 |
+
12: house finch
|
31 |
+
13: junco
|
32 |
+
14: indigo bunting
|
33 |
+
15: American robin
|
34 |
+
16: bulbul
|
35 |
+
17: jay
|
36 |
+
18: magpie
|
37 |
+
19: chickadee
|
38 |
+
20: American dipper
|
39 |
+
21: kite
|
40 |
+
22: bald eagle
|
41 |
+
23: vulture
|
42 |
+
24: great grey owl
|
43 |
+
25: fire salamander
|
44 |
+
26: smooth newt
|
45 |
+
27: newt
|
46 |
+
28: spotted salamander
|
47 |
+
29: axolotl
|
48 |
+
30: American bullfrog
|
49 |
+
31: tree frog
|
50 |
+
32: tailed frog
|
51 |
+
33: loggerhead sea turtle
|
52 |
+
34: leatherback sea turtle
|
53 |
+
35: mud turtle
|
54 |
+
36: terrapin
|
55 |
+
37: box turtle
|
56 |
+
38: banded gecko
|
57 |
+
39: green iguana
|
58 |
+
40: Carolina anole
|
59 |
+
41: desert grassland whiptail lizard
|
60 |
+
42: agama
|
61 |
+
43: frilled-necked lizard
|
62 |
+
44: alligator lizard
|
63 |
+
45: Gila monster
|
64 |
+
46: European green lizard
|
65 |
+
47: chameleon
|
66 |
+
48: Komodo dragon
|
67 |
+
49: Nile crocodile
|
68 |
+
50: American alligator
|
69 |
+
51: triceratops
|
70 |
+
52: worm snake
|
71 |
+
53: ring-necked snake
|
72 |
+
54: eastern hog-nosed snake
|
73 |
+
55: smooth green snake
|
74 |
+
56: kingsnake
|
75 |
+
57: garter snake
|
76 |
+
58: water snake
|
77 |
+
59: vine snake
|
78 |
+
60: night snake
|
79 |
+
61: boa constrictor
|
80 |
+
62: African rock python
|
81 |
+
63: Indian cobra
|
82 |
+
64: green mamba
|
83 |
+
65: sea snake
|
84 |
+
66: Saharan horned viper
|
85 |
+
67: eastern diamondback rattlesnake
|
86 |
+
68: sidewinder
|
87 |
+
69: trilobite
|
88 |
+
70: harvestman
|
89 |
+
71: scorpion
|
90 |
+
72: yellow garden spider
|
91 |
+
73: barn spider
|
92 |
+
74: European garden spider
|
93 |
+
75: southern black widow
|
94 |
+
76: tarantula
|
95 |
+
77: wolf spider
|
96 |
+
78: tick
|
97 |
+
79: centipede
|
98 |
+
80: black grouse
|
99 |
+
81: ptarmigan
|
100 |
+
82: ruffed grouse
|
101 |
+
83: prairie grouse
|
102 |
+
84: peacock
|
103 |
+
85: quail
|
104 |
+
86: partridge
|
105 |
+
87: grey parrot
|
106 |
+
88: macaw
|
107 |
+
89: sulphur-crested cockatoo
|
108 |
+
90: lorikeet
|
109 |
+
91: coucal
|
110 |
+
92: bee eater
|
111 |
+
93: hornbill
|
112 |
+
94: hummingbird
|
113 |
+
95: jacamar
|
114 |
+
96: toucan
|
115 |
+
97: duck
|
116 |
+
98: red-breasted merganser
|
117 |
+
99: goose
|
118 |
+
100: black swan
|
119 |
+
101: tusker
|
120 |
+
102: echidna
|
121 |
+
103: platypus
|
122 |
+
104: wallaby
|
123 |
+
105: koala
|
124 |
+
106: wombat
|
125 |
+
107: jellyfish
|
126 |
+
108: sea anemone
|
127 |
+
109: brain coral
|
128 |
+
110: flatworm
|
129 |
+
111: nematode
|
130 |
+
112: conch
|
131 |
+
113: snail
|
132 |
+
114: slug
|
133 |
+
115: sea slug
|
134 |
+
116: chiton
|
135 |
+
117: chambered nautilus
|
136 |
+
118: Dungeness crab
|
137 |
+
119: rock crab
|
138 |
+
120: fiddler crab
|
139 |
+
121: red king crab
|
140 |
+
122: American lobster
|
141 |
+
123: spiny lobster
|
142 |
+
124: crayfish
|
143 |
+
125: hermit crab
|
144 |
+
126: isopod
|
145 |
+
127: white stork
|
146 |
+
128: black stork
|
147 |
+
129: spoonbill
|
148 |
+
130: flamingo
|
149 |
+
131: little blue heron
|
150 |
+
132: great egret
|
151 |
+
133: bittern
|
152 |
+
134: crane (bird)
|
153 |
+
135: limpkin
|
154 |
+
136: common gallinule
|
155 |
+
137: American coot
|
156 |
+
138: bustard
|
157 |
+
139: ruddy turnstone
|
158 |
+
140: dunlin
|
159 |
+
141: common redshank
|
160 |
+
142: dowitcher
|
161 |
+
143: oystercatcher
|
162 |
+
144: pelican
|
163 |
+
145: king penguin
|
164 |
+
146: albatross
|
165 |
+
147: grey whale
|
166 |
+
148: killer whale
|
167 |
+
149: dugong
|
168 |
+
150: sea lion
|
169 |
+
151: Chihuahua
|
170 |
+
152: Japanese Chin
|
171 |
+
153: Maltese
|
172 |
+
154: Pekingese
|
173 |
+
155: Shih Tzu
|
174 |
+
156: King Charles Spaniel
|
175 |
+
157: Papillon
|
176 |
+
158: toy terrier
|
177 |
+
159: Rhodesian Ridgeback
|
178 |
+
160: Afghan Hound
|
179 |
+
161: Basset Hound
|
180 |
+
162: Beagle
|
181 |
+
163: Bloodhound
|
182 |
+
164: Bluetick Coonhound
|
183 |
+
165: Black and Tan Coonhound
|
184 |
+
166: Treeing Walker Coonhound
|
185 |
+
167: English foxhound
|
186 |
+
168: Redbone Coonhound
|
187 |
+
169: borzoi
|
188 |
+
170: Irish Wolfhound
|
189 |
+
171: Italian Greyhound
|
190 |
+
172: Whippet
|
191 |
+
173: Ibizan Hound
|
192 |
+
174: Norwegian Elkhound
|
193 |
+
175: Otterhound
|
194 |
+
176: Saluki
|
195 |
+
177: Scottish Deerhound
|
196 |
+
178: Weimaraner
|
197 |
+
179: Staffordshire Bull Terrier
|
198 |
+
180: American Staffordshire Terrier
|
199 |
+
181: Bedlington Terrier
|
200 |
+
182: Border Terrier
|
201 |
+
183: Kerry Blue Terrier
|
202 |
+
184: Irish Terrier
|
203 |
+
185: Norfolk Terrier
|
204 |
+
186: Norwich Terrier
|
205 |
+
187: Yorkshire Terrier
|
206 |
+
188: Wire Fox Terrier
|
207 |
+
189: Lakeland Terrier
|
208 |
+
190: Sealyham Terrier
|
209 |
+
191: Airedale Terrier
|
210 |
+
192: Cairn Terrier
|
211 |
+
193: Australian Terrier
|
212 |
+
194: Dandie Dinmont Terrier
|
213 |
+
195: Boston Terrier
|
214 |
+
196: Miniature Schnauzer
|
215 |
+
197: Giant Schnauzer
|
216 |
+
198: Standard Schnauzer
|
217 |
+
199: Scottish Terrier
|
218 |
+
200: Tibetan Terrier
|
219 |
+
201: Australian Silky Terrier
|
220 |
+
202: Soft-coated Wheaten Terrier
|
221 |
+
203: West Highland White Terrier
|
222 |
+
204: Lhasa Apso
|
223 |
+
205: Flat-Coated Retriever
|
224 |
+
206: Curly-coated Retriever
|
225 |
+
207: Golden Retriever
|
226 |
+
208: Labrador Retriever
|
227 |
+
209: Chesapeake Bay Retriever
|
228 |
+
210: German Shorthaired Pointer
|
229 |
+
211: Vizsla
|
230 |
+
212: English Setter
|
231 |
+
213: Irish Setter
|
232 |
+
214: Gordon Setter
|
233 |
+
215: Brittany
|
234 |
+
216: Clumber Spaniel
|
235 |
+
217: English Springer Spaniel
|
236 |
+
218: Welsh Springer Spaniel
|
237 |
+
219: Cocker Spaniels
|
238 |
+
220: Sussex Spaniel
|
239 |
+
221: Irish Water Spaniel
|
240 |
+
222: Kuvasz
|
241 |
+
223: Schipperke
|
242 |
+
224: Groenendael
|
243 |
+
225: Malinois
|
244 |
+
226: Briard
|
245 |
+
227: Australian Kelpie
|
246 |
+
228: Komondor
|
247 |
+
229: Old English Sheepdog
|
248 |
+
230: Shetland Sheepdog
|
249 |
+
231: collie
|
250 |
+
232: Border Collie
|
251 |
+
233: Bouvier des Flandres
|
252 |
+
234: Rottweiler
|
253 |
+
235: German Shepherd Dog
|
254 |
+
236: Dobermann
|
255 |
+
237: Miniature Pinscher
|
256 |
+
238: Greater Swiss Mountain Dog
|
257 |
+
239: Bernese Mountain Dog
|
258 |
+
240: Appenzeller Sennenhund
|
259 |
+
241: Entlebucher Sennenhund
|
260 |
+
242: Boxer
|
261 |
+
243: Bullmastiff
|
262 |
+
244: Tibetan Mastiff
|
263 |
+
245: French Bulldog
|
264 |
+
246: Great Dane
|
265 |
+
247: St. Bernard
|
266 |
+
248: husky
|
267 |
+
249: Alaskan Malamute
|
268 |
+
250: Siberian Husky
|
269 |
+
251: Dalmatian
|
270 |
+
252: Affenpinscher
|
271 |
+
253: Basenji
|
272 |
+
254: pug
|
273 |
+
255: Leonberger
|
274 |
+
256: Newfoundland
|
275 |
+
257: Pyrenean Mountain Dog
|
276 |
+
258: Samoyed
|
277 |
+
259: Pomeranian
|
278 |
+
260: Chow Chow
|
279 |
+
261: Keeshond
|
280 |
+
262: Griffon Bruxellois
|
281 |
+
263: Pembroke Welsh Corgi
|
282 |
+
264: Cardigan Welsh Corgi
|
283 |
+
265: Toy Poodle
|
284 |
+
266: Miniature Poodle
|
285 |
+
267: Standard Poodle
|
286 |
+
268: Mexican hairless dog
|
287 |
+
269: grey wolf
|
288 |
+
270: Alaskan tundra wolf
|
289 |
+
271: red wolf
|
290 |
+
272: coyote
|
291 |
+
273: dingo
|
292 |
+
274: dhole
|
293 |
+
275: African wild dog
|
294 |
+
276: hyena
|
295 |
+
277: red fox
|
296 |
+
278: kit fox
|
297 |
+
279: Arctic fox
|
298 |
+
280: grey fox
|
299 |
+
281: tabby cat
|
300 |
+
282: tiger cat
|
301 |
+
283: Persian cat
|
302 |
+
284: Siamese cat
|
303 |
+
285: Egyptian Mau
|
304 |
+
286: cougar
|
305 |
+
287: lynx
|
306 |
+
288: leopard
|
307 |
+
289: snow leopard
|
308 |
+
290: jaguar
|
309 |
+
291: lion
|
310 |
+
292: tiger
|
311 |
+
293: cheetah
|
312 |
+
294: brown bear
|
313 |
+
295: American black bear
|
314 |
+
296: polar bear
|
315 |
+
297: sloth bear
|
316 |
+
298: mongoose
|
317 |
+
299: meerkat
|
318 |
+
300: tiger beetle
|
319 |
+
301: ladybug
|
320 |
+
302: ground beetle
|
321 |
+
303: longhorn beetle
|
322 |
+
304: leaf beetle
|
323 |
+
305: dung beetle
|
324 |
+
306: rhinoceros beetle
|
325 |
+
307: weevil
|
326 |
+
308: fly
|
327 |
+
309: bee
|
328 |
+
310: ant
|
329 |
+
311: grasshopper
|
330 |
+
312: cricket
|
331 |
+
313: stick insect
|
332 |
+
314: cockroach
|
333 |
+
315: mantis
|
334 |
+
316: cicada
|
335 |
+
317: leafhopper
|
336 |
+
318: lacewing
|
337 |
+
319: dragonfly
|
338 |
+
320: damselfly
|
339 |
+
321: red admiral
|
340 |
+
322: ringlet
|
341 |
+
323: monarch butterfly
|
342 |
+
324: small white
|
343 |
+
325: sulphur butterfly
|
344 |
+
326: gossamer-winged butterfly
|
345 |
+
327: starfish
|
346 |
+
328: sea urchin
|
347 |
+
329: sea cucumber
|
348 |
+
330: cottontail rabbit
|
349 |
+
331: hare
|
350 |
+
332: Angora rabbit
|
351 |
+
333: hamster
|
352 |
+
334: porcupine
|
353 |
+
335: fox squirrel
|
354 |
+
336: marmot
|
355 |
+
337: beaver
|
356 |
+
338: guinea pig
|
357 |
+
339: common sorrel
|
358 |
+
340: zebra
|
359 |
+
341: pig
|
360 |
+
342: wild boar
|
361 |
+
343: warthog
|
362 |
+
344: hippopotamus
|
363 |
+
345: ox
|
364 |
+
346: water buffalo
|
365 |
+
347: bison
|
366 |
+
348: ram
|
367 |
+
349: bighorn sheep
|
368 |
+
350: Alpine ibex
|
369 |
+
351: hartebeest
|
370 |
+
352: impala
|
371 |
+
353: gazelle
|
372 |
+
354: dromedary
|
373 |
+
355: llama
|
374 |
+
356: weasel
|
375 |
+
357: mink
|
376 |
+
358: European polecat
|
377 |
+
359: black-footed ferret
|
378 |
+
360: otter
|
379 |
+
361: skunk
|
380 |
+
362: badger
|
381 |
+
363: armadillo
|
382 |
+
364: three-toed sloth
|
383 |
+
365: orangutan
|
384 |
+
366: gorilla
|
385 |
+
367: chimpanzee
|
386 |
+
368: gibbon
|
387 |
+
369: siamang
|
388 |
+
370: guenon
|
389 |
+
371: patas monkey
|
390 |
+
372: baboon
|
391 |
+
373: macaque
|
392 |
+
374: langur
|
393 |
+
375: black-and-white colobus
|
394 |
+
376: proboscis monkey
|
395 |
+
377: marmoset
|
396 |
+
378: white-headed capuchin
|
397 |
+
379: howler monkey
|
398 |
+
380: titi
|
399 |
+
381: Geoffroy's spider monkey
|
400 |
+
382: common squirrel monkey
|
401 |
+
383: ring-tailed lemur
|
402 |
+
384: indri
|
403 |
+
385: Asian elephant
|
404 |
+
386: African bush elephant
|
405 |
+
387: red panda
|
406 |
+
388: giant panda
|
407 |
+
389: snoek
|
408 |
+
390: eel
|
409 |
+
391: coho salmon
|
410 |
+
392: rock beauty
|
411 |
+
393: clownfish
|
412 |
+
394: sturgeon
|
413 |
+
395: garfish
|
414 |
+
396: lionfish
|
415 |
+
397: pufferfish
|
416 |
+
398: abacus
|
417 |
+
399: abaya
|
418 |
+
400: academic gown
|
419 |
+
401: accordion
|
420 |
+
402: acoustic guitar
|
421 |
+
403: aircraft carrier
|
422 |
+
404: airliner
|
423 |
+
405: airship
|
424 |
+
406: altar
|
425 |
+
407: ambulance
|
426 |
+
408: amphibious vehicle
|
427 |
+
409: analog clock
|
428 |
+
410: apiary
|
429 |
+
411: apron
|
430 |
+
412: waste container
|
431 |
+
413: assault rifle
|
432 |
+
414: backpack
|
433 |
+
415: bakery
|
434 |
+
416: balance beam
|
435 |
+
417: balloon
|
436 |
+
418: ballpoint pen
|
437 |
+
419: Band-Aid
|
438 |
+
420: banjo
|
439 |
+
421: baluster
|
440 |
+
422: barbell
|
441 |
+
423: barber chair
|
442 |
+
424: barbershop
|
443 |
+
425: barn
|
444 |
+
426: barometer
|
445 |
+
427: barrel
|
446 |
+
428: wheelbarrow
|
447 |
+
429: baseball
|
448 |
+
430: basketball
|
449 |
+
431: bassinet
|
450 |
+
432: bassoon
|
451 |
+
433: swimming cap
|
452 |
+
434: bath towel
|
453 |
+
435: bathtub
|
454 |
+
436: station wagon
|
455 |
+
437: lighthouse
|
456 |
+
438: beaker
|
457 |
+
439: military cap
|
458 |
+
440: beer bottle
|
459 |
+
441: beer glass
|
460 |
+
442: bell-cot
|
461 |
+
443: bib
|
462 |
+
444: tandem bicycle
|
463 |
+
445: bikini
|
464 |
+
446: ring binder
|
465 |
+
447: binoculars
|
466 |
+
448: birdhouse
|
467 |
+
449: boathouse
|
468 |
+
450: bobsleigh
|
469 |
+
451: bolo tie
|
470 |
+
452: poke bonnet
|
471 |
+
453: bookcase
|
472 |
+
454: bookstore
|
473 |
+
455: bottle cap
|
474 |
+
456: bow
|
475 |
+
457: bow tie
|
476 |
+
458: brass
|
477 |
+
459: bra
|
478 |
+
460: breakwater
|
479 |
+
461: breastplate
|
480 |
+
462: broom
|
481 |
+
463: bucket
|
482 |
+
464: buckle
|
483 |
+
465: bulletproof vest
|
484 |
+
466: high-speed train
|
485 |
+
467: butcher shop
|
486 |
+
468: taxicab
|
487 |
+
469: cauldron
|
488 |
+
470: candle
|
489 |
+
471: cannon
|
490 |
+
472: canoe
|
491 |
+
473: can opener
|
492 |
+
474: cardigan
|
493 |
+
475: car mirror
|
494 |
+
476: carousel
|
495 |
+
477: tool kit
|
496 |
+
478: carton
|
497 |
+
479: car wheel
|
498 |
+
480: automated teller machine
|
499 |
+
481: cassette
|
500 |
+
482: cassette player
|
501 |
+
483: castle
|
502 |
+
484: catamaran
|
503 |
+
485: CD player
|
504 |
+
486: cello
|
505 |
+
487: mobile phone
|
506 |
+
488: chain
|
507 |
+
489: chain-link fence
|
508 |
+
490: chain mail
|
509 |
+
491: chainsaw
|
510 |
+
492: chest
|
511 |
+
493: chiffonier
|
512 |
+
494: chime
|
513 |
+
495: china cabinet
|
514 |
+
496: Christmas stocking
|
515 |
+
497: church
|
516 |
+
498: movie theater
|
517 |
+
499: cleaver
|
518 |
+
500: cliff dwelling
|
519 |
+
501: cloak
|
520 |
+
502: clogs
|
521 |
+
503: cocktail shaker
|
522 |
+
504: coffee mug
|
523 |
+
505: coffeemaker
|
524 |
+
506: coil
|
525 |
+
507: combination lock
|
526 |
+
508: computer keyboard
|
527 |
+
509: confectionery store
|
528 |
+
510: container ship
|
529 |
+
511: convertible
|
530 |
+
512: corkscrew
|
531 |
+
513: cornet
|
532 |
+
514: cowboy boot
|
533 |
+
515: cowboy hat
|
534 |
+
516: cradle
|
535 |
+
517: crane (machine)
|
536 |
+
518: crash helmet
|
537 |
+
519: crate
|
538 |
+
520: infant bed
|
539 |
+
521: Crock Pot
|
540 |
+
522: croquet ball
|
541 |
+
523: crutch
|
542 |
+
524: cuirass
|
543 |
+
525: dam
|
544 |
+
526: desk
|
545 |
+
527: desktop computer
|
546 |
+
528: rotary dial telephone
|
547 |
+
529: diaper
|
548 |
+
530: digital clock
|
549 |
+
531: digital watch
|
550 |
+
532: dining table
|
551 |
+
533: dishcloth
|
552 |
+
534: dishwasher
|
553 |
+
535: disc brake
|
554 |
+
536: dock
|
555 |
+
537: dog sled
|
556 |
+
538: dome
|
557 |
+
539: doormat
|
558 |
+
540: drilling rig
|
559 |
+
541: drum
|
560 |
+
542: drumstick
|
561 |
+
543: dumbbell
|
562 |
+
544: Dutch oven
|
563 |
+
545: electric fan
|
564 |
+
546: electric guitar
|
565 |
+
547: electric locomotive
|
566 |
+
548: entertainment center
|
567 |
+
549: envelope
|
568 |
+
550: espresso machine
|
569 |
+
551: face powder
|
570 |
+
552: feather boa
|
571 |
+
553: filing cabinet
|
572 |
+
554: fireboat
|
573 |
+
555: fire engine
|
574 |
+
556: fire screen sheet
|
575 |
+
557: flagpole
|
576 |
+
558: flute
|
577 |
+
559: folding chair
|
578 |
+
560: football helmet
|
579 |
+
561: forklift
|
580 |
+
562: fountain
|
581 |
+
563: fountain pen
|
582 |
+
564: four-poster bed
|
583 |
+
565: freight car
|
584 |
+
566: French horn
|
585 |
+
567: frying pan
|
586 |
+
568: fur coat
|
587 |
+
569: garbage truck
|
588 |
+
570: gas mask
|
589 |
+
571: gas pump
|
590 |
+
572: goblet
|
591 |
+
573: go-kart
|
592 |
+
574: golf ball
|
593 |
+
575: golf cart
|
594 |
+
576: gondola
|
595 |
+
577: gong
|
596 |
+
578: gown
|
597 |
+
579: grand piano
|
598 |
+
580: greenhouse
|
599 |
+
581: grille
|
600 |
+
582: grocery store
|
601 |
+
583: guillotine
|
602 |
+
584: barrette
|
603 |
+
585: hair spray
|
604 |
+
586: half-track
|
605 |
+
587: hammer
|
606 |
+
588: hamper
|
607 |
+
589: hair dryer
|
608 |
+
590: hand-held computer
|
609 |
+
591: handkerchief
|
610 |
+
592: hard disk drive
|
611 |
+
593: harmonica
|
612 |
+
594: harp
|
613 |
+
595: harvester
|
614 |
+
596: hatchet
|
615 |
+
597: holster
|
616 |
+
598: home theater
|
617 |
+
599: honeycomb
|
618 |
+
600: hook
|
619 |
+
601: hoop skirt
|
620 |
+
602: horizontal bar
|
621 |
+
603: horse-drawn vehicle
|
622 |
+
604: hourglass
|
623 |
+
605: iPod
|
624 |
+
606: clothes iron
|
625 |
+
607: jack-o'-lantern
|
626 |
+
608: jeans
|
627 |
+
609: jeep
|
628 |
+
610: T-shirt
|
629 |
+
611: jigsaw puzzle
|
630 |
+
612: pulled rickshaw
|
631 |
+
613: joystick
|
632 |
+
614: kimono
|
633 |
+
615: knee pad
|
634 |
+
616: knot
|
635 |
+
617: lab coat
|
636 |
+
618: ladle
|
637 |
+
619: lampshade
|
638 |
+
620: laptop computer
|
639 |
+
621: lawn mower
|
640 |
+
622: lens cap
|
641 |
+
623: paper knife
|
642 |
+
624: library
|
643 |
+
625: lifeboat
|
644 |
+
626: lighter
|
645 |
+
627: limousine
|
646 |
+
628: ocean liner
|
647 |
+
629: lipstick
|
648 |
+
630: slip-on shoe
|
649 |
+
631: lotion
|
650 |
+
632: speaker
|
651 |
+
633: loupe
|
652 |
+
634: sawmill
|
653 |
+
635: magnetic compass
|
654 |
+
636: mail bag
|
655 |
+
637: mailbox
|
656 |
+
638: tights
|
657 |
+
639: tank suit
|
658 |
+
640: manhole cover
|
659 |
+
641: maraca
|
660 |
+
642: marimba
|
661 |
+
643: mask
|
662 |
+
644: match
|
663 |
+
645: maypole
|
664 |
+
646: maze
|
665 |
+
647: measuring cup
|
666 |
+
648: medicine chest
|
667 |
+
649: megalith
|
668 |
+
650: microphone
|
669 |
+
651: microwave oven
|
670 |
+
652: military uniform
|
671 |
+
653: milk can
|
672 |
+
654: minibus
|
673 |
+
655: miniskirt
|
674 |
+
656: minivan
|
675 |
+
657: missile
|
676 |
+
658: mitten
|
677 |
+
659: mixing bowl
|
678 |
+
660: mobile home
|
679 |
+
661: Model T
|
680 |
+
662: modem
|
681 |
+
663: monastery
|
682 |
+
664: monitor
|
683 |
+
665: moped
|
684 |
+
666: mortar
|
685 |
+
667: square academic cap
|
686 |
+
668: mosque
|
687 |
+
669: mosquito net
|
688 |
+
670: scooter
|
689 |
+
671: mountain bike
|
690 |
+
672: tent
|
691 |
+
673: computer mouse
|
692 |
+
674: mousetrap
|
693 |
+
675: moving van
|
694 |
+
676: muzzle
|
695 |
+
677: nail
|
696 |
+
678: neck brace
|
697 |
+
679: necklace
|
698 |
+
680: nipple
|
699 |
+
681: notebook computer
|
700 |
+
682: obelisk
|
701 |
+
683: oboe
|
702 |
+
684: ocarina
|
703 |
+
685: odometer
|
704 |
+
686: oil filter
|
705 |
+
687: organ
|
706 |
+
688: oscilloscope
|
707 |
+
689: overskirt
|
708 |
+
690: bullock cart
|
709 |
+
691: oxygen mask
|
710 |
+
692: packet
|
711 |
+
693: paddle
|
712 |
+
694: paddle wheel
|
713 |
+
695: padlock
|
714 |
+
696: paintbrush
|
715 |
+
697: pajamas
|
716 |
+
698: palace
|
717 |
+
699: pan flute
|
718 |
+
700: paper towel
|
719 |
+
701: parachute
|
720 |
+
702: parallel bars
|
721 |
+
703: park bench
|
722 |
+
704: parking meter
|
723 |
+
705: passenger car
|
724 |
+
706: patio
|
725 |
+
707: payphone
|
726 |
+
708: pedestal
|
727 |
+
709: pencil case
|
728 |
+
710: pencil sharpener
|
729 |
+
711: perfume
|
730 |
+
712: Petri dish
|
731 |
+
713: photocopier
|
732 |
+
714: plectrum
|
733 |
+
715: Pickelhaube
|
734 |
+
716: picket fence
|
735 |
+
717: pickup truck
|
736 |
+
718: pier
|
737 |
+
719: piggy bank
|
738 |
+
720: pill bottle
|
739 |
+
721: pillow
|
740 |
+
722: ping-pong ball
|
741 |
+
723: pinwheel
|
742 |
+
724: pirate ship
|
743 |
+
725: pitcher
|
744 |
+
726: hand plane
|
745 |
+
727: planetarium
|
746 |
+
728: plastic bag
|
747 |
+
729: plate rack
|
748 |
+
730: plow
|
749 |
+
731: plunger
|
750 |
+
732: Polaroid camera
|
751 |
+
733: pole
|
752 |
+
734: police van
|
753 |
+
735: poncho
|
754 |
+
736: billiard table
|
755 |
+
737: soda bottle
|
756 |
+
738: pot
|
757 |
+
739: potter's wheel
|
758 |
+
740: power drill
|
759 |
+
741: prayer rug
|
760 |
+
742: printer
|
761 |
+
743: prison
|
762 |
+
744: projectile
|
763 |
+
745: projector
|
764 |
+
746: hockey puck
|
765 |
+
747: punching bag
|
766 |
+
748: purse
|
767 |
+
749: quill
|
768 |
+
750: quilt
|
769 |
+
751: race car
|
770 |
+
752: racket
|
771 |
+
753: radiator
|
772 |
+
754: radio
|
773 |
+
755: radio telescope
|
774 |
+
756: rain barrel
|
775 |
+
757: recreational vehicle
|
776 |
+
758: reel
|
777 |
+
759: reflex camera
|
778 |
+
760: refrigerator
|
779 |
+
761: remote control
|
780 |
+
762: restaurant
|
781 |
+
763: revolver
|
782 |
+
764: rifle
|
783 |
+
765: rocking chair
|
784 |
+
766: rotisserie
|
785 |
+
767: eraser
|
786 |
+
768: rugby ball
|
787 |
+
769: ruler
|
788 |
+
770: running shoe
|
789 |
+
771: safe
|
790 |
+
772: safety pin
|
791 |
+
773: salt shaker
|
792 |
+
774: sandal
|
793 |
+
775: sarong
|
794 |
+
776: saxophone
|
795 |
+
777: scabbard
|
796 |
+
778: weighing scale
|
797 |
+
779: school bus
|
798 |
+
780: schooner
|
799 |
+
781: scoreboard
|
800 |
+
782: CRT screen
|
801 |
+
783: screw
|
802 |
+
784: screwdriver
|
803 |
+
785: seat belt
|
804 |
+
786: sewing machine
|
805 |
+
787: shield
|
806 |
+
788: shoe store
|
807 |
+
789: shoji
|
808 |
+
790: shopping basket
|
809 |
+
791: shopping cart
|
810 |
+
792: shovel
|
811 |
+
793: shower cap
|
812 |
+
794: shower curtain
|
813 |
+
795: ski
|
814 |
+
796: ski mask
|
815 |
+
797: sleeping bag
|
816 |
+
798: slide rule
|
817 |
+
799: sliding door
|
818 |
+
800: slot machine
|
819 |
+
801: snorkel
|
820 |
+
802: snowmobile
|
821 |
+
803: snowplow
|
822 |
+
804: soap dispenser
|
823 |
+
805: soccer ball
|
824 |
+
806: sock
|
825 |
+
807: solar thermal collector
|
826 |
+
808: sombrero
|
827 |
+
809: soup bowl
|
828 |
+
810: space bar
|
829 |
+
811: space heater
|
830 |
+
812: space shuttle
|
831 |
+
813: spatula
|
832 |
+
814: motorboat
|
833 |
+
815: spider web
|
834 |
+
816: spindle
|
835 |
+
817: sports car
|
836 |
+
818: spotlight
|
837 |
+
819: stage
|
838 |
+
820: steam locomotive
|
839 |
+
821: through arch bridge
|
840 |
+
822: steel drum
|
841 |
+
823: stethoscope
|
842 |
+
824: scarf
|
843 |
+
825: stone wall
|
844 |
+
826: stopwatch
|
845 |
+
827: stove
|
846 |
+
828: strainer
|
847 |
+
829: tram
|
848 |
+
830: stretcher
|
849 |
+
831: couch
|
850 |
+
832: stupa
|
851 |
+
833: submarine
|
852 |
+
834: suit
|
853 |
+
835: sundial
|
854 |
+
836: sunglass
|
855 |
+
837: sunglasses
|
856 |
+
838: sunscreen
|
857 |
+
839: suspension bridge
|
858 |
+
840: mop
|
859 |
+
841: sweatshirt
|
860 |
+
842: swimsuit
|
861 |
+
843: swing
|
862 |
+
844: switch
|
863 |
+
845: syringe
|
864 |
+
846: table lamp
|
865 |
+
847: tank
|
866 |
+
848: tape player
|
867 |
+
849: teapot
|
868 |
+
850: teddy bear
|
869 |
+
851: television
|
870 |
+
852: tennis ball
|
871 |
+
853: thatched roof
|
872 |
+
854: front curtain
|
873 |
+
855: thimble
|
874 |
+
856: threshing machine
|
875 |
+
857: throne
|
876 |
+
858: tile roof
|
877 |
+
859: toaster
|
878 |
+
860: tobacco shop
|
879 |
+
861: toilet seat
|
880 |
+
862: torch
|
881 |
+
863: totem pole
|
882 |
+
864: tow truck
|
883 |
+
865: toy store
|
884 |
+
866: tractor
|
885 |
+
867: semi-trailer truck
|
886 |
+
868: tray
|
887 |
+
869: trench coat
|
888 |
+
870: tricycle
|
889 |
+
871: trimaran
|
890 |
+
872: tripod
|
891 |
+
873: triumphal arch
|
892 |
+
874: trolleybus
|
893 |
+
875: trombone
|
894 |
+
876: tub
|
895 |
+
877: turnstile
|
896 |
+
878: typewriter keyboard
|
897 |
+
879: umbrella
|
898 |
+
880: unicycle
|
899 |
+
881: upright piano
|
900 |
+
882: vacuum cleaner
|
901 |
+
883: vase
|
902 |
+
884: vault
|
903 |
+
885: velvet
|
904 |
+
886: vending machine
|
905 |
+
887: vestment
|
906 |
+
888: viaduct
|
907 |
+
889: violin
|
908 |
+
890: volleyball
|
909 |
+
891: waffle iron
|
910 |
+
892: wall clock
|
911 |
+
893: wallet
|
912 |
+
894: wardrobe
|
913 |
+
895: military aircraft
|
914 |
+
896: sink
|
915 |
+
897: washing machine
|
916 |
+
898: water bottle
|
917 |
+
899: water jug
|
918 |
+
900: water tower
|
919 |
+
901: whiskey jug
|
920 |
+
902: whistle
|
921 |
+
903: wig
|
922 |
+
904: window screen
|
923 |
+
905: window shade
|
924 |
+
906: Windsor tie
|
925 |
+
907: wine bottle
|
926 |
+
908: wing
|
927 |
+
909: wok
|
928 |
+
910: wooden spoon
|
929 |
+
911: wool
|
930 |
+
912: split-rail fence
|
931 |
+
913: shipwreck
|
932 |
+
914: yawl
|
933 |
+
915: yurt
|
934 |
+
916: website
|
935 |
+
917: comic book
|
936 |
+
918: crossword
|
937 |
+
919: traffic sign
|
938 |
+
920: traffic light
|
939 |
+
921: dust jacket
|
940 |
+
922: menu
|
941 |
+
923: plate
|
942 |
+
924: guacamole
|
943 |
+
925: consomme
|
944 |
+
926: hot pot
|
945 |
+
927: trifle
|
946 |
+
928: ice cream
|
947 |
+
929: ice pop
|
948 |
+
930: baguette
|
949 |
+
931: bagel
|
950 |
+
932: pretzel
|
951 |
+
933: cheeseburger
|
952 |
+
934: hot dog
|
953 |
+
935: mashed potato
|
954 |
+
936: cabbage
|
955 |
+
937: broccoli
|
956 |
+
938: cauliflower
|
957 |
+
939: zucchini
|
958 |
+
940: spaghetti squash
|
959 |
+
941: acorn squash
|
960 |
+
942: butternut squash
|
961 |
+
943: cucumber
|
962 |
+
944: artichoke
|
963 |
+
945: bell pepper
|
964 |
+
946: cardoon
|
965 |
+
947: mushroom
|
966 |
+
948: Granny Smith
|
967 |
+
949: strawberry
|
968 |
+
950: orange
|
969 |
+
951: lemon
|
970 |
+
952: fig
|
971 |
+
953: pineapple
|
972 |
+
954: banana
|
973 |
+
955: jackfruit
|
974 |
+
956: custard apple
|
975 |
+
957: pomegranate
|
976 |
+
958: hay
|
977 |
+
959: carbonara
|
978 |
+
960: chocolate syrup
|
979 |
+
961: dough
|
980 |
+
962: meatloaf
|
981 |
+
963: pizza
|
982 |
+
964: pot pie
|
983 |
+
965: burrito
|
984 |
+
966: red wine
|
985 |
+
967: espresso
|
986 |
+
968: cup
|
987 |
+
969: eggnog
|
988 |
+
970: alp
|
989 |
+
971: bubble
|
990 |
+
972: cliff
|
991 |
+
973: coral reef
|
992 |
+
974: geyser
|
993 |
+
975: lakeshore
|
994 |
+
976: promontory
|
995 |
+
977: shoal
|
996 |
+
978: seashore
|
997 |
+
979: valley
|
998 |
+
980: volcano
|
999 |
+
981: baseball player
|
1000 |
+
982: bridegroom
|
1001 |
+
983: scuba diver
|
1002 |
+
984: rapeseed
|
1003 |
+
985: daisy
|
1004 |
+
986: yellow lady's slipper
|
1005 |
+
987: corn
|
1006 |
+
988: acorn
|
1007 |
+
989: rose hip
|
1008 |
+
990: horse chestnut seed
|
1009 |
+
991: coral fungus
|
1010 |
+
992: agaric
|
1011 |
+
993: gyromitra
|
1012 |
+
994: stinkhorn mushroom
|
1013 |
+
995: earth star
|
1014 |
+
996: hen-of-the-woods
|
1015 |
+
997: bolete
|
1016 |
+
998: ear
|
1017 |
+
999: toilet paper
|
1018 |
+
|
1019 |
+
# Download script/URL (optional)
|
1020 |
+
download: data/scripts/get_imagenet.sh
|
models/yolov5/data/ImageNet10.yaml
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
# ImageNet-1k dataset https://www.image-net.org/index.php by Stanford University
|
3 |
+
# Simplified class names from https://github.com/anishathalye/imagenet-simple-labels
|
4 |
+
# Example usage: python classify/train.py --data imagenet
|
5 |
+
# parent
|
6 |
+
# ├── yolov5
|
7 |
+
# └── datasets
|
8 |
+
# └── imagenet10 ← downloads here
|
9 |
+
|
10 |
+
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
11 |
+
path: ../datasets/imagenet10 # dataset root dir
|
12 |
+
train: train # train images (relative to 'path') 1281167 images
|
13 |
+
val: val # val images (relative to 'path') 50000 images
|
14 |
+
test: # test images (optional)
|
15 |
+
|
16 |
+
# Classes
|
17 |
+
names:
|
18 |
+
0: tench
|
19 |
+
1: goldfish
|
20 |
+
2: great white shark
|
21 |
+
3: tiger shark
|
22 |
+
4: hammerhead shark
|
23 |
+
5: electric ray
|
24 |
+
6: stingray
|
25 |
+
7: cock
|
26 |
+
8: hen
|
27 |
+
9: ostrich
|
28 |
+
|
29 |
+
# Download script/URL (optional)
|
30 |
+
download: data/scripts/get_imagenet10.sh
|
models/yolov5/data/ImageNet100.yaml
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
# ImageNet-1k dataset https://www.image-net.org/index.php by Stanford University
|
3 |
+
# Simplified class names from https://github.com/anishathalye/imagenet-simple-labels
|
4 |
+
# Example usage: python classify/train.py --data imagenet
|
5 |
+
# parent
|
6 |
+
# ├── yolov5
|
7 |
+
# └── datasets
|
8 |
+
# └── imagenet100 ← downloads here
|
9 |
+
|
10 |
+
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
11 |
+
path: ../datasets/imagenet100 # dataset root dir
|
12 |
+
train: train # train images (relative to 'path') 1281167 images
|
13 |
+
val: val # val images (relative to 'path') 50000 images
|
14 |
+
test: # test images (optional)
|
15 |
+
|
16 |
+
# Classes
|
17 |
+
names:
|
18 |
+
0: tench
|
19 |
+
1: goldfish
|
20 |
+
2: great white shark
|
21 |
+
3: tiger shark
|
22 |
+
4: hammerhead shark
|
23 |
+
5: electric ray
|
24 |
+
6: stingray
|
25 |
+
7: cock
|
26 |
+
8: hen
|
27 |
+
9: ostrich
|
28 |
+
10: brambling
|
29 |
+
11: goldfinch
|
30 |
+
12: house finch
|
31 |
+
13: junco
|
32 |
+
14: indigo bunting
|
33 |
+
15: American robin
|
34 |
+
16: bulbul
|
35 |
+
17: jay
|
36 |
+
18: magpie
|
37 |
+
19: chickadee
|
38 |
+
20: American dipper
|
39 |
+
21: kite
|
40 |
+
22: bald eagle
|
41 |
+
23: vulture
|
42 |
+
24: great grey owl
|
43 |
+
25: fire salamander
|
44 |
+
26: smooth newt
|
45 |
+
27: newt
|
46 |
+
28: spotted salamander
|
47 |
+
29: axolotl
|
48 |
+
30: American bullfrog
|
49 |
+
31: tree frog
|
50 |
+
32: tailed frog
|
51 |
+
33: loggerhead sea turtle
|
52 |
+
34: leatherback sea turtle
|
53 |
+
35: mud turtle
|
54 |
+
36: terrapin
|
55 |
+
37: box turtle
|
56 |
+
38: banded gecko
|
57 |
+
39: green iguana
|
58 |
+
40: Carolina anole
|
59 |
+
41: desert grassland whiptail lizard
|
60 |
+
42: agama
|
61 |
+
43: frilled-necked lizard
|
62 |
+
44: alligator lizard
|
63 |
+
45: Gila monster
|
64 |
+
46: European green lizard
|
65 |
+
47: chameleon
|
66 |
+
48: Komodo dragon
|
67 |
+
49: Nile crocodile
|
68 |
+
50: American alligator
|
69 |
+
51: triceratops
|
70 |
+
52: worm snake
|
71 |
+
53: ring-necked snake
|
72 |
+
54: eastern hog-nosed snake
|
73 |
+
55: smooth green snake
|
74 |
+
56: kingsnake
|
75 |
+
57: garter snake
|
76 |
+
58: water snake
|
77 |
+
59: vine snake
|
78 |
+
60: night snake
|
79 |
+
61: boa constrictor
|
80 |
+
62: African rock python
|
81 |
+
63: Indian cobra
|
82 |
+
64: green mamba
|
83 |
+
65: sea snake
|
84 |
+
66: Saharan horned viper
|
85 |
+
67: eastern diamondback rattlesnake
|
86 |
+
68: sidewinder
|
87 |
+
69: trilobite
|
88 |
+
70: harvestman
|
89 |
+
71: scorpion
|
90 |
+
72: yellow garden spider
|
91 |
+
73: barn spider
|
92 |
+
74: European garden spider
|
93 |
+
75: southern black widow
|
94 |
+
76: tarantula
|
95 |
+
77: wolf spider
|
96 |
+
78: tick
|
97 |
+
79: centipede
|
98 |
+
80: black grouse
|
99 |
+
81: ptarmigan
|
100 |
+
82: ruffed grouse
|
101 |
+
83: prairie grouse
|
102 |
+
84: peacock
|
103 |
+
85: quail
|
104 |
+
86: partridge
|
105 |
+
87: grey parrot
|
106 |
+
88: macaw
|
107 |
+
89: sulphur-crested cockatoo
|
108 |
+
90: lorikeet
|
109 |
+
91: coucal
|
110 |
+
92: bee eater
|
111 |
+
93: hornbill
|
112 |
+
94: hummingbird
|
113 |
+
95: jacamar
|
114 |
+
96: toucan
|
115 |
+
97: duck
|
116 |
+
98: red-breasted merganser
|
117 |
+
99: goose
|
118 |
+
# Download script/URL (optional)
|
119 |
+
download: data/scripts/get_imagenet100.sh
|
models/yolov5/data/ImageNet1000.yaml
ADDED
@@ -0,0 +1,1020 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
# ImageNet-1k dataset https://www.image-net.org/index.php by Stanford University
|
3 |
+
# Simplified class names from https://github.com/anishathalye/imagenet-simple-labels
|
4 |
+
# Example usage: python classify/train.py --data imagenet
|
5 |
+
# parent
|
6 |
+
# ├── yolov5
|
7 |
+
# └── datasets
|
8 |
+
# └── imagenet100 ← downloads here
|
9 |
+
|
10 |
+
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
11 |
+
path: ../datasets/imagenet1000 # dataset root dir
|
12 |
+
train: train # train images (relative to 'path') 1281167 images
|
13 |
+
val: val # val images (relative to 'path') 50000 images
|
14 |
+
test: # test images (optional)
|
15 |
+
|
16 |
+
# Classes
|
17 |
+
names:
|
18 |
+
0: tench
|
19 |
+
1: goldfish
|
20 |
+
2: great white shark
|
21 |
+
3: tiger shark
|
22 |
+
4: hammerhead shark
|
23 |
+
5: electric ray
|
24 |
+
6: stingray
|
25 |
+
7: cock
|
26 |
+
8: hen
|
27 |
+
9: ostrich
|
28 |
+
10: brambling
|
29 |
+
11: goldfinch
|
30 |
+
12: house finch
|
31 |
+
13: junco
|
32 |
+
14: indigo bunting
|
33 |
+
15: American robin
|
34 |
+
16: bulbul
|
35 |
+
17: jay
|
36 |
+
18: magpie
|
37 |
+
19: chickadee
|
38 |
+
20: American dipper
|
39 |
+
21: kite
|
40 |
+
22: bald eagle
|
41 |
+
23: vulture
|
42 |
+
24: great grey owl
|
43 |
+
25: fire salamander
|
44 |
+
26: smooth newt
|
45 |
+
27: newt
|
46 |
+
28: spotted salamander
|
47 |
+
29: axolotl
|
48 |
+
30: American bullfrog
|
49 |
+
31: tree frog
|
50 |
+
32: tailed frog
|
51 |
+
33: loggerhead sea turtle
|
52 |
+
34: leatherback sea turtle
|
53 |
+
35: mud turtle
|
54 |
+
36: terrapin
|
55 |
+
37: box turtle
|
56 |
+
38: banded gecko
|
57 |
+
39: green iguana
|
58 |
+
40: Carolina anole
|
59 |
+
41: desert grassland whiptail lizard
|
60 |
+
42: agama
|
61 |
+
43: frilled-necked lizard
|
62 |
+
44: alligator lizard
|
63 |
+
45: Gila monster
|
64 |
+
46: European green lizard
|
65 |
+
47: chameleon
|
66 |
+
48: Komodo dragon
|
67 |
+
49: Nile crocodile
|
68 |
+
50: American alligator
|
69 |
+
51: triceratops
|
70 |
+
52: worm snake
|
71 |
+
53: ring-necked snake
|
72 |
+
54: eastern hog-nosed snake
|
73 |
+
55: smooth green snake
|
74 |
+
56: kingsnake
|
75 |
+
57: garter snake
|
76 |
+
58: water snake
|
77 |
+
59: vine snake
|
78 |
+
60: night snake
|
79 |
+
61: boa constrictor
|
80 |
+
62: African rock python
|
81 |
+
63: Indian cobra
|
82 |
+
64: green mamba
|
83 |
+
65: sea snake
|
84 |
+
66: Saharan horned viper
|
85 |
+
67: eastern diamondback rattlesnake
|
86 |
+
68: sidewinder
|
87 |
+
69: trilobite
|
88 |
+
70: harvestman
|
89 |
+
71: scorpion
|
90 |
+
72: yellow garden spider
|
91 |
+
73: barn spider
|
92 |
+
74: European garden spider
|
93 |
+
75: southern black widow
|
94 |
+
76: tarantula
|
95 |
+
77: wolf spider
|
96 |
+
78: tick
|
97 |
+
79: centipede
|
98 |
+
80: black grouse
|
99 |
+
81: ptarmigan
|
100 |
+
82: ruffed grouse
|
101 |
+
83: prairie grouse
|
102 |
+
84: peacock
|
103 |
+
85: quail
|
104 |
+
86: partridge
|
105 |
+
87: grey parrot
|
106 |
+
88: macaw
|
107 |
+
89: sulphur-crested cockatoo
|
108 |
+
90: lorikeet
|
109 |
+
91: coucal
|
110 |
+
92: bee eater
|
111 |
+
93: hornbill
|
112 |
+
94: hummingbird
|
113 |
+
95: jacamar
|
114 |
+
96: toucan
|
115 |
+
97: duck
|
116 |
+
98: red-breasted merganser
|
117 |
+
99: goose
|
118 |
+
100: black swan
|
119 |
+
101: tusker
|
120 |
+
102: echidna
|
121 |
+
103: platypus
|
122 |
+
104: wallaby
|
123 |
+
105: koala
|
124 |
+
106: wombat
|
125 |
+
107: jellyfish
|
126 |
+
108: sea anemone
|
127 |
+
109: brain coral
|
128 |
+
110: flatworm
|
129 |
+
111: nematode
|
130 |
+
112: conch
|
131 |
+
113: snail
|
132 |
+
114: slug
|
133 |
+
115: sea slug
|
134 |
+
116: chiton
|
135 |
+
117: chambered nautilus
|
136 |
+
118: Dungeness crab
|
137 |
+
119: rock crab
|
138 |
+
120: fiddler crab
|
139 |
+
121: red king crab
|
140 |
+
122: American lobster
|
141 |
+
123: spiny lobster
|
142 |
+
124: crayfish
|
143 |
+
125: hermit crab
|
144 |
+
126: isopod
|
145 |
+
127: white stork
|
146 |
+
128: black stork
|
147 |
+
129: spoonbill
|
148 |
+
130: flamingo
|
149 |
+
131: little blue heron
|
150 |
+
132: great egret
|
151 |
+
133: bittern
|
152 |
+
134: crane (bird)
|
153 |
+
135: limpkin
|
154 |
+
136: common gallinule
|
155 |
+
137: American coot
|
156 |
+
138: bustard
|
157 |
+
139: ruddy turnstone
|
158 |
+
140: dunlin
|
159 |
+
141: common redshank
|
160 |
+
142: dowitcher
|
161 |
+
143: oystercatcher
|
162 |
+
144: pelican
|
163 |
+
145: king penguin
|
164 |
+
146: albatross
|
165 |
+
147: grey whale
|
166 |
+
148: killer whale
|
167 |
+
149: dugong
|
168 |
+
150: sea lion
|
169 |
+
151: Chihuahua
|
170 |
+
152: Japanese Chin
|
171 |
+
153: Maltese
|
172 |
+
154: Pekingese
|
173 |
+
155: Shih Tzu
|
174 |
+
156: King Charles Spaniel
|
175 |
+
157: Papillon
|
176 |
+
158: toy terrier
|
177 |
+
159: Rhodesian Ridgeback
|
178 |
+
160: Afghan Hound
|
179 |
+
161: Basset Hound
|
180 |
+
162: Beagle
|
181 |
+
163: Bloodhound
|
182 |
+
164: Bluetick Coonhound
|
183 |
+
165: Black and Tan Coonhound
|
184 |
+
166: Treeing Walker Coonhound
|
185 |
+
167: English foxhound
|
186 |
+
168: Redbone Coonhound
|
187 |
+
169: borzoi
|
188 |
+
170: Irish Wolfhound
|
189 |
+
171: Italian Greyhound
|
190 |
+
172: Whippet
|
191 |
+
173: Ibizan Hound
|
192 |
+
174: Norwegian Elkhound
|
193 |
+
175: Otterhound
|
194 |
+
176: Saluki
|
195 |
+
177: Scottish Deerhound
|
196 |
+
178: Weimaraner
|
197 |
+
179: Staffordshire Bull Terrier
|
198 |
+
180: American Staffordshire Terrier
|
199 |
+
181: Bedlington Terrier
|
200 |
+
182: Border Terrier
|
201 |
+
183: Kerry Blue Terrier
|
202 |
+
184: Irish Terrier
|
203 |
+
185: Norfolk Terrier
|
204 |
+
186: Norwich Terrier
|
205 |
+
187: Yorkshire Terrier
|
206 |
+
188: Wire Fox Terrier
|
207 |
+
189: Lakeland Terrier
|
208 |
+
190: Sealyham Terrier
|
209 |
+
191: Airedale Terrier
|
210 |
+
192: Cairn Terrier
|
211 |
+
193: Australian Terrier
|
212 |
+
194: Dandie Dinmont Terrier
|
213 |
+
195: Boston Terrier
|
214 |
+
196: Miniature Schnauzer
|
215 |
+
197: Giant Schnauzer
|
216 |
+
198: Standard Schnauzer
|
217 |
+
199: Scottish Terrier
|
218 |
+
200: Tibetan Terrier
|
219 |
+
201: Australian Silky Terrier
|
220 |
+
202: Soft-coated Wheaten Terrier
|
221 |
+
203: West Highland White Terrier
|
222 |
+
204: Lhasa Apso
|
223 |
+
205: Flat-Coated Retriever
|
224 |
+
206: Curly-coated Retriever
|
225 |
+
207: Golden Retriever
|
226 |
+
208: Labrador Retriever
|
227 |
+
209: Chesapeake Bay Retriever
|
228 |
+
210: German Shorthaired Pointer
|
229 |
+
211: Vizsla
|
230 |
+
212: English Setter
|
231 |
+
213: Irish Setter
|
232 |
+
214: Gordon Setter
|
233 |
+
215: Brittany
|
234 |
+
216: Clumber Spaniel
|
235 |
+
217: English Springer Spaniel
|
236 |
+
218: Welsh Springer Spaniel
|
237 |
+
219: Cocker Spaniels
|
238 |
+
220: Sussex Spaniel
|
239 |
+
221: Irish Water Spaniel
|
240 |
+
222: Kuvasz
|
241 |
+
223: Schipperke
|
242 |
+
224: Groenendael
|
243 |
+
225: Malinois
|
244 |
+
226: Briard
|
245 |
+
227: Australian Kelpie
|
246 |
+
228: Komondor
|
247 |
+
229: Old English Sheepdog
|
248 |
+
230: Shetland Sheepdog
|
249 |
+
231: collie
|
250 |
+
232: Border Collie
|
251 |
+
233: Bouvier des Flandres
|
252 |
+
234: Rottweiler
|
253 |
+
235: German Shepherd Dog
|
254 |
+
236: Dobermann
|
255 |
+
237: Miniature Pinscher
|
256 |
+
238: Greater Swiss Mountain Dog
|
257 |
+
239: Bernese Mountain Dog
|
258 |
+
240: Appenzeller Sennenhund
|
259 |
+
241: Entlebucher Sennenhund
|
260 |
+
242: Boxer
|
261 |
+
243: Bullmastiff
|
262 |
+
244: Tibetan Mastiff
|
263 |
+
245: French Bulldog
|
264 |
+
246: Great Dane
|
265 |
+
247: St. Bernard
|
266 |
+
248: husky
|
267 |
+
249: Alaskan Malamute
|
268 |
+
250: Siberian Husky
|
269 |
+
251: Dalmatian
|
270 |
+
252: Affenpinscher
|
271 |
+
253: Basenji
|
272 |
+
254: pug
|
273 |
+
255: Leonberger
|
274 |
+
256: Newfoundland
|
275 |
+
257: Pyrenean Mountain Dog
|
276 |
+
258: Samoyed
|
277 |
+
259: Pomeranian
|
278 |
+
260: Chow Chow
|
279 |
+
261: Keeshond
|
280 |
+
262: Griffon Bruxellois
|
281 |
+
263: Pembroke Welsh Corgi
|
282 |
+
264: Cardigan Welsh Corgi
|
283 |
+
265: Toy Poodle
|
284 |
+
266: Miniature Poodle
|
285 |
+
267: Standard Poodle
|
286 |
+
268: Mexican hairless dog
|
287 |
+
269: grey wolf
|
288 |
+
270: Alaskan tundra wolf
|
289 |
+
271: red wolf
|
290 |
+
272: coyote
|
291 |
+
273: dingo
|
292 |
+
274: dhole
|
293 |
+
275: African wild dog
|
294 |
+
276: hyena
|
295 |
+
277: red fox
|
296 |
+
278: kit fox
|
297 |
+
279: Arctic fox
|
298 |
+
280: grey fox
|
299 |
+
281: tabby cat
|
300 |
+
282: tiger cat
|
301 |
+
283: Persian cat
|
302 |
+
284: Siamese cat
|
303 |
+
285: Egyptian Mau
|
304 |
+
286: cougar
|
305 |
+
287: lynx
|
306 |
+
288: leopard
|
307 |
+
289: snow leopard
|
308 |
+
290: jaguar
|
309 |
+
291: lion
|
310 |
+
292: tiger
|
311 |
+
293: cheetah
|
312 |
+
294: brown bear
|
313 |
+
295: American black bear
|
314 |
+
296: polar bear
|
315 |
+
297: sloth bear
|
316 |
+
298: mongoose
|
317 |
+
299: meerkat
|
318 |
+
300: tiger beetle
|
319 |
+
301: ladybug
|
320 |
+
302: ground beetle
|
321 |
+
303: longhorn beetle
|
322 |
+
304: leaf beetle
|
323 |
+
305: dung beetle
|
324 |
+
306: rhinoceros beetle
|
325 |
+
307: weevil
|
326 |
+
308: fly
|
327 |
+
309: bee
|
328 |
+
310: ant
|
329 |
+
311: grasshopper
|
330 |
+
312: cricket
|
331 |
+
313: stick insect
|
332 |
+
314: cockroach
|
333 |
+
315: mantis
|
334 |
+
316: cicada
|
335 |
+
317: leafhopper
|
336 |
+
318: lacewing
|
337 |
+
319: dragonfly
|
338 |
+
320: damselfly
|
339 |
+
321: red admiral
|
340 |
+
322: ringlet
|
341 |
+
323: monarch butterfly
|
342 |
+
324: small white
|
343 |
+
325: sulphur butterfly
|
344 |
+
326: gossamer-winged butterfly
|
345 |
+
327: starfish
|
346 |
+
328: sea urchin
|
347 |
+
329: sea cucumber
|
348 |
+
330: cottontail rabbit
|
349 |
+
331: hare
|
350 |
+
332: Angora rabbit
|
351 |
+
333: hamster
|
352 |
+
334: porcupine
|
353 |
+
335: fox squirrel
|
354 |
+
336: marmot
|
355 |
+
337: beaver
|
356 |
+
338: guinea pig
|
357 |
+
339: common sorrel
|
358 |
+
340: zebra
|
359 |
+
341: pig
|
360 |
+
342: wild boar
|
361 |
+
343: warthog
|
362 |
+
344: hippopotamus
|
363 |
+
345: ox
|
364 |
+
346: water buffalo
|
365 |
+
347: bison
|
366 |
+
348: ram
|
367 |
+
349: bighorn sheep
|
368 |
+
350: Alpine ibex
|
369 |
+
351: hartebeest
|
370 |
+
352: impala
|
371 |
+
353: gazelle
|
372 |
+
354: dromedary
|
373 |
+
355: llama
|
374 |
+
356: weasel
|
375 |
+
357: mink
|
376 |
+
358: European polecat
|
377 |
+
359: black-footed ferret
|
378 |
+
360: otter
|
379 |
+
361: skunk
|
380 |
+
362: badger
|
381 |
+
363: armadillo
|
382 |
+
364: three-toed sloth
|
383 |
+
365: orangutan
|
384 |
+
366: gorilla
|
385 |
+
367: chimpanzee
|
386 |
+
368: gibbon
|
387 |
+
369: siamang
|
388 |
+
370: guenon
|
389 |
+
371: patas monkey
|
390 |
+
372: baboon
|
391 |
+
373: macaque
|
392 |
+
374: langur
|
393 |
+
375: black-and-white colobus
|
394 |
+
376: proboscis monkey
|
395 |
+
377: marmoset
|
396 |
+
378: white-headed capuchin
|
397 |
+
379: howler monkey
|
398 |
+
380: titi
|
399 |
+
381: Geoffroy's spider monkey
|
400 |
+
382: common squirrel monkey
|
401 |
+
383: ring-tailed lemur
|
402 |
+
384: indri
|
403 |
+
385: Asian elephant
|
404 |
+
386: African bush elephant
|
405 |
+
387: red panda
|
406 |
+
388: giant panda
|
407 |
+
389: snoek
|
408 |
+
390: eel
|
409 |
+
391: coho salmon
|
410 |
+
392: rock beauty
|
411 |
+
393: clownfish
|
412 |
+
394: sturgeon
|
413 |
+
395: garfish
|
414 |
+
396: lionfish
|
415 |
+
397: pufferfish
|
416 |
+
398: abacus
|
417 |
+
399: abaya
|
418 |
+
400: academic gown
|
419 |
+
401: accordion
|
420 |
+
402: acoustic guitar
|
421 |
+
403: aircraft carrier
|
422 |
+
404: airliner
|
423 |
+
405: airship
|
424 |
+
406: altar
|
425 |
+
407: ambulance
|
426 |
+
408: amphibious vehicle
|
427 |
+
409: analog clock
|
428 |
+
410: apiary
|
429 |
+
411: apron
|
430 |
+
412: waste container
|
431 |
+
413: assault rifle
|
432 |
+
414: backpack
|
433 |
+
415: bakery
|
434 |
+
416: balance beam
|
435 |
+
417: balloon
|
436 |
+
418: ballpoint pen
|
437 |
+
419: Band-Aid
|
438 |
+
420: banjo
|
439 |
+
421: baluster
|
440 |
+
422: barbell
|
441 |
+
423: barber chair
|
442 |
+
424: barbershop
|
443 |
+
425: barn
|
444 |
+
426: barometer
|
445 |
+
427: barrel
|
446 |
+
428: wheelbarrow
|
447 |
+
429: baseball
|
448 |
+
430: basketball
|
449 |
+
431: bassinet
|
450 |
+
432: bassoon
|
451 |
+
433: swimming cap
|
452 |
+
434: bath towel
|
453 |
+
435: bathtub
|
454 |
+
436: station wagon
|
455 |
+
437: lighthouse
|
456 |
+
438: beaker
|
457 |
+
439: military cap
|
458 |
+
440: beer bottle
|
459 |
+
441: beer glass
|
460 |
+
442: bell-cot
|
461 |
+
443: bib
|
462 |
+
444: tandem bicycle
|
463 |
+
445: bikini
|
464 |
+
446: ring binder
|
465 |
+
447: binoculars
|
466 |
+
448: birdhouse
|
467 |
+
449: boathouse
|
468 |
+
450: bobsleigh
|
469 |
+
451: bolo tie
|
470 |
+
452: poke bonnet
|
471 |
+
453: bookcase
|
472 |
+
454: bookstore
|
473 |
+
455: bottle cap
|
474 |
+
456: bow
|
475 |
+
457: bow tie
|
476 |
+
458: brass
|
477 |
+
459: bra
|
478 |
+
460: breakwater
|
479 |
+
461: breastplate
|
480 |
+
462: broom
|
481 |
+
463: bucket
|
482 |
+
464: buckle
|
483 |
+
465: bulletproof vest
|
484 |
+
466: high-speed train
|
485 |
+
467: butcher shop
|
486 |
+
468: taxicab
|
487 |
+
469: cauldron
|
488 |
+
470: candle
|
489 |
+
471: cannon
|
490 |
+
472: canoe
|
491 |
+
473: can opener
|
492 |
+
474: cardigan
|
493 |
+
475: car mirror
|
494 |
+
476: carousel
|
495 |
+
477: tool kit
|
496 |
+
478: carton
|
497 |
+
479: car wheel
|
498 |
+
480: automated teller machine
|
499 |
+
481: cassette
|
500 |
+
482: cassette player
|
501 |
+
483: castle
|
502 |
+
484: catamaran
|
503 |
+
485: CD player
|
504 |
+
486: cello
|
505 |
+
487: mobile phone
|
506 |
+
488: chain
|
507 |
+
489: chain-link fence
|
508 |
+
490: chain mail
|
509 |
+
491: chainsaw
|
510 |
+
492: chest
|
511 |
+
493: chiffonier
|
512 |
+
494: chime
|
513 |
+
495: china cabinet
|
514 |
+
496: Christmas stocking
|
515 |
+
497: church
|
516 |
+
498: movie theater
|
517 |
+
499: cleaver
|
518 |
+
500: cliff dwelling
|
519 |
+
501: cloak
|
520 |
+
502: clogs
|
521 |
+
503: cocktail shaker
|
522 |
+
504: coffee mug
|
523 |
+
505: coffeemaker
|
524 |
+
506: coil
|
525 |
+
507: combination lock
|
526 |
+
508: computer keyboard
|
527 |
+
509: confectionery store
|
528 |
+
510: container ship
|
529 |
+
511: convertible
|
530 |
+
512: corkscrew
|
531 |
+
513: cornet
|
532 |
+
514: cowboy boot
|
533 |
+
515: cowboy hat
|
534 |
+
516: cradle
|
535 |
+
517: crane (machine)
|
536 |
+
518: crash helmet
|
537 |
+
519: crate
|
538 |
+
520: infant bed
|
539 |
+
521: Crock Pot
|
540 |
+
522: croquet ball
|
541 |
+
523: crutch
|
542 |
+
524: cuirass
|
543 |
+
525: dam
|
544 |
+
526: desk
|
545 |
+
527: desktop computer
|
546 |
+
528: rotary dial telephone
|
547 |
+
529: diaper
|
548 |
+
530: digital clock
|
549 |
+
531: digital watch
|
550 |
+
532: dining table
|
551 |
+
533: dishcloth
|
552 |
+
534: dishwasher
|
553 |
+
535: disc brake
|
554 |
+
536: dock
|
555 |
+
537: dog sled
|
556 |
+
538: dome
|
557 |
+
539: doormat
|
558 |
+
540: drilling rig
|
559 |
+
541: drum
|
560 |
+
542: drumstick
|
561 |
+
543: dumbbell
|
562 |
+
544: Dutch oven
|
563 |
+
545: electric fan
|
564 |
+
546: electric guitar
|
565 |
+
547: electric locomotive
|
566 |
+
548: entertainment center
|
567 |
+
549: envelope
|
568 |
+
550: espresso machine
|
569 |
+
551: face powder
|
570 |
+
552: feather boa
|
571 |
+
553: filing cabinet
|
572 |
+
554: fireboat
|
573 |
+
555: fire engine
|
574 |
+
556: fire screen sheet
|
575 |
+
557: flagpole
|
576 |
+
558: flute
|
577 |
+
559: folding chair
|
578 |
+
560: football helmet
|
579 |
+
561: forklift
|
580 |
+
562: fountain
|
581 |
+
563: fountain pen
|
582 |
+
564: four-poster bed
|
583 |
+
565: freight car
|
584 |
+
566: French horn
|
585 |
+
567: frying pan
|
586 |
+
568: fur coat
|
587 |
+
569: garbage truck
|
588 |
+
570: gas mask
|
589 |
+
571: gas pump
|
590 |
+
572: goblet
|
591 |
+
573: go-kart
|
592 |
+
574: golf ball
|
593 |
+
575: golf cart
|
594 |
+
576: gondola
|
595 |
+
577: gong
|
596 |
+
578: gown
|
597 |
+
579: grand piano
|
598 |
+
580: greenhouse
|
599 |
+
581: grille
|
600 |
+
582: grocery store
|
601 |
+
583: guillotine
|
602 |
+
584: barrette
|
603 |
+
585: hair spray
|
604 |
+
586: half-track
|
605 |
+
587: hammer
|
606 |
+
588: hamper
|
607 |
+
589: hair dryer
|
608 |
+
590: hand-held computer
|
609 |
+
591: handkerchief
|
610 |
+
592: hard disk drive
|
611 |
+
593: harmonica
|
612 |
+
594: harp
|
613 |
+
595: harvester
|
614 |
+
596: hatchet
|
615 |
+
597: holster
|
616 |
+
598: home theater
|
617 |
+
599: honeycomb
|
618 |
+
600: hook
|
619 |
+
601: hoop skirt
|
620 |
+
602: horizontal bar
|
621 |
+
603: horse-drawn vehicle
|
622 |
+
604: hourglass
|
623 |
+
605: iPod
|
624 |
+
606: clothes iron
|
625 |
+
607: jack-o'-lantern
|
626 |
+
608: jeans
|
627 |
+
609: jeep
|
628 |
+
610: T-shirt
|
629 |
+
611: jigsaw puzzle
|
630 |
+
612: pulled rickshaw
|
631 |
+
613: joystick
|
632 |
+
614: kimono
|
633 |
+
615: knee pad
|
634 |
+
616: knot
|
635 |
+
617: lab coat
|
636 |
+
618: ladle
|
637 |
+
619: lampshade
|
638 |
+
620: laptop computer
|
639 |
+
621: lawn mower
|
640 |
+
622: lens cap
|
641 |
+
623: paper knife
|
642 |
+
624: library
|
643 |
+
625: lifeboat
|
644 |
+
626: lighter
|
645 |
+
627: limousine
|
646 |
+
628: ocean liner
|
647 |
+
629: lipstick
|
648 |
+
630: slip-on shoe
|
649 |
+
631: lotion
|
650 |
+
632: speaker
|
651 |
+
633: loupe
|
652 |
+
634: sawmill
|
653 |
+
635: magnetic compass
|
654 |
+
636: mail bag
|
655 |
+
637: mailbox
|
656 |
+
638: tights
|
657 |
+
639: tank suit
|
658 |
+
640: manhole cover
|
659 |
+
641: maraca
|
660 |
+
642: marimba
|
661 |
+
643: mask
|
662 |
+
644: match
|
663 |
+
645: maypole
|
664 |
+
646: maze
|
665 |
+
647: measuring cup
|
666 |
+
648: medicine chest
|
667 |
+
649: megalith
|
668 |
+
650: microphone
|
669 |
+
651: microwave oven
|
670 |
+
652: military uniform
|
671 |
+
653: milk can
|
672 |
+
654: minibus
|
673 |
+
655: miniskirt
|
674 |
+
656: minivan
|
675 |
+
657: missile
|
676 |
+
658: mitten
|
677 |
+
659: mixing bowl
|
678 |
+
660: mobile home
|
679 |
+
661: Model T
|
680 |
+
662: modem
|
681 |
+
663: monastery
|
682 |
+
664: monitor
|
683 |
+
665: moped
|
684 |
+
666: mortar
|
685 |
+
667: square academic cap
|
686 |
+
668: mosque
|
687 |
+
669: mosquito net
|
688 |
+
670: scooter
|
689 |
+
671: mountain bike
|
690 |
+
672: tent
|
691 |
+
673: computer mouse
|
692 |
+
674: mousetrap
|
693 |
+
675: moving van
|
694 |
+
676: muzzle
|
695 |
+
677: nail
|
696 |
+
678: neck brace
|
697 |
+
679: necklace
|
698 |
+
680: nipple
|
699 |
+
681: notebook computer
|
700 |
+
682: obelisk
|
701 |
+
683: oboe
|
702 |
+
684: ocarina
|
703 |
+
685: odometer
|
704 |
+
686: oil filter
|
705 |
+
687: organ
|
706 |
+
688: oscilloscope
|
707 |
+
689: overskirt
|
708 |
+
690: bullock cart
|
709 |
+
691: oxygen mask
|
710 |
+
692: packet
|
711 |
+
693: paddle
|
712 |
+
694: paddle wheel
|
713 |
+
695: padlock
|
714 |
+
696: paintbrush
|
715 |
+
697: pajamas
|
716 |
+
698: palace
|
717 |
+
699: pan flute
|
718 |
+
700: paper towel
|
719 |
+
701: parachute
|
720 |
+
702: parallel bars
|
721 |
+
703: park bench
|
722 |
+
704: parking meter
|
723 |
+
705: passenger car
|
724 |
+
706: patio
|
725 |
+
707: payphone
|
726 |
+
708: pedestal
|
727 |
+
709: pencil case
|
728 |
+
710: pencil sharpener
|
729 |
+
711: perfume
|
730 |
+
712: Petri dish
|
731 |
+
713: photocopier
|
732 |
+
714: plectrum
|
733 |
+
715: Pickelhaube
|
734 |
+
716: picket fence
|
735 |
+
717: pickup truck
|
736 |
+
718: pier
|
737 |
+
719: piggy bank
|
738 |
+
720: pill bottle
|
739 |
+
721: pillow
|
740 |
+
722: ping-pong ball
|
741 |
+
723: pinwheel
|
742 |
+
724: pirate ship
|
743 |
+
725: pitcher
|
744 |
+
726: hand plane
|
745 |
+
727: planetarium
|
746 |
+
728: plastic bag
|
747 |
+
729: plate rack
|
748 |
+
730: plow
|
749 |
+
731: plunger
|
750 |
+
732: Polaroid camera
|
751 |
+
733: pole
|
752 |
+
734: police van
|
753 |
+
735: poncho
|
754 |
+
736: billiard table
|
755 |
+
737: soda bottle
|
756 |
+
738: pot
|
757 |
+
739: potter's wheel
|
758 |
+
740: power drill
|
759 |
+
741: prayer rug
|
760 |
+
742: printer
|
761 |
+
743: prison
|
762 |
+
744: projectile
|
763 |
+
745: projector
|
764 |
+
746: hockey puck
|
765 |
+
747: punching bag
|
766 |
+
748: purse
|
767 |
+
749: quill
|
768 |
+
750: quilt
|
769 |
+
751: race car
|
770 |
+
752: racket
|
771 |
+
753: radiator
|
772 |
+
754: radio
|
773 |
+
755: radio telescope
|
774 |
+
756: rain barrel
|
775 |
+
757: recreational vehicle
|
776 |
+
758: reel
|
777 |
+
759: reflex camera
|
778 |
+
760: refrigerator
|
779 |
+
761: remote control
|
780 |
+
762: restaurant
|
781 |
+
763: revolver
|
782 |
+
764: rifle
|
783 |
+
765: rocking chair
|
784 |
+
766: rotisserie
|
785 |
+
767: eraser
|
786 |
+
768: rugby ball
|
787 |
+
769: ruler
|
788 |
+
770: running shoe
|
789 |
+
771: safe
|
790 |
+
772: safety pin
|
791 |
+
773: salt shaker
|
792 |
+
774: sandal
|
793 |
+
775: sarong
|
794 |
+
776: saxophone
|
795 |
+
777: scabbard
|
796 |
+
778: weighing scale
|
797 |
+
779: school bus
|
798 |
+
780: schooner
|
799 |
+
781: scoreboard
|
800 |
+
782: CRT screen
|
801 |
+
783: screw
|
802 |
+
784: screwdriver
|
803 |
+
785: seat belt
|
804 |
+
786: sewing machine
|
805 |
+
787: shield
|
806 |
+
788: shoe store
|
807 |
+
789: shoji
|
808 |
+
790: shopping basket
|
809 |
+
791: shopping cart
|
810 |
+
792: shovel
|
811 |
+
793: shower cap
|
812 |
+
794: shower curtain
|
813 |
+
795: ski
|
814 |
+
796: ski mask
|
815 |
+
797: sleeping bag
|
816 |
+
798: slide rule
|
817 |
+
799: sliding door
|
818 |
+
800: slot machine
|
819 |
+
801: snorkel
|
820 |
+
802: snowmobile
|
821 |
+
803: snowplow
|
822 |
+
804: soap dispenser
|
823 |
+
805: soccer ball
|
824 |
+
806: sock
|
825 |
+
807: solar thermal collector
|
826 |
+
808: sombrero
|
827 |
+
809: soup bowl
|
828 |
+
810: space bar
|
829 |
+
811: space heater
|
830 |
+
812: space shuttle
|
831 |
+
813: spatula
|
832 |
+
814: motorboat
|
833 |
+
815: spider web
|
834 |
+
816: spindle
|
835 |
+
817: sports car
|
836 |
+
818: spotlight
|
837 |
+
819: stage
|
838 |
+
820: steam locomotive
|
839 |
+
821: through arch bridge
|
840 |
+
822: steel drum
|
841 |
+
823: stethoscope
|
842 |
+
824: scarf
|
843 |
+
825: stone wall
|
844 |
+
826: stopwatch
|
845 |
+
827: stove
|
846 |
+
828: strainer
|
847 |
+
829: tram
|
848 |
+
830: stretcher
|
849 |
+
831: couch
|
850 |
+
832: stupa
|
851 |
+
833: submarine
|
852 |
+
834: suit
|
853 |
+
835: sundial
|
854 |
+
836: sunglass
|
855 |
+
837: sunglasses
|
856 |
+
838: sunscreen
|
857 |
+
839: suspension bridge
|
858 |
+
840: mop
|
859 |
+
841: sweatshirt
|
860 |
+
842: swimsuit
|
861 |
+
843: swing
|
862 |
+
844: switch
|
863 |
+
845: syringe
|
864 |
+
846: table lamp
|
865 |
+
847: tank
|
866 |
+
848: tape player
|
867 |
+
849: teapot
|
868 |
+
850: teddy bear
|
869 |
+
851: television
|
870 |
+
852: tennis ball
|
871 |
+
853: thatched roof
|
872 |
+
854: front curtain
|
873 |
+
855: thimble
|
874 |
+
856: threshing machine
|
875 |
+
857: throne
|
876 |
+
858: tile roof
|
877 |
+
859: toaster
|
878 |
+
860: tobacco shop
|
879 |
+
861: toilet seat
|
880 |
+
862: torch
|
881 |
+
863: totem pole
|
882 |
+
864: tow truck
|
883 |
+
865: toy store
|
884 |
+
866: tractor
|
885 |
+
867: semi-trailer truck
|
886 |
+
868: tray
|
887 |
+
869: trench coat
|
888 |
+
870: tricycle
|
889 |
+
871: trimaran
|
890 |
+
872: tripod
|
891 |
+
873: triumphal arch
|
892 |
+
874: trolleybus
|
893 |
+
875: trombone
|
894 |
+
876: tub
|
895 |
+
877: turnstile
|
896 |
+
878: typewriter keyboard
|
897 |
+
879: umbrella
|
898 |
+
880: unicycle
|
899 |
+
881: upright piano
|
900 |
+
882: vacuum cleaner
|
901 |
+
883: vase
|
902 |
+
884: vault
|
903 |
+
885: velvet
|
904 |
+
886: vending machine
|
905 |
+
887: vestment
|
906 |
+
888: viaduct
|
907 |
+
889: violin
|
908 |
+
890: volleyball
|
909 |
+
891: waffle iron
|
910 |
+
892: wall clock
|
911 |
+
893: wallet
|
912 |
+
894: wardrobe
|
913 |
+
895: military aircraft
|
914 |
+
896: sink
|
915 |
+
897: washing machine
|
916 |
+
898: water bottle
|
917 |
+
899: water jug
|
918 |
+
900: water tower
|
919 |
+
901: whiskey jug
|
920 |
+
902: whistle
|
921 |
+
903: wig
|
922 |
+
904: window screen
|
923 |
+
905: window shade
|
924 |
+
906: Windsor tie
|
925 |
+
907: wine bottle
|
926 |
+
908: wing
|
927 |
+
909: wok
|
928 |
+
910: wooden spoon
|
929 |
+
911: wool
|
930 |
+
912: split-rail fence
|
931 |
+
913: shipwreck
|
932 |
+
914: yawl
|
933 |
+
915: yurt
|
934 |
+
916: website
|
935 |
+
917: comic book
|
936 |
+
918: crossword
|
937 |
+
919: traffic sign
|
938 |
+
920: traffic light
|
939 |
+
921: dust jacket
|
940 |
+
922: menu
|
941 |
+
923: plate
|
942 |
+
924: guacamole
|
943 |
+
925: consomme
|
944 |
+
926: hot pot
|
945 |
+
927: trifle
|
946 |
+
928: ice cream
|
947 |
+
929: ice pop
|
948 |
+
930: baguette
|
949 |
+
931: bagel
|
950 |
+
932: pretzel
|
951 |
+
933: cheeseburger
|
952 |
+
934: hot dog
|
953 |
+
935: mashed potato
|
954 |
+
936: cabbage
|
955 |
+
937: broccoli
|
956 |
+
938: cauliflower
|
957 |
+
939: zucchini
|
958 |
+
940: spaghetti squash
|
959 |
+
941: acorn squash
|
960 |
+
942: butternut squash
|
961 |
+
943: cucumber
|
962 |
+
944: artichoke
|
963 |
+
945: bell pepper
|
964 |
+
946: cardoon
|
965 |
+
947: mushroom
|
966 |
+
948: Granny Smith
|
967 |
+
949: strawberry
|
968 |
+
950: orange
|
969 |
+
951: lemon
|
970 |
+
952: fig
|
971 |
+
953: pineapple
|
972 |
+
954: banana
|
973 |
+
955: jackfruit
|
974 |
+
956: custard apple
|
975 |
+
957: pomegranate
|
976 |
+
958: hay
|
977 |
+
959: carbonara
|
978 |
+
960: chocolate syrup
|
979 |
+
961: dough
|
980 |
+
962: meatloaf
|
981 |
+
963: pizza
|
982 |
+
964: pot pie
|
983 |
+
965: burrito
|
984 |
+
966: red wine
|
985 |
+
967: espresso
|
986 |
+
968: cup
|
987 |
+
969: eggnog
|
988 |
+
970: alp
|
989 |
+
971: bubble
|
990 |
+
972: cliff
|
991 |
+
973: coral reef
|
992 |
+
974: geyser
|
993 |
+
975: lakeshore
|
994 |
+
976: promontory
|
995 |
+
977: shoal
|
996 |
+
978: seashore
|
997 |
+
979: valley
|
998 |
+
980: volcano
|
999 |
+
981: baseball player
|
1000 |
+
982: bridegroom
|
1001 |
+
983: scuba diver
|
1002 |
+
984: rapeseed
|
1003 |
+
985: daisy
|
1004 |
+
986: yellow lady's slipper
|
1005 |
+
987: corn
|
1006 |
+
988: acorn
|
1007 |
+
989: rose hip
|
1008 |
+
990: horse chestnut seed
|
1009 |
+
991: coral fungus
|
1010 |
+
992: agaric
|
1011 |
+
993: gyromitra
|
1012 |
+
994: stinkhorn mushroom
|
1013 |
+
995: earth star
|
1014 |
+
996: hen-of-the-woods
|
1015 |
+
997: bolete
|
1016 |
+
998: ear
|
1017 |
+
999: toilet paper
|
1018 |
+
|
1019 |
+
# Download script/URL (optional)
|
1020 |
+
download: data/scripts/get_imagenet1000.sh
|
models/yolov5/data/Objects365.yaml
ADDED
@@ -0,0 +1,436 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
# Objects365 dataset https://www.objects365.org/ by Megvii
|
3 |
+
# Example usage: python train.py --data Objects365.yaml
|
4 |
+
# parent
|
5 |
+
# ├── yolov5
|
6 |
+
# └── datasets
|
7 |
+
# └── Objects365 ← downloads here (712 GB = 367G data + 345G zips)
|
8 |
+
|
9 |
+
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
10 |
+
path: ../datasets/Objects365 # dataset root dir
|
11 |
+
train: images/train # train images (relative to 'path') 1742289 images
|
12 |
+
val: images/val # val images (relative to 'path') 80000 images
|
13 |
+
test: # test images (optional)
|
14 |
+
|
15 |
+
# Classes
|
16 |
+
names:
|
17 |
+
0: Person
|
18 |
+
1: Sneakers
|
19 |
+
2: Chair
|
20 |
+
3: Other Shoes
|
21 |
+
4: Hat
|
22 |
+
5: Car
|
23 |
+
6: Lamp
|
24 |
+
7: Glasses
|
25 |
+
8: Bottle
|
26 |
+
9: Desk
|
27 |
+
10: Cup
|
28 |
+
11: Street Lights
|
29 |
+
12: Cabinet/shelf
|
30 |
+
13: Handbag/Satchel
|
31 |
+
14: Bracelet
|
32 |
+
15: Plate
|
33 |
+
16: Picture/Frame
|
34 |
+
17: Helmet
|
35 |
+
18: Book
|
36 |
+
19: Gloves
|
37 |
+
20: Storage box
|
38 |
+
21: Boat
|
39 |
+
22: Leather Shoes
|
40 |
+
23: Flower
|
41 |
+
24: Bench
|
42 |
+
25: Potted Plant
|
43 |
+
26: Bowl/Basin
|
44 |
+
27: Flag
|
45 |
+
28: Pillow
|
46 |
+
29: Boots
|
47 |
+
30: Vase
|
48 |
+
31: Microphone
|
49 |
+
32: Necklace
|
50 |
+
33: Ring
|
51 |
+
34: SUV
|
52 |
+
35: Wine Glass
|
53 |
+
36: Belt
|
54 |
+
37: Monitor/TV
|
55 |
+
38: Backpack
|
56 |
+
39: Umbrella
|
57 |
+
40: Traffic Light
|
58 |
+
41: Speaker
|
59 |
+
42: Watch
|
60 |
+
43: Tie
|
61 |
+
44: Trash bin Can
|
62 |
+
45: Slippers
|
63 |
+
46: Bicycle
|
64 |
+
47: Stool
|
65 |
+
48: Barrel/bucket
|
66 |
+
49: Van
|
67 |
+
50: Couch
|
68 |
+
51: Sandals
|
69 |
+
52: Basket
|
70 |
+
53: Drum
|
71 |
+
54: Pen/Pencil
|
72 |
+
55: Bus
|
73 |
+
56: Wild Bird
|
74 |
+
57: High Heels
|
75 |
+
58: Motorcycle
|
76 |
+
59: Guitar
|
77 |
+
60: Carpet
|
78 |
+
61: Cell Phone
|
79 |
+
62: Bread
|
80 |
+
63: Camera
|
81 |
+
64: Canned
|
82 |
+
65: Truck
|
83 |
+
66: Traffic cone
|
84 |
+
67: Cymbal
|
85 |
+
68: Lifesaver
|
86 |
+
69: Towel
|
87 |
+
70: Stuffed Toy
|
88 |
+
71: Candle
|
89 |
+
72: Sailboat
|
90 |
+
73: Laptop
|
91 |
+
74: Awning
|
92 |
+
75: Bed
|
93 |
+
76: Faucet
|
94 |
+
77: Tent
|
95 |
+
78: Horse
|
96 |
+
79: Mirror
|
97 |
+
80: Power outlet
|
98 |
+
81: Sink
|
99 |
+
82: Apple
|
100 |
+
83: Air Conditioner
|
101 |
+
84: Knife
|
102 |
+
85: Hockey Stick
|
103 |
+
86: Paddle
|
104 |
+
87: Pickup Truck
|
105 |
+
88: Fork
|
106 |
+
89: Traffic Sign
|
107 |
+
90: Balloon
|
108 |
+
91: Tripod
|
109 |
+
92: Dog
|
110 |
+
93: Spoon
|
111 |
+
94: Clock
|
112 |
+
95: Pot
|
113 |
+
96: Cow
|
114 |
+
97: Cake
|
115 |
+
98: Dinning Table
|
116 |
+
99: Sheep
|
117 |
+
100: Hanger
|
118 |
+
101: Blackboard/Whiteboard
|
119 |
+
102: Napkin
|
120 |
+
103: Other Fish
|
121 |
+
104: Orange/Tangerine
|
122 |
+
105: Toiletry
|
123 |
+
106: Keyboard
|
124 |
+
107: Tomato
|
125 |
+
108: Lantern
|
126 |
+
109: Machinery Vehicle
|
127 |
+
110: Fan
|
128 |
+
111: Green Vegetables
|
129 |
+
112: Banana
|
130 |
+
113: Baseball Glove
|
131 |
+
114: Airplane
|
132 |
+
115: Mouse
|
133 |
+
116: Train
|
134 |
+
117: Pumpkin
|
135 |
+
118: Soccer
|
136 |
+
119: Skiboard
|
137 |
+
120: Luggage
|
138 |
+
121: Nightstand
|
139 |
+
122: Tea pot
|
140 |
+
123: Telephone
|
141 |
+
124: Trolley
|
142 |
+
125: Head Phone
|
143 |
+
126: Sports Car
|
144 |
+
127: Stop Sign
|
145 |
+
128: Dessert
|
146 |
+
129: Scooter
|
147 |
+
130: Stroller
|
148 |
+
131: Crane
|
149 |
+
132: Remote
|
150 |
+
133: Refrigerator
|
151 |
+
134: Oven
|
152 |
+
135: Lemon
|
153 |
+
136: Duck
|
154 |
+
137: Baseball Bat
|
155 |
+
138: Surveillance Camera
|
156 |
+
139: Cat
|
157 |
+
140: Jug
|
158 |
+
141: Broccoli
|
159 |
+
142: Piano
|
160 |
+
143: Pizza
|
161 |
+
144: Elephant
|
162 |
+
145: Skateboard
|
163 |
+
146: Surfboard
|
164 |
+
147: Gun
|
165 |
+
148: Skating and Skiing shoes
|
166 |
+
149: Gas stove
|
167 |
+
150: Donut
|
168 |
+
151: Bow Tie
|
169 |
+
152: Carrot
|
170 |
+
153: Toilet
|
171 |
+
154: Kite
|
172 |
+
155: Strawberry
|
173 |
+
156: Other Balls
|
174 |
+
157: Shovel
|
175 |
+
158: Pepper
|
176 |
+
159: Computer Box
|
177 |
+
160: Toilet Paper
|
178 |
+
161: Cleaning Products
|
179 |
+
162: Chopsticks
|
180 |
+
163: Microwave
|
181 |
+
164: Pigeon
|
182 |
+
165: Baseball
|
183 |
+
166: Cutting/chopping Board
|
184 |
+
167: Coffee Table
|
185 |
+
168: Side Table
|
186 |
+
169: Scissors
|
187 |
+
170: Marker
|
188 |
+
171: Pie
|
189 |
+
172: Ladder
|
190 |
+
173: Snowboard
|
191 |
+
174: Cookies
|
192 |
+
175: Radiator
|
193 |
+
176: Fire Hydrant
|
194 |
+
177: Basketball
|
195 |
+
178: Zebra
|
196 |
+
179: Grape
|
197 |
+
180: Giraffe
|
198 |
+
181: Potato
|
199 |
+
182: Sausage
|
200 |
+
183: Tricycle
|
201 |
+
184: Violin
|
202 |
+
185: Egg
|
203 |
+
186: Fire Extinguisher
|
204 |
+
187: Candy
|
205 |
+
188: Fire Truck
|
206 |
+
189: Billiards
|
207 |
+
190: Converter
|
208 |
+
191: Bathtub
|
209 |
+
192: Wheelchair
|
210 |
+
193: Golf Club
|
211 |
+
194: Briefcase
|
212 |
+
195: Cucumber
|
213 |
+
196: Cigar/Cigarette
|
214 |
+
197: Paint Brush
|
215 |
+
198: Pear
|
216 |
+
199: Heavy Truck
|
217 |
+
200: Hamburger
|
218 |
+
201: Extractor
|
219 |
+
202: Extension Cord
|
220 |
+
203: Tong
|
221 |
+
204: Tennis Racket
|
222 |
+
205: Folder
|
223 |
+
206: American Football
|
224 |
+
207: earphone
|
225 |
+
208: Mask
|
226 |
+
209: Kettle
|
227 |
+
210: Tennis
|
228 |
+
211: Ship
|
229 |
+
212: Swing
|
230 |
+
213: Coffee Machine
|
231 |
+
214: Slide
|
232 |
+
215: Carriage
|
233 |
+
216: Onion
|
234 |
+
217: Green beans
|
235 |
+
218: Projector
|
236 |
+
219: Frisbee
|
237 |
+
220: Washing Machine/Drying Machine
|
238 |
+
221: Chicken
|
239 |
+
222: Printer
|
240 |
+
223: Watermelon
|
241 |
+
224: Saxophone
|
242 |
+
225: Tissue
|
243 |
+
226: Toothbrush
|
244 |
+
227: Ice cream
|
245 |
+
228: Hot-air balloon
|
246 |
+
229: Cello
|
247 |
+
230: French Fries
|
248 |
+
231: Scale
|
249 |
+
232: Trophy
|
250 |
+
233: Cabbage
|
251 |
+
234: Hot dog
|
252 |
+
235: Blender
|
253 |
+
236: Peach
|
254 |
+
237: Rice
|
255 |
+
238: Wallet/Purse
|
256 |
+
239: Volleyball
|
257 |
+
240: Deer
|
258 |
+
241: Goose
|
259 |
+
242: Tape
|
260 |
+
243: Tablet
|
261 |
+
244: Cosmetics
|
262 |
+
245: Trumpet
|
263 |
+
246: Pineapple
|
264 |
+
247: Golf Ball
|
265 |
+
248: Ambulance
|
266 |
+
249: Parking meter
|
267 |
+
250: Mango
|
268 |
+
251: Key
|
269 |
+
252: Hurdle
|
270 |
+
253: Fishing Rod
|
271 |
+
254: Medal
|
272 |
+
255: Flute
|
273 |
+
256: Brush
|
274 |
+
257: Penguin
|
275 |
+
258: Megaphone
|
276 |
+
259: Corn
|
277 |
+
260: Lettuce
|
278 |
+
261: Garlic
|
279 |
+
262: Swan
|
280 |
+
263: Helicopter
|
281 |
+
264: Green Onion
|
282 |
+
265: Sandwich
|
283 |
+
266: Nuts
|
284 |
+
267: Speed Limit Sign
|
285 |
+
268: Induction Cooker
|
286 |
+
269: Broom
|
287 |
+
270: Trombone
|
288 |
+
271: Plum
|
289 |
+
272: Rickshaw
|
290 |
+
273: Goldfish
|
291 |
+
274: Kiwi fruit
|
292 |
+
275: Router/modem
|
293 |
+
276: Poker Card
|
294 |
+
277: Toaster
|
295 |
+
278: Shrimp
|
296 |
+
279: Sushi
|
297 |
+
280: Cheese
|
298 |
+
281: Notepaper
|
299 |
+
282: Cherry
|
300 |
+
283: Pliers
|
301 |
+
284: CD
|
302 |
+
285: Pasta
|
303 |
+
286: Hammer
|
304 |
+
287: Cue
|
305 |
+
288: Avocado
|
306 |
+
289: Hamimelon
|
307 |
+
290: Flask
|
308 |
+
291: Mushroom
|
309 |
+
292: Screwdriver
|
310 |
+
293: Soap
|
311 |
+
294: Recorder
|
312 |
+
295: Bear
|
313 |
+
296: Eggplant
|
314 |
+
297: Board Eraser
|
315 |
+
298: Coconut
|
316 |
+
299: Tape Measure/Ruler
|
317 |
+
300: Pig
|
318 |
+
301: Showerhead
|
319 |
+
302: Globe
|
320 |
+
303: Chips
|
321 |
+
304: Steak
|
322 |
+
305: Crosswalk Sign
|
323 |
+
306: Stapler
|
324 |
+
307: Camel
|
325 |
+
308: Formula 1
|
326 |
+
309: Pomegranate
|
327 |
+
310: Dishwasher
|
328 |
+
311: Crab
|
329 |
+
312: Hoverboard
|
330 |
+
313: Meat ball
|
331 |
+
314: Rice Cooker
|
332 |
+
315: Tuba
|
333 |
+
316: Calculator
|
334 |
+
317: Papaya
|
335 |
+
318: Antelope
|
336 |
+
319: Parrot
|
337 |
+
320: Seal
|
338 |
+
321: Butterfly
|
339 |
+
322: Dumbbell
|
340 |
+
323: Donkey
|
341 |
+
324: Lion
|
342 |
+
325: Urinal
|
343 |
+
326: Dolphin
|
344 |
+
327: Electric Drill
|
345 |
+
328: Hair Dryer
|
346 |
+
329: Egg tart
|
347 |
+
330: Jellyfish
|
348 |
+
331: Treadmill
|
349 |
+
332: Lighter
|
350 |
+
333: Grapefruit
|
351 |
+
334: Game board
|
352 |
+
335: Mop
|
353 |
+
336: Radish
|
354 |
+
337: Baozi
|
355 |
+
338: Target
|
356 |
+
339: French
|
357 |
+
340: Spring Rolls
|
358 |
+
341: Monkey
|
359 |
+
342: Rabbit
|
360 |
+
343: Pencil Case
|
361 |
+
344: Yak
|
362 |
+
345: Red Cabbage
|
363 |
+
346: Binoculars
|
364 |
+
347: Asparagus
|
365 |
+
348: Barbell
|
366 |
+
349: Scallop
|
367 |
+
350: Noddles
|
368 |
+
351: Comb
|
369 |
+
352: Dumpling
|
370 |
+
353: Oyster
|
371 |
+
354: Table Tennis paddle
|
372 |
+
355: Cosmetics Brush/Eyeliner Pencil
|
373 |
+
356: Chainsaw
|
374 |
+
357: Eraser
|
375 |
+
358: Lobster
|
376 |
+
359: Durian
|
377 |
+
360: Okra
|
378 |
+
361: Lipstick
|
379 |
+
362: Cosmetics Mirror
|
380 |
+
363: Curling
|
381 |
+
364: Table Tennis
|
382 |
+
|
383 |
+
# Download script/URL (optional) ---------------------------------------------------------------------------------------
|
384 |
+
download: |
|
385 |
+
from tqdm import tqdm
|
386 |
+
|
387 |
+
from utils.general import Path, check_requirements, download, np, xyxy2xywhn
|
388 |
+
|
389 |
+
check_requirements('pycocotools>=2.0')
|
390 |
+
from pycocotools.coco import COCO
|
391 |
+
|
392 |
+
# Make Directories
|
393 |
+
dir = Path(yaml['path']) # dataset root dir
|
394 |
+
for p in 'images', 'labels':
|
395 |
+
(dir / p).mkdir(parents=True, exist_ok=True)
|
396 |
+
for q in 'train', 'val':
|
397 |
+
(dir / p / q).mkdir(parents=True, exist_ok=True)
|
398 |
+
|
399 |
+
# Train, Val Splits
|
400 |
+
for split, patches in [('train', 50 + 1), ('val', 43 + 1)]:
|
401 |
+
print(f"Processing {split} in {patches} patches ...")
|
402 |
+
images, labels = dir / 'images' / split, dir / 'labels' / split
|
403 |
+
|
404 |
+
# Download
|
405 |
+
url = f"https://dorc.ks3-cn-beijing.ksyun.com/data-set/2020Objects365%E6%95%B0%E6%8D%AE%E9%9B%86/{split}/"
|
406 |
+
if split == 'train':
|
407 |
+
download([f'{url}zhiyuan_objv2_{split}.tar.gz'], dir=dir, delete=False) # annotations json
|
408 |
+
download([f'{url}patch{i}.tar.gz' for i in range(patches)], dir=images, curl=True, delete=False, threads=8)
|
409 |
+
elif split == 'val':
|
410 |
+
download([f'{url}zhiyuan_objv2_{split}.json'], dir=dir, delete=False) # annotations json
|
411 |
+
download([f'{url}images/v1/patch{i}.tar.gz' for i in range(15 + 1)], dir=images, curl=True, delete=False, threads=8)
|
412 |
+
download([f'{url}images/v2/patch{i}.tar.gz' for i in range(16, patches)], dir=images, curl=True, delete=False, threads=8)
|
413 |
+
|
414 |
+
# Move
|
415 |
+
for f in tqdm(images.rglob('*.jpg'), desc=f'Moving {split} images'):
|
416 |
+
f.rename(images / f.name) # move to /images/{split}
|
417 |
+
|
418 |
+
# Labels
|
419 |
+
coco = COCO(dir / f'zhiyuan_objv2_{split}.json')
|
420 |
+
names = [x["name"] for x in coco.loadCats(coco.getCatIds())]
|
421 |
+
for cid, cat in enumerate(names):
|
422 |
+
catIds = coco.getCatIds(catNms=[cat])
|
423 |
+
imgIds = coco.getImgIds(catIds=catIds)
|
424 |
+
for im in tqdm(coco.loadImgs(imgIds), desc=f'Class {cid + 1}/{len(names)} {cat}'):
|
425 |
+
width, height = im["width"], im["height"]
|
426 |
+
path = Path(im["file_name"]) # image filename
|
427 |
+
try:
|
428 |
+
with open(labels / path.with_suffix('.txt').name, 'a') as file:
|
429 |
+
annIds = coco.getAnnIds(imgIds=im["id"], catIds=catIds, iscrowd=False)
|
430 |
+
for a in coco.loadAnns(annIds):
|
431 |
+
x, y, w, h = a['bbox'] # bounding box in xywh (xy top-left corner)
|
432 |
+
xyxy = np.array([x, y, x + w, y + h])[None] # pixels(1,4)
|
433 |
+
x, y, w, h = xyxy2xywhn(xyxy, w=width, h=height, clip=True)[0] # normalized and clipped
|
434 |
+
file.write(f"{cid} {x:.5f} {y:.5f} {w:.5f} {h:.5f}\n")
|
435 |
+
except Exception as e:
|
436 |
+
print(e)
|
models/yolov5/data/SKU-110K.yaml
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
# SKU-110K retail items dataset https://github.com/eg4000/SKU110K_CVPR19 by Trax Retail
|
3 |
+
# Example usage: python train.py --data SKU-110K.yaml
|
4 |
+
# parent
|
5 |
+
# ├── yolov5
|
6 |
+
# └── datasets
|
7 |
+
# └── SKU-110K ← downloads here (13.6 GB)
|
8 |
+
|
9 |
+
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
10 |
+
path: ../datasets/SKU-110K # dataset root dir
|
11 |
+
train: train.txt # train images (relative to 'path') 8219 images
|
12 |
+
val: val.txt # val images (relative to 'path') 588 images
|
13 |
+
test: test.txt # test images (optional) 2936 images
|
14 |
+
|
15 |
+
# Classes
|
16 |
+
names:
|
17 |
+
0: object
|
18 |
+
|
19 |
+
# Download script/URL (optional) ---------------------------------------------------------------------------------------
|
20 |
+
download: |
|
21 |
+
import shutil
|
22 |
+
from tqdm import tqdm
|
23 |
+
from utils.general import np, pd, Path, download, xyxy2xywh
|
24 |
+
|
25 |
+
|
26 |
+
# Download
|
27 |
+
dir = Path(yaml['path']) # dataset root dir
|
28 |
+
parent = Path(dir.parent) # download dir
|
29 |
+
urls = ['http://trax-geometry.s3.amazonaws.com/cvpr_challenge/SKU110K_fixed.tar.gz']
|
30 |
+
download(urls, dir=parent, delete=False)
|
31 |
+
|
32 |
+
# Rename directories
|
33 |
+
if dir.exists():
|
34 |
+
shutil.rmtree(dir)
|
35 |
+
(parent / 'SKU110K_fixed').rename(dir) # rename dir
|
36 |
+
(dir / 'labels').mkdir(parents=True, exist_ok=True) # create labels dir
|
37 |
+
|
38 |
+
# Convert labels
|
39 |
+
names = 'image', 'x1', 'y1', 'x2', 'y2', 'class', 'image_width', 'image_height' # column names
|
40 |
+
for d in 'annotations_train.csv', 'annotations_val.csv', 'annotations_test.csv':
|
41 |
+
x = pd.read_csv(dir / 'annotations' / d, names=names).values # annotations
|
42 |
+
images, unique_images = x[:, 0], np.unique(x[:, 0])
|
43 |
+
with open((dir / d).with_suffix('.txt').__str__().replace('annotations_', ''), 'w') as f:
|
44 |
+
f.writelines(f'./images/{s}\n' for s in unique_images)
|
45 |
+
for im in tqdm(unique_images, desc=f'Converting {dir / d}'):
|
46 |
+
cls = 0 # single-class dataset
|
47 |
+
with open((dir / 'labels' / im).with_suffix('.txt'), 'a') as f:
|
48 |
+
for r in x[images == im]:
|
49 |
+
w, h = r[6], r[7] # image width, height
|
50 |
+
xywh = xyxy2xywh(np.array([[r[1] / w, r[2] / h, r[3] / w, r[4] / h]]))[0] # instance
|
51 |
+
f.write(f"{cls} {xywh[0]:.5f} {xywh[1]:.5f} {xywh[2]:.5f} {xywh[3]:.5f}\n") # write label
|
models/yolov5/data/VOC.yaml
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
# PASCAL VOC dataset http://host.robots.ox.ac.uk/pascal/VOC by University of Oxford
|
3 |
+
# Example usage: python train.py --data VOC.yaml
|
4 |
+
# parent
|
5 |
+
# ├── yolov5
|
6 |
+
# └── datasets
|
7 |
+
# └── VOC ← downloads here (2.8 GB)
|
8 |
+
|
9 |
+
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
10 |
+
path: ../datasets/VOC
|
11 |
+
train: # train images (relative to 'path') 16551 images
|
12 |
+
- images/train2012
|
13 |
+
- images/train2007
|
14 |
+
- images/val2012
|
15 |
+
- images/val2007
|
16 |
+
val: # val images (relative to 'path') 4952 images
|
17 |
+
- images/test2007
|
18 |
+
test: # test images (optional)
|
19 |
+
- images/test2007
|
20 |
+
|
21 |
+
# Classes
|
22 |
+
names:
|
23 |
+
0: aeroplane
|
24 |
+
1: bicycle
|
25 |
+
2: bird
|
26 |
+
3: boat
|
27 |
+
4: bottle
|
28 |
+
5: bus
|
29 |
+
6: car
|
30 |
+
7: cat
|
31 |
+
8: chair
|
32 |
+
9: cow
|
33 |
+
10: diningtable
|
34 |
+
11: dog
|
35 |
+
12: horse
|
36 |
+
13: motorbike
|
37 |
+
14: person
|
38 |
+
15: pottedplant
|
39 |
+
16: sheep
|
40 |
+
17: sofa
|
41 |
+
18: train
|
42 |
+
19: tvmonitor
|
43 |
+
|
44 |
+
# Download script/URL (optional) ---------------------------------------------------------------------------------------
|
45 |
+
download: |
|
46 |
+
import xml.etree.ElementTree as ET
|
47 |
+
|
48 |
+
from tqdm import tqdm
|
49 |
+
from utils.general import download, Path
|
50 |
+
|
51 |
+
|
52 |
+
def convert_label(path, lb_path, year, image_id):
|
53 |
+
def convert_box(size, box):
|
54 |
+
dw, dh = 1. / size[0], 1. / size[1]
|
55 |
+
x, y, w, h = (box[0] + box[1]) / 2.0 - 1, (box[2] + box[3]) / 2.0 - 1, box[1] - box[0], box[3] - box[2]
|
56 |
+
return x * dw, y * dh, w * dw, h * dh
|
57 |
+
|
58 |
+
in_file = open(path / f'VOC{year}/Annotations/{image_id}.xml')
|
59 |
+
out_file = open(lb_path, 'w')
|
60 |
+
tree = ET.parse(in_file)
|
61 |
+
root = tree.getroot()
|
62 |
+
size = root.find('size')
|
63 |
+
w = int(size.find('width').text)
|
64 |
+
h = int(size.find('height').text)
|
65 |
+
|
66 |
+
names = list(yaml['names'].values()) # names list
|
67 |
+
for obj in root.iter('object'):
|
68 |
+
cls = obj.find('name').text
|
69 |
+
if cls in names and int(obj.find('difficult').text) != 1:
|
70 |
+
xmlbox = obj.find('bndbox')
|
71 |
+
bb = convert_box((w, h), [float(xmlbox.find(x).text) for x in ('xmin', 'xmax', 'ymin', 'ymax')])
|
72 |
+
cls_id = names.index(cls) # class id
|
73 |
+
out_file.write(" ".join([str(a) for a in (cls_id, *bb)]) + '\n')
|
74 |
+
|
75 |
+
|
76 |
+
# Download
|
77 |
+
dir = Path(yaml['path']) # dataset root dir
|
78 |
+
url = 'https://github.com/ultralytics/yolov5/releases/download/v1.0/'
|
79 |
+
urls = [f'{url}VOCtrainval_06-Nov-2007.zip', # 446MB, 5012 images
|
80 |
+
f'{url}VOCtest_06-Nov-2007.zip', # 438MB, 4953 images
|
81 |
+
f'{url}VOCtrainval_11-May-2012.zip'] # 1.95GB, 17126 images
|
82 |
+
download(urls, dir=dir / 'images', delete=False, curl=True, threads=3)
|
83 |
+
|
84 |
+
# Convert
|
85 |
+
path = dir / 'images/VOCdevkit'
|
86 |
+
for year, image_set in ('2012', 'train'), ('2012', 'val'), ('2007', 'train'), ('2007', 'val'), ('2007', 'test'):
|
87 |
+
imgs_path = dir / 'images' / f'{image_set}{year}'
|
88 |
+
lbs_path = dir / 'labels' / f'{image_set}{year}'
|
89 |
+
imgs_path.mkdir(exist_ok=True, parents=True)
|
90 |
+
lbs_path.mkdir(exist_ok=True, parents=True)
|
91 |
+
|
92 |
+
with open(path / f'VOC{year}/ImageSets/Main/{image_set}.txt') as f:
|
93 |
+
image_ids = f.read().strip().split()
|
94 |
+
for id in tqdm(image_ids, desc=f'{image_set}{year}'):
|
95 |
+
f = path / f'VOC{year}/JPEGImages/{id}.jpg' # old img path
|
96 |
+
lb_path = (lbs_path / f.name).with_suffix('.txt') # new label path
|
97 |
+
f.rename(imgs_path / f.name) # move image
|
98 |
+
convert_label(path, lb_path, year, id) # convert labels to YOLO format
|
models/yolov5/data/VisDrone.yaml
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
# VisDrone2019-DET dataset https://github.com/VisDrone/VisDrone-Dataset by Tianjin University
|
3 |
+
# Example usage: python train.py --data VisDrone.yaml
|
4 |
+
# parent
|
5 |
+
# ├── yolov5
|
6 |
+
# └── datasets
|
7 |
+
# └── VisDrone ← downloads here (2.3 GB)
|
8 |
+
|
9 |
+
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
10 |
+
path: ../datasets/VisDrone # dataset root dir
|
11 |
+
train: VisDrone2019-DET-train/images # train images (relative to 'path') 6471 images
|
12 |
+
val: VisDrone2019-DET-val/images # val images (relative to 'path') 548 images
|
13 |
+
test: VisDrone2019-DET-test-dev/images # test images (optional) 1610 images
|
14 |
+
|
15 |
+
# Classes
|
16 |
+
names:
|
17 |
+
0: pedestrian
|
18 |
+
1: people
|
19 |
+
2: bicycle
|
20 |
+
3: car
|
21 |
+
4: van
|
22 |
+
5: truck
|
23 |
+
6: tricycle
|
24 |
+
7: awning-tricycle
|
25 |
+
8: bus
|
26 |
+
9: motor
|
27 |
+
|
28 |
+
# Download script/URL (optional) ---------------------------------------------------------------------------------------
|
29 |
+
download: |
|
30 |
+
from utils.general import download, os, Path
|
31 |
+
|
32 |
+
def visdrone2yolo(dir):
|
33 |
+
from PIL import Image
|
34 |
+
from tqdm import tqdm
|
35 |
+
|
36 |
+
def convert_box(size, box):
|
37 |
+
# Convert VisDrone box to YOLO xywh box
|
38 |
+
dw = 1. / size[0]
|
39 |
+
dh = 1. / size[1]
|
40 |
+
return (box[0] + box[2] / 2) * dw, (box[1] + box[3] / 2) * dh, box[2] * dw, box[3] * dh
|
41 |
+
|
42 |
+
(dir / 'labels').mkdir(parents=True, exist_ok=True) # make labels directory
|
43 |
+
pbar = tqdm((dir / 'annotations').glob('*.txt'), desc=f'Converting {dir}')
|
44 |
+
for f in pbar:
|
45 |
+
img_size = Image.open((dir / 'images' / f.name).with_suffix('.jpg')).size
|
46 |
+
lines = []
|
47 |
+
with open(f, 'r') as file: # read annotation.txt
|
48 |
+
for row in [x.split(',') for x in file.read().strip().splitlines()]:
|
49 |
+
if row[4] == '0': # VisDrone 'ignored regions' class 0
|
50 |
+
continue
|
51 |
+
cls = int(row[5]) - 1
|
52 |
+
box = convert_box(img_size, tuple(map(int, row[:4])))
|
53 |
+
lines.append(f"{cls} {' '.join(f'{x:.6f}' for x in box)}\n")
|
54 |
+
with open(str(f).replace(os.sep + 'annotations' + os.sep, os.sep + 'labels' + os.sep), 'w') as fl:
|
55 |
+
fl.writelines(lines) # write label.txt
|
56 |
+
|
57 |
+
|
58 |
+
# Download
|
59 |
+
dir = Path(yaml['path']) # dataset root dir
|
60 |
+
urls = ['https://github.com/ultralytics/yolov5/releases/download/v1.0/VisDrone2019-DET-train.zip',
|
61 |
+
'https://github.com/ultralytics/yolov5/releases/download/v1.0/VisDrone2019-DET-val.zip',
|
62 |
+
'https://github.com/ultralytics/yolov5/releases/download/v1.0/VisDrone2019-DET-test-dev.zip',
|
63 |
+
'https://github.com/ultralytics/yolov5/releases/download/v1.0/VisDrone2019-DET-test-challenge.zip']
|
64 |
+
download(urls, dir=dir, curl=True, threads=4)
|
65 |
+
|
66 |
+
# Convert
|
67 |
+
for d in 'VisDrone2019-DET-train', 'VisDrone2019-DET-val', 'VisDrone2019-DET-test-dev':
|
68 |
+
visdrone2yolo(dir / d) # convert VisDrone annotations to YOLO labels
|
models/yolov5/data/coco.yaml
ADDED
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
# COCO 2017 dataset http://cocodataset.org by Microsoft
|
3 |
+
# Example usage: python train.py --data coco.yaml
|
4 |
+
# parent
|
5 |
+
# ├── yolov5
|
6 |
+
# └── datasets
|
7 |
+
# └── coco ← downloads here (20.1 GB)
|
8 |
+
|
9 |
+
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
10 |
+
path: ../datasets/coco # dataset root dir
|
11 |
+
train: train2017.txt # train images (relative to 'path') 118287 images
|
12 |
+
val: val2017.txt # val images (relative to 'path') 5000 images
|
13 |
+
test: test-dev2017.txt # 20288 of 40670 images, submit to https://competitions.codalab.org/competitions/20794
|
14 |
+
|
15 |
+
# Classes
|
16 |
+
names:
|
17 |
+
0: person
|
18 |
+
1: bicycle
|
19 |
+
2: car
|
20 |
+
3: motorcycle
|
21 |
+
4: airplane
|
22 |
+
5: bus
|
23 |
+
6: train
|
24 |
+
7: truck
|
25 |
+
8: boat
|
26 |
+
9: traffic light
|
27 |
+
10: fire hydrant
|
28 |
+
11: stop sign
|
29 |
+
12: parking meter
|
30 |
+
13: bench
|
31 |
+
14: bird
|
32 |
+
15: cat
|
33 |
+
16: dog
|
34 |
+
17: horse
|
35 |
+
18: sheep
|
36 |
+
19: cow
|
37 |
+
20: elephant
|
38 |
+
21: bear
|
39 |
+
22: zebra
|
40 |
+
23: giraffe
|
41 |
+
24: backpack
|
42 |
+
25: umbrella
|
43 |
+
26: handbag
|
44 |
+
27: tie
|
45 |
+
28: suitcase
|
46 |
+
29: frisbee
|
47 |
+
30: skis
|
48 |
+
31: snowboard
|
49 |
+
32: sports ball
|
50 |
+
33: kite
|
51 |
+
34: baseball bat
|
52 |
+
35: baseball glove
|
53 |
+
36: skateboard
|
54 |
+
37: surfboard
|
55 |
+
38: tennis racket
|
56 |
+
39: bottle
|
57 |
+
40: wine glass
|
58 |
+
41: cup
|
59 |
+
42: fork
|
60 |
+
43: knife
|
61 |
+
44: spoon
|
62 |
+
45: bowl
|
63 |
+
46: banana
|
64 |
+
47: apple
|
65 |
+
48: sandwich
|
66 |
+
49: orange
|
67 |
+
50: broccoli
|
68 |
+
51: carrot
|
69 |
+
52: hot dog
|
70 |
+
53: pizza
|
71 |
+
54: donut
|
72 |
+
55: cake
|
73 |
+
56: chair
|
74 |
+
57: couch
|
75 |
+
58: potted plant
|
76 |
+
59: bed
|
77 |
+
60: dining table
|
78 |
+
61: toilet
|
79 |
+
62: tv
|
80 |
+
63: laptop
|
81 |
+
64: mouse
|
82 |
+
65: remote
|
83 |
+
66: keyboard
|
84 |
+
67: cell phone
|
85 |
+
68: microwave
|
86 |
+
69: oven
|
87 |
+
70: toaster
|
88 |
+
71: sink
|
89 |
+
72: refrigerator
|
90 |
+
73: book
|
91 |
+
74: clock
|
92 |
+
75: vase
|
93 |
+
76: scissors
|
94 |
+
77: teddy bear
|
95 |
+
78: hair drier
|
96 |
+
79: toothbrush
|
97 |
+
|
98 |
+
# Download script/URL (optional)
|
99 |
+
download: |
|
100 |
+
from utils.general import download, Path
|
101 |
+
|
102 |
+
|
103 |
+
# Download labels
|
104 |
+
segments = False # segment or box labels
|
105 |
+
dir = Path(yaml['path']) # dataset root dir
|
106 |
+
url = 'https://github.com/ultralytics/yolov5/releases/download/v1.0/'
|
107 |
+
urls = [url + ('coco2017labels-segments.zip' if segments else 'coco2017labels.zip')] # labels
|
108 |
+
download(urls, dir=dir.parent)
|
109 |
+
|
110 |
+
# Download data
|
111 |
+
urls = ['http://images.cocodataset.org/zips/train2017.zip', # 19G, 118k images
|
112 |
+
'http://images.cocodataset.org/zips/val2017.zip', # 1G, 5k images
|
113 |
+
'http://images.cocodataset.org/zips/test2017.zip'] # 7G, 41k images (optional)
|
114 |
+
download(urls, dir=dir / 'images', threads=3)
|
models/yolov5/data/coco128-seg.yaml
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
# COCO128-seg dataset https://www.kaggle.com/ultralytics/coco128 (first 128 images from COCO train2017) by Ultralytics
|
3 |
+
# Example usage: python train.py --data coco128.yaml
|
4 |
+
# parent
|
5 |
+
# ├── yolov5
|
6 |
+
# └── datasets
|
7 |
+
# └── coco128-seg ← downloads here (7 MB)
|
8 |
+
|
9 |
+
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
10 |
+
path: ../datasets/coco128-seg # dataset root dir
|
11 |
+
train: images/train2017 # train images (relative to 'path') 128 images
|
12 |
+
val: images/train2017 # val images (relative to 'path') 128 images
|
13 |
+
test: # test images (optional)
|
14 |
+
|
15 |
+
# Classes
|
16 |
+
names:
|
17 |
+
0: person
|
18 |
+
1: bicycle
|
19 |
+
2: car
|
20 |
+
3: motorcycle
|
21 |
+
4: airplane
|
22 |
+
5: bus
|
23 |
+
6: train
|
24 |
+
7: truck
|
25 |
+
8: boat
|
26 |
+
9: traffic light
|
27 |
+
10: fire hydrant
|
28 |
+
11: stop sign
|
29 |
+
12: parking meter
|
30 |
+
13: bench
|
31 |
+
14: bird
|
32 |
+
15: cat
|
33 |
+
16: dog
|
34 |
+
17: horse
|
35 |
+
18: sheep
|
36 |
+
19: cow
|
37 |
+
20: elephant
|
38 |
+
21: bear
|
39 |
+
22: zebra
|
40 |
+
23: giraffe
|
41 |
+
24: backpack
|
42 |
+
25: umbrella
|
43 |
+
26: handbag
|
44 |
+
27: tie
|
45 |
+
28: suitcase
|
46 |
+
29: frisbee
|
47 |
+
30: skis
|
48 |
+
31: snowboard
|
49 |
+
32: sports ball
|
50 |
+
33: kite
|
51 |
+
34: baseball bat
|
52 |
+
35: baseball glove
|
53 |
+
36: skateboard
|
54 |
+
37: surfboard
|
55 |
+
38: tennis racket
|
56 |
+
39: bottle
|
57 |
+
40: wine glass
|
58 |
+
41: cup
|
59 |
+
42: fork
|
60 |
+
43: knife
|
61 |
+
44: spoon
|
62 |
+
45: bowl
|
63 |
+
46: banana
|
64 |
+
47: apple
|
65 |
+
48: sandwich
|
66 |
+
49: orange
|
67 |
+
50: broccoli
|
68 |
+
51: carrot
|
69 |
+
52: hot dog
|
70 |
+
53: pizza
|
71 |
+
54: donut
|
72 |
+
55: cake
|
73 |
+
56: chair
|
74 |
+
57: couch
|
75 |
+
58: potted plant
|
76 |
+
59: bed
|
77 |
+
60: dining table
|
78 |
+
61: toilet
|
79 |
+
62: tv
|
80 |
+
63: laptop
|
81 |
+
64: mouse
|
82 |
+
65: remote
|
83 |
+
66: keyboard
|
84 |
+
67: cell phone
|
85 |
+
68: microwave
|
86 |
+
69: oven
|
87 |
+
70: toaster
|
88 |
+
71: sink
|
89 |
+
72: refrigerator
|
90 |
+
73: book
|
91 |
+
74: clock
|
92 |
+
75: vase
|
93 |
+
76: scissors
|
94 |
+
77: teddy bear
|
95 |
+
78: hair drier
|
96 |
+
79: toothbrush
|
97 |
+
|
98 |
+
# Download script/URL (optional)
|
99 |
+
download: https://ultralytics.com/assets/coco128-seg.zip
|
models/yolov5/data/coco128.yaml
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
# COCO128 dataset https://www.kaggle.com/ultralytics/coco128 (first 128 images from COCO train2017) by Ultralytics
|
3 |
+
# Example usage: python train.py --data coco128.yaml
|
4 |
+
# parent
|
5 |
+
# ├── yolov5
|
6 |
+
# └── datasets
|
7 |
+
# └── coco128 ← downloads here (7 MB)
|
8 |
+
|
9 |
+
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
10 |
+
path: ../datasets/coco128 # dataset root dir
|
11 |
+
train: images/train2017 # train images (relative to 'path') 128 images
|
12 |
+
val: images/train2017 # val images (relative to 'path') 128 images
|
13 |
+
test: # test images (optional)
|
14 |
+
|
15 |
+
# Classes
|
16 |
+
names:
|
17 |
+
0: person
|
18 |
+
1: bicycle
|
19 |
+
2: car
|
20 |
+
3: motorcycle
|
21 |
+
4: airplane
|
22 |
+
5: bus
|
23 |
+
6: train
|
24 |
+
7: truck
|
25 |
+
8: boat
|
26 |
+
9: traffic light
|
27 |
+
10: fire hydrant
|
28 |
+
11: stop sign
|
29 |
+
12: parking meter
|
30 |
+
13: bench
|
31 |
+
14: bird
|
32 |
+
15: cat
|
33 |
+
16: dog
|
34 |
+
17: horse
|
35 |
+
18: sheep
|
36 |
+
19: cow
|
37 |
+
20: elephant
|
38 |
+
21: bear
|
39 |
+
22: zebra
|
40 |
+
23: giraffe
|
41 |
+
24: backpack
|
42 |
+
25: umbrella
|
43 |
+
26: handbag
|
44 |
+
27: tie
|
45 |
+
28: suitcase
|
46 |
+
29: frisbee
|
47 |
+
30: skis
|
48 |
+
31: snowboard
|
49 |
+
32: sports ball
|
50 |
+
33: kite
|
51 |
+
34: baseball bat
|
52 |
+
35: baseball glove
|
53 |
+
36: skateboard
|
54 |
+
37: surfboard
|
55 |
+
38: tennis racket
|
56 |
+
39: bottle
|
57 |
+
40: wine glass
|
58 |
+
41: cup
|
59 |
+
42: fork
|
60 |
+
43: knife
|
61 |
+
44: spoon
|
62 |
+
45: bowl
|
63 |
+
46: banana
|
64 |
+
47: apple
|
65 |
+
48: sandwich
|
66 |
+
49: orange
|
67 |
+
50: broccoli
|
68 |
+
51: carrot
|
69 |
+
52: hot dog
|
70 |
+
53: pizza
|
71 |
+
54: donut
|
72 |
+
55: cake
|
73 |
+
56: chair
|
74 |
+
57: couch
|
75 |
+
58: potted plant
|
76 |
+
59: bed
|
77 |
+
60: dining table
|
78 |
+
61: toilet
|
79 |
+
62: tv
|
80 |
+
63: laptop
|
81 |
+
64: mouse
|
82 |
+
65: remote
|
83 |
+
66: keyboard
|
84 |
+
67: cell phone
|
85 |
+
68: microwave
|
86 |
+
69: oven
|
87 |
+
70: toaster
|
88 |
+
71: sink
|
89 |
+
72: refrigerator
|
90 |
+
73: book
|
91 |
+
74: clock
|
92 |
+
75: vase
|
93 |
+
76: scissors
|
94 |
+
77: teddy bear
|
95 |
+
78: hair drier
|
96 |
+
79: toothbrush
|
97 |
+
|
98 |
+
# Download script/URL (optional)
|
99 |
+
download: https://ultralytics.com/assets/coco128.zip
|
models/yolov5/data/hyps/hyp.Objects365.yaml
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
# Hyperparameters for Objects365 training
|
3 |
+
# python train.py --weights yolov5m.pt --data Objects365.yaml --evolve
|
4 |
+
# See Hyperparameter Evolution tutorial for details https://github.com/ultralytics/yolov5#tutorials
|
5 |
+
|
6 |
+
lr0: 0.00258
|
7 |
+
lrf: 0.17
|
8 |
+
momentum: 0.779
|
9 |
+
weight_decay: 0.00058
|
10 |
+
warmup_epochs: 1.33
|
11 |
+
warmup_momentum: 0.86
|
12 |
+
warmup_bias_lr: 0.0711
|
13 |
+
box: 0.0539
|
14 |
+
cls: 0.299
|
15 |
+
cls_pw: 0.825
|
16 |
+
obj: 0.632
|
17 |
+
obj_pw: 1.0
|
18 |
+
iou_t: 0.2
|
19 |
+
anchor_t: 3.44
|
20 |
+
anchors: 3.2
|
21 |
+
fl_gamma: 0.0
|
22 |
+
hsv_h: 0.0188
|
23 |
+
hsv_s: 0.704
|
24 |
+
hsv_v: 0.36
|
25 |
+
degrees: 0.0
|
26 |
+
translate: 0.0902
|
27 |
+
scale: 0.491
|
28 |
+
shear: 0.0
|
29 |
+
perspective: 0.0
|
30 |
+
flipud: 0.0
|
31 |
+
fliplr: 0.5
|
32 |
+
mosaic: 1.0
|
33 |
+
mixup: 0.0
|
34 |
+
copy_paste: 0.0
|
models/yolov5/data/hyps/hyp.VOC.yaml
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# YOLOv5 🚀 by Ultralytics, AGPL-3.0 license
|
2 |
+
# Hyperparameters for VOC training
|
3 |
+
# python train.py --batch 128 --weights yolov5m6.pt --data VOC.yaml --epochs 50 --img 512 --hyp hyp.scratch-med.yaml --evolve
|
4 |
+
# See Hyperparameter Evolution tutorial for details https://github.com/ultralytics/yolov5#tutorials
|
5 |
+
|
6 |
+
# YOLOv5 Hyperparameter Evolution Results
|
7 |
+
# Best generation: 467
|
8 |
+
# Last generation: 996
|
9 |
+
# metrics/precision, metrics/recall, metrics/mAP_0.5, metrics/mAP_0.5:0.95, val/box_loss, val/obj_loss, val/cls_loss
|
10 |
+
# 0.87729, 0.85125, 0.91286, 0.72664, 0.0076739, 0.0042529, 0.0013865
|
11 |
+
|
12 |
+
lr0: 0.00334
|
13 |
+
lrf: 0.15135
|
14 |
+
momentum: 0.74832
|
15 |
+
weight_decay: 0.00025
|
16 |
+
warmup_epochs: 3.3835
|
17 |
+
warmup_momentum: 0.59462
|
18 |
+
warmup_bias_lr: 0.18657
|
19 |
+
box: 0.02
|
20 |
+
cls: 0.21638
|
21 |
+
cls_pw: 0.5
|
22 |
+
obj: 0.51728
|
23 |
+
obj_pw: 0.67198
|
24 |
+
iou_t: 0.2
|
25 |
+
anchor_t: 3.3744
|
26 |
+
fl_gamma: 0.0
|
27 |
+
hsv_h: 0.01041
|
28 |
+
hsv_s: 0.54703
|
29 |
+
hsv_v: 0.27739
|
30 |
+
degrees: 0.0
|
31 |
+
translate: 0.04591
|
32 |
+
scale: 0.75544
|
33 |
+
shear: 0.0
|
34 |
+
perspective: 0.0
|
35 |
+
flipud: 0.0
|
36 |
+
fliplr: 0.5
|
37 |
+
mosaic: 0.85834
|
38 |
+
mixup: 0.04266
|
39 |
+
copy_paste: 0.0
|
40 |
+
anchors: 3.412
|