mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-05-23 21:44:22 +08:00
Update YOLOv3 and YOLOv5 YAMLs (#7574)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
596c068b18
commit
d762496989
@ -56,14 +56,14 @@ To stop the serve command and terminate the local server, you can use the `CTRL+
|
|||||||
|
|
||||||
For multi-language MkDocs sites use the following additional steps:
|
For multi-language MkDocs sites use the following additional steps:
|
||||||
|
|
||||||
1. Add all new language *.md files to git commit: `git add docs/**/*.md -f`
|
1. Add all new language `*.md` files to git commit: `git add docs/**/*.md -f`
|
||||||
2. Build all languages to the `/site` directory. Verify that the top-level `/site` directory contains `CNAME`, `robots.txt` and `sitemap.xml` files, if applicable.
|
2. Build all languages to the `/site` directory. Verify that the top-level `/site` directory contains `CNAME`, `robots.txt` and `sitemap.xml` files, if applicable.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Remove existing /site directory
|
# Remove existing /site directory
|
||||||
rm -rf site
|
rm -rf site
|
||||||
|
|
||||||
# Loop through all *.yml files in the docs directory
|
# Loop through all YAML files in the docs directory
|
||||||
mkdocs build -f docs/mkdocs.yml
|
mkdocs build -f docs/mkdocs.yml
|
||||||
for file in docs/mkdocs_*.yml; do
|
for file in docs/mkdocs_*.yml; do
|
||||||
echo "Building MkDocs site with configuration file: $file"
|
echo "Building MkDocs site with configuration file: $file"
|
||||||
|
@ -80,7 +80,7 @@ keywords: الرؤية الحاسوبية ، مجموعات البيانات ،
|
|||||||
|
|
||||||
2. **وضع تعليقات على الصور**: قم بإضافة تعليقات على هذه الصور مع صناديق الحدود أو الشرائح أو النقاط التي تعتمد على المهمة.
|
2. **وضع تعليقات على الصور**: قم بإضافة تعليقات على هذه الصور مع صناديق الحدود أو الشرائح أو النقاط التي تعتمد على المهمة.
|
||||||
|
|
||||||
3. **تصدير التعليقات**: قم بتحويل هذه التعليقات إلى تنسيق الملف *.txt *.txt المدعوم من Ultralytics.
|
3. **تصدير التعليقات**: قم بتحويل هذه التعليقات إلى تنسيق الملف `*.txt` `*.txt` المدعوم من Ultralytics.
|
||||||
|
|
||||||
4. **تنظيم مجموعة البيانات**: قم بترتيب مجموعة البيانات الخاصة بك في البنية المجلدات الصحيحة. يجب أن تحتوي على مجلدات أعلى المستوى `train/` و `val/` ، وداخل كل منهما ، مجلدات فرعية للـ `images/` و `labels/`.
|
4. **تنظيم مجموعة البيانات**: قم بترتيب مجموعة البيانات الخاصة بك في البنية المجلدات الصحيحة. يجب أن تحتوي على مجلدات أعلى المستوى `train/` و `val/` ، وداخل كل منهما ، مجلدات فرعية للـ `images/` و `labels/`.
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ Das Bereitstellen eines neuen Datensatzes umfasst mehrere Schritte, um sicherzus
|
|||||||
|
|
||||||
2. **Bilder annotieren**: Annotieren Sie diese Bilder mit Bounding Boxen, Segmenten oder Schlüsselpunkten, je nach Aufgabe.
|
2. **Bilder annotieren**: Annotieren Sie diese Bilder mit Bounding Boxen, Segmenten oder Schlüsselpunkten, je nach Aufgabe.
|
||||||
|
|
||||||
3. **Annotationen exportieren**: Konvertieren Sie diese Annotationen in das von Ultralytics unterstützte YOLO *.txt-Dateiformat.
|
3. **Annotationen exportieren**: Konvertieren Sie diese Annotationen in das von Ultralytics unterstützte YOLO `*.txt`-Dateiformat.
|
||||||
|
|
||||||
4. **Datensatz organisieren**: Ordnen Sie Ihren Datensatz in die richtige Ordnerstruktur an. Sie sollten übergeordnete Verzeichnisse `train/` und `val/` haben, und innerhalb dieser je ein Unterverzeichnis `images/` und `labels/`.
|
4. **Datensatz organisieren**: Ordnen Sie Ihren Datensatz in die richtige Ordnerstruktur an. Sie sollten übergeordnete Verzeichnisse `train/` und `val/` haben, und innerhalb dieser je ein Unterverzeichnis `images/` und `labels/`.
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ The [Argoverse](https://www.argoverse.org/) dataset is a collection of data desi
|
|||||||
|
|
||||||
!!! Note
|
!!! Note
|
||||||
|
|
||||||
The Argoverse dataset *.zip file required for training was removed from Amazon S3 after the shutdown of Argo AI by Ford, but we have made it available for manual download on [Google Drive](https://drive.google.com/file/d/1st9qW3BeIwQsnR0t8mRpvbsSWIo16ACi/view?usp=drive_link).
|
The Argoverse dataset `*.zip` file required for training was removed from Amazon S3 after the shutdown of Argo AI by Ford, but we have made it available for manual download on [Google Drive](https://drive.google.com/file/d/1st9qW3BeIwQsnR0t8mRpvbsSWIo16ACi/view?usp=drive_link).
|
||||||
|
|
||||||
## Key Features
|
## Key Features
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ Training a robust and accurate object detection model requires a comprehensive d
|
|||||||
|
|
||||||
### Ultralytics YOLO format
|
### Ultralytics YOLO format
|
||||||
|
|
||||||
The Ultralytics YOLO format is a dataset configuration format that allows you to define the dataset root directory, the relative paths to training/validation/testing image directories or *.txt files containing image paths, and a dictionary of class names. Here is an example:
|
The Ultralytics YOLO format is a dataset configuration format that allows you to define the dataset root directory, the relative paths to training/validation/testing image directories or `*.txt` files containing image paths, and a dictionary of class names. Here is an example:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# 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, ..]
|
# 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, ..]
|
||||||
|
@ -58,8 +58,7 @@ To train a YOLOv8n model on the VOC dataset for 100 epochs with an image size of
|
|||||||
=== "CLI"
|
=== "CLI"
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Start training from
|
# Start training from a pretrained *.pt model
|
||||||
a pretrained *.pt model
|
|
||||||
yolo detect train data=VOC.yaml model=yolov8n.pt epochs=100 imgsz=640
|
yolo detect train data=VOC.yaml model=yolov8n.pt epochs=100 imgsz=640
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ Contributing a new dataset involves several steps to ensure that it aligns well
|
|||||||
|
|
||||||
2. **Annotate Images**: Annotate these images with bounding boxes, segments, or keypoints, depending on the task.
|
2. **Annotate Images**: Annotate these images with bounding boxes, segments, or keypoints, depending on the task.
|
||||||
|
|
||||||
3. **Export Annotations**: Convert these annotations into the YOLO *.txt file format which Ultralytics supports.
|
3. **Export Annotations**: Convert these annotations into the YOLO `*.txt` file format which Ultralytics supports.
|
||||||
|
|
||||||
4. **Organize Dataset**: Arrange your dataset into the correct folder structure. You should have `train/` and `val/` top-level directories, and within each, an `images/` and `labels/` subdirectory.
|
4. **Organize Dataset**: Arrange your dataset into the correct folder structure. You should have `train/` and `val/` top-level directories, and within each, an `images/` and `labels/` subdirectory.
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ After performing the [Segment Task](../tasks/segment.md), it's sometimes desirab
|
|||||||
|
|
||||||
See the Ultralytics [Quickstart](../quickstart.md/#install-ultralytics) Installation section for a quick walkthrough on installing the required libraries.
|
See the Ultralytics [Quickstart](../quickstart.md/#install-ultralytics) Installation section for a quick walkthrough on installing the required libraries.
|
||||||
|
|
||||||
---
|
***
|
||||||
|
|
||||||
2. Load a model and run `predict()` method on a source.
|
2. Load a model and run `predict()` method on a source.
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ After performing the [Segment Task](../tasks/segment.md), it's sometimes desirab
|
|||||||
|
|
||||||
For additional information about Segmentation Models, visit the [Segment Task](../tasks/segment.md#models) page. To learn more about `predict()` method, see [Predict Mode](../modes/predict.md) section of the Documentation.
|
For additional information about Segmentation Models, visit the [Segment Task](../tasks/segment.md#models) page. To learn more about `predict()` method, see [Predict Mode](../modes/predict.md) section of the Documentation.
|
||||||
|
|
||||||
---
|
***
|
||||||
|
|
||||||
3. Now iterate over the results and the contours. For workflows that want to save an image to file, the source image `base-name` and the detection `class-label` are retrieved for later use (optional).
|
3. Now iterate over the results and the contours. For workflows that want to save an image to file, the source image `base-name` and the detection `class-label` are retrieved for later use (optional).
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ After performing the [Segment Task](../tasks/segment.md), it's sometimes desirab
|
|||||||
|
|
||||||
A single image will only iterate the first loop once. A single image with only a single detection will iterate each loop _only_ once.
|
A single image will only iterate the first loop once. A single image with only a single detection will iterate each loop _only_ once.
|
||||||
|
|
||||||
---
|
***
|
||||||
|
|
||||||
4. Start with generating a binary mask from the source image and then draw a filled contour onto the mask. This will allow the object to be isolated from the other parts of the image. An example from `bus.jpg` for one of the detected `person` class objects is shown on the right.
|
4. Start with generating a binary mask from the source image and then draw a filled contour onto the mask. This will allow the object to be isolated from the other parts of the image. An example from `bus.jpg` for one of the detected `person` class objects is shown on the right.
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ After performing the [Segment Task](../tasks/segment.md), it's sometimes desirab
|
|||||||
</details>
|
</details>
|
||||||
<p></p>
|
<p></p>
|
||||||
|
|
||||||
---
|
***
|
||||||
|
|
||||||
5. Next the there are 2 options for how to move forward with the image from this point and a subsequent option for each.
|
5. Next the there are 2 options for how to move forward with the image from this point and a subsequent option for each.
|
||||||
|
|
||||||
@ -256,7 +256,7 @@ After performing the [Segment Task](../tasks/segment.md), it's sometimes desirab
|
|||||||
|
|
||||||
This is a built in feature for the Ultralytics library. See the `save_crop` argument for [Predict Mode Inference Arguments](../modes/predict.md/#inference-arguments) for details.
|
This is a built in feature for the Ultralytics library. See the `save_crop` argument for [Predict Mode Inference Arguments](../modes/predict.md/#inference-arguments) for details.
|
||||||
|
|
||||||
---
|
***
|
||||||
|
|
||||||
6. <u>What to do next is entirely left to you as the developer.</u> A basic example of one possible next step (saving the image to file for future use) is shown.
|
6. <u>What to do next is entirely left to you as the developer.</u> A basic example of one possible next step (saving the image to file for future use) is shown.
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ keywords: YOLOv8, Deployment, PyTorch, TorchScript, ONNX, OpenVINO, TensorRT, Co
|
|||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
*Setting the Scene:* You've come a long way on your journey with YOLOv8. You've diligently collected data, meticulously annotated it, and put in the hours to train and rigorously evaluate your custom YOLOv8 model. Now, it’s time to put your model to work for your specific application, use case, or project. But there's a critical decision that stands before you: how to export and deploy your model effectively.
|
You've come a long way on your journey with YOLOv8. You've diligently collected data, meticulously annotated it, and put in the hours to train and rigorously evaluate your custom YOLOv8 model. Now, it’s time to put your model to work for your specific application, use case, or project. But there's a critical decision that stands before you: how to export and deploy your model effectively.
|
||||||
|
|
||||||
This guide walks you through YOLOv8’s deployment options and the essential factors to consider to choose the right option for your project.
|
This guide walks you through YOLOv8’s deployment options and the essential factors to consider to choose the right option for your project.
|
||||||
|
|
||||||
|
@ -56,6 +56,6 @@ We hope that the resources here will help you get the most out of HUB. Please br
|
|||||||
- [**Models: Training and Exporting**](models.md). Train YOLOv5 and YOLOv8 models on your custom datasets and export them to various formats for deployment.
|
- [**Models: Training and Exporting**](models.md). Train YOLOv5 and YOLOv8 models on your custom datasets and export them to various formats for deployment.
|
||||||
- [**Integrations: Options**](integrations.md). Explore different integration options for your trained models, such as TensorFlow, ONNX, OpenVINO, CoreML, and PaddlePaddle.
|
- [**Integrations: Options**](integrations.md). Explore different integration options for your trained models, such as TensorFlow, ONNX, OpenVINO, CoreML, and PaddlePaddle.
|
||||||
- [**Ultralytics HUB App**](app/index.md). Learn about the Ultralytics App for iOS and Android, which allows you to run models directly on your mobile device.
|
- [**Ultralytics HUB App**](app/index.md). Learn about the Ultralytics App for iOS and Android, which allows you to run models directly on your mobile device.
|
||||||
* [**iOS**](app/ios.md). Learn about YOLO CoreML models accelerated on Apple's Neural Engine on iPhones and iPads.
|
- [**iOS**](app/ios.md). Learn about YOLO CoreML models accelerated on Apple's Neural Engine on iPhones and iPads.
|
||||||
* [**Android**](app/android.md). Explore TFLite acceleration on mobile devices.
|
- [**Android**](app/android.md). Explore TFLite acceleration on mobile devices.
|
||||||
- [**Inference API**](inference_api.md). Understand how to use the Inference API for running your trained models in the cloud to generate predictions.
|
- [**Inference API**](inference_api.md). Understand how to use the Inference API for running your trained models in the cloud to generate predictions.
|
||||||
|
@ -56,7 +56,7 @@ import comet_ml
|
|||||||
comet_ml.init(project_name="comet-example-yolov8-coco128")
|
comet_ml.init(project_name="comet-example-yolov8-coco128")
|
||||||
```
|
```
|
||||||
|
|
||||||
*Note:* If you are using a Google Colab notebook, the code above will prompt you to enter your API key for initialization.
|
If you are using a Google Colab notebook, the code above will prompt you to enter your API key for initialization.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
@ -122,17 +122,20 @@ FastSAM is also available directly from the [https://github.com/CASIA-IVA-Lab/Fa
|
|||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
1. Clone the FastSAM repository:
|
1. Clone the FastSAM repository:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
git clone https://github.com/CASIA-IVA-Lab/FastSAM.git
|
git clone https://github.com/CASIA-IVA-Lab/FastSAM.git
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Create and activate a Conda environment with Python 3.9:
|
2. Create and activate a Conda environment with Python 3.9:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
conda create -n FastSAM python=3.9
|
conda create -n FastSAM python=3.9
|
||||||
conda activate FastSAM
|
conda activate FastSAM
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Navigate to the cloned repository and install the required packages:
|
3. Navigate to the cloned repository and install the required packages:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cd FastSAM
|
cd FastSAM
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
@ -150,16 +153,19 @@ FastSAM is also available directly from the [https://github.com/CASIA-IVA-Lab/Fa
|
|||||||
2. Use FastSAM for inference. Example commands:
|
2. Use FastSAM for inference. Example commands:
|
||||||
|
|
||||||
- Segment everything in an image:
|
- Segment everything in an image:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
python Inference.py --model_path ./weights/FastSAM.pt --img_path ./images/dogs.jpg
|
python Inference.py --model_path ./weights/FastSAM.pt --img_path ./images/dogs.jpg
|
||||||
```
|
```
|
||||||
|
|
||||||
- Segment specific objects using text prompt:
|
- Segment specific objects using text prompt:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
python Inference.py --model_path ./weights/FastSAM.pt --img_path ./images/dogs.jpg --text_prompt "the yellow dog"
|
python Inference.py --model_path ./weights/FastSAM.pt --img_path ./images/dogs.jpg --text_prompt "the yellow dog"
|
||||||
```
|
```
|
||||||
|
|
||||||
- Segment objects within a bounding box (provide box coordinates in xywh format):
|
- Segment objects within a bounding box (provide box coordinates in xywh format):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
python Inference.py --model_path ./weights/FastSAM.pt --img_path ./images/dogs.jpg --box_prompt "[570,200,230,400]"
|
python Inference.py --model_path ./weights/FastSAM.pt --img_path ./images/dogs.jpg --box_prompt "[570,200,230,400]"
|
||||||
```
|
```
|
||||||
|
@ -89,4 +89,4 @@ If you use Baidu's RT-DETR in your research or development work, please cite the
|
|||||||
|
|
||||||
We would like to acknowledge Baidu and the [PaddlePaddle](https://github.com/PaddlePaddle/PaddleDetection) team for creating and maintaining this valuable resource for the computer vision community. Their contribution to the field with the development of the Vision Transformers-based real-time object detector, RT-DETR, is greatly appreciated.
|
We would like to acknowledge Baidu and the [PaddlePaddle](https://github.com/PaddlePaddle/PaddleDetection) team for creating and maintaining this valuable resource for the computer vision community. Their contribution to the field with the development of the Vision Transformers-based real-time object detector, RT-DETR, is greatly appreciated.
|
||||||
|
|
||||||
*Keywords: RT-DETR, Transformer, ViT, Vision Transformers, Baidu RT-DETR, PaddlePaddle, Paddle Paddle RT-DETR, real-time object detection, Vision Transformers-based object detection, pre-trained PaddlePaddle RT-DETR models, Baidu's RT-DETR usage, Ultralytics Python API*
|
_Keywords: RT-DETR, Transformer, ViT, Vision Transformers, Baidu RT-DETR, PaddlePaddle, Paddle Paddle RT-DETR, real-time object detection, Vision Transformers-based object detection, pre-trained PaddlePaddle RT-DETR models, Baidu's RT-DETR usage, Ultralytics Python API_
|
||||||
|
@ -222,4 +222,4 @@ If you find SAM useful in your research or development work, please consider cit
|
|||||||
|
|
||||||
We would like to express our gratitude to Meta AI for creating and maintaining this valuable resource for the computer vision community.
|
We would like to express our gratitude to Meta AI for creating and maintaining this valuable resource for the computer vision community.
|
||||||
|
|
||||||
*keywords: Segment Anything, Segment Anything Model, SAM, Meta SAM, image segmentation, promptable segmentation, zero-shot performance, SA-1B dataset, advanced architecture, auto-annotation, Ultralytics, pre-trained models, SAM base, SAM large, instance segmentation, computer vision, AI, artificial intelligence, machine learning, data annotation, segmentation masks, detection model, YOLO detection model, bibtex, Meta AI.*
|
_keywords: Segment Anything, Segment Anything Model, SAM, Meta SAM, image segmentation, promptable segmentation, zero-shot performance, SA-1B dataset, advanced architecture, auto-annotation, Ultralytics, pre-trained models, SAM base, SAM large, instance segmentation, computer vision, AI, artificial intelligence, machine learning, data annotation, segmentation masks, detection model, YOLO detection model, bibtex, Meta AI._
|
||||||
|
@ -117,4 +117,4 @@ If you employ YOLO-NAS in your research or development work, please cite SuperGr
|
|||||||
|
|
||||||
We express our gratitude to Deci AI's [SuperGradients](https://github.com/Deci-AI/super-gradients/) team for their efforts in creating and maintaining this valuable resource for the computer vision community. We believe YOLO-NAS, with its innovative architecture and superior object detection capabilities, will become a critical tool for developers and researchers alike.
|
We express our gratitude to Deci AI's [SuperGradients](https://github.com/Deci-AI/super-gradients/) team for their efforts in creating and maintaining this valuable resource for the computer vision community. We believe YOLO-NAS, with its innovative architecture and superior object detection capabilities, will become a critical tool for developers and researchers alike.
|
||||||
|
|
||||||
*Keywords: YOLO-NAS, Deci AI, object detection, deep learning, neural architecture search, Ultralytics Python API, YOLO model, SuperGradients, pre-trained models, quantization-friendly basic block, advanced training schemes, post-training quantization, AutoNAC optimization, COCO, Objects365, Roboflow 100*
|
_Keywords: YOLO-NAS, Deci AI, object detection, deep learning, neural architecture search, Ultralytics Python API, YOLO model, SuperGradients, pre-trained models, quantization-friendly basic block, advanced training schemes, post-training quantization, AutoNAC optimization, COCO, Objects365, Roboflow 100_
|
||||||
|
@ -761,7 +761,5 @@ Here's a Python script using OpenCV (`cv2`) and YOLOv8 to run inference on video
|
|||||||
This script will run predictions on each frame of the video, visualize the results, and display them in a window. The loop can be exited by pressing 'q'.
|
This script will run predictions on each frame of the video, visualize the results, and display them in a window. The loop can be exited by pressing 'q'.
|
||||||
|
|
||||||
[car spare parts]: https://github.com/RizwanMunawar/ultralytics/assets/62513924/a0f802a8-0776-44cf-8f17-93974a4a28a1
|
[car spare parts]: https://github.com/RizwanMunawar/ultralytics/assets/62513924/a0f802a8-0776-44cf-8f17-93974a4a28a1
|
||||||
|
|
||||||
[football player detect]: https://github.com/RizwanMunawar/ultralytics/assets/62513924/7d320e1f-fc57-4d7f-a691-78ee579c3442
|
[football player detect]: https://github.com/RizwanMunawar/ultralytics/assets/62513924/7d320e1f-fc57-4d7f-a691-78ee579c3442
|
||||||
|
|
||||||
[human fall detect]: https://github.com/RizwanMunawar/ultralytics/assets/62513924/86437c4a-3227-4eee-90ef-9efb697bdb43
|
[human fall detect]: https://github.com/RizwanMunawar/ultralytics/assets/62513924/86437c4a-3227-4eee-90ef-9efb697bdb43
|
||||||
|
@ -354,7 +354,5 @@ To initiate your contribution, please refer to our [Contributing Guide](https://
|
|||||||
Together, let's enhance the tracking capabilities of the Ultralytics YOLO ecosystem 🙏!
|
Together, let's enhance the tracking capabilities of the Ultralytics YOLO ecosystem 🙏!
|
||||||
|
|
||||||
[fish track]: https://github.com/RizwanMunawar/ultralytics/assets/62513924/a5146d0f-bfa8-4e0a-b7df-3c1446cd8142
|
[fish track]: https://github.com/RizwanMunawar/ultralytics/assets/62513924/a5146d0f-bfa8-4e0a-b7df-3c1446cd8142
|
||||||
|
|
||||||
[people track]: https://github.com/RizwanMunawar/ultralytics/assets/62513924/93bb4ee2-77a0-4e4e-8eb6-eb8f527f0527
|
[people track]: https://github.com/RizwanMunawar/ultralytics/assets/62513924/93bb4ee2-77a0-4e4e-8eb6-eb8f527f0527
|
||||||
|
|
||||||
[vehicle track]: https://github.com/RizwanMunawar/ultralytics/assets/62513924/ee6e6038-383b-4f21-ac29-b2a1c7d386ab
|
[vehicle track]: https://github.com/RizwanMunawar/ultralytics/assets/62513924/ee6e6038-383b-4f21-ac29-b2a1c7d386ab
|
||||||
|
@ -19,7 +19,7 @@ keywords: Ultralytics, neural network, nn.modules.utils, bias_init_with_prob, in
|
|||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
## ::: ultralytics.nn.modules.utils.linear_init_
|
## ::: ultralytics.nn.modules.utils.linear_init
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@ The output of an oriented object detector is a set of rotated bounding boxes tha
|
|||||||
|
|
||||||
YOLOv8 OBB models use the `-obb` suffix, i.e. `yolov8n-obb.pt` and are pretrained on [DOTAv1](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/DOTAv1.yaml).
|
YOLOv8 OBB models use the `-obb` suffix, i.e. `yolov8n-obb.pt` and are pretrained on [DOTAv1](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/DOTAv1.yaml).
|
||||||
|
|
||||||
|
|
||||||
| Ships Detection using OBB | Vehicle Detection using OBB |
|
| Ships Detection using OBB | Vehicle Detection using OBB |
|
||||||
|:-------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------:|
|
|:-------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------:|
|
||||||
|  |  |
|
|  |  |
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
comments: true
|
comments: true
|
||||||
description: 'Learn how to use Ultralytics YOLO through Command Line: train models, run predictions and exports models to different formats easily using terminal commands.'
|
description: Learn how to use Ultralytics YOLO through Command Line: train models, run predictions and exports models to different formats easily using terminal commands.
|
||||||
keywords: Ultralytics, YOLO, CLI, train, validation, prediction, command line interface, YOLO CLI, YOLO terminal, model training, prediction, exporting
|
keywords: Ultralytics, YOLO, CLI, train, validation, prediction, command line interface, YOLO CLI, YOLO terminal, model training, prediction, exporting
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -161,8 +161,8 @@ The objectness losses of the three prediction layers (`P3`, `P4`, `P5`) are weig
|
|||||||
|
|
||||||
The YOLOv5 architecture makes some important changes to the box prediction strategy compared to earlier versions of YOLO. In YOLOv2 and YOLOv3, the box coordinates were directly predicted using the activation of the last layer.
|
The YOLOv5 architecture makes some important changes to the box prediction strategy compared to earlier versions of YOLO. In YOLOv2 and YOLOv3, the box coordinates were directly predicted using the activation of the last layer.
|
||||||
|
|
||||||
+c_x)
|
+c_x>)
|
||||||
+c_y)
|
+c_y>)
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
@ -172,10 +172,10 @@ However, in YOLOv5, the formula for predicting the box coordinates has been upda
|
|||||||
|
|
||||||
The revised formulas for calculating the predicted bounding box are as follows:
|
The revised formulas for calculating the predicted bounding box are as follows:
|
||||||
|
|
||||||
-0.5)+c_x)
|
-0.5)+c_x>)
|
||||||
-0.5)+c_y)
|
-0.5)+c_y>)
|
||||||
)^2)
|
)^2>)
|
||||||
)^2)
|
)^2>)
|
||||||
|
|
||||||
Compare the center point offset before and after scaling. The center point offset range is adjusted from (0, 1) to (-0.5, 1.5). Therefore, offset can easily get 0 or 1.
|
Compare the center point offset before and after scaling. The center point offset range is adjusted from (0, 1) to (-0.5, 1.5). Therefore, offset can easily get 0 or 1.
|
||||||
|
|
||||||
@ -197,11 +197,11 @@ This process follows these steps:
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
)
|
>)
|
||||||
|
|
||||||
)
|
>)
|
||||||
|
|
||||||
)
|
>)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ Export in `YOLOv5 Pytorch` format, then copy the snippet into your training scri
|
|||||||
|
|
||||||
### 2.1 Create `dataset.yaml`
|
### 2.1 Create `dataset.yaml`
|
||||||
|
|
||||||
[COCO128](https://www.kaggle.com/ultralytics/coco128) is an example small tutorial dataset composed of the first 128 images in [COCO](https://cocodataset.org/) train2017. These same 128 images are used for both training and validation to verify our training pipeline is capable of overfitting. [data/coco128.yaml](https://github.com/ultralytics/yolov5/blob/master/data/coco128.yaml), shown below, is the dataset config file that defines 1) the dataset root directory `path` and relative paths to `train` / `val` / `test` image directories (or *.txt files with image paths) and 2) a class `names` dictionary:
|
[COCO128](https://www.kaggle.com/ultralytics/coco128) is an example small tutorial dataset composed of the first 128 images in [COCO](https://cocodataset.org/) train2017. These same 128 images are used for both training and validation to verify our training pipeline is capable of overfitting. [data/coco128.yaml](https://github.com/ultralytics/yolov5/blob/master/data/coco128.yaml), shown below, is the dataset config file that defines 1) the dataset root directory `path` and relative paths to `train` / `val` / `test` image directories (or `*.txt` files with image paths) and 2) a class `names` dictionary:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# 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, ..]
|
# 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, ..]
|
||||||
|
@ -60,43 +60,42 @@ model.24.m.2.bias
|
|||||||
Looking at the model architecture we can see that the model backbone is layers 0-9:
|
Looking at the model architecture we can see that the model backbone is layers 0-9:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# YOLOv5 backbone
|
# YOLOv5 v6.0 backbone
|
||||||
backbone:
|
backbone:
|
||||||
# [from, number, module, args]
|
# [from, number, module, args]
|
||||||
[[-1, 1, Focus, [64, 3]], # 0-P1/2
|
- [-1, 1, Conv, [64, 6, 2, 2]] # 0-P1/2
|
||||||
[-1, 1, Conv, [128, 3, 2]], # 1-P2/4
|
- [-1, 1, Conv, [128, 3, 2]] # 1-P2/4
|
||||||
[-1, 3, BottleneckCSP, [128]],
|
- [-1, 3, C3, [128]]
|
||||||
[-1, 1, Conv, [256, 3, 2]], # 3-P3/8
|
- [-1, 1, Conv, [256, 3, 2]] # 3-P3/8
|
||||||
[-1, 9, BottleneckCSP, [256]],
|
- [-1, 6, C3, [256]]
|
||||||
[-1, 1, Conv, [512, 3, 2]], # 5-P4/16
|
- [-1, 1, Conv, [512, 3, 2]] # 5-P4/16
|
||||||
[-1, 9, BottleneckCSP, [512]],
|
- [-1, 9, C3, [512]]
|
||||||
[-1, 1, Conv, [1024, 3, 2]], # 7-P5/32
|
- [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
|
||||||
[-1, 1, SPP, [1024, [5, 9, 13]]],
|
- [-1, 3, C3, [1024]]
|
||||||
[-1, 3, BottleneckCSP, [1024, False]], # 9
|
- [-1, 1, SPPF, [1024, 5]] # 9
|
||||||
]
|
|
||||||
|
|
||||||
# YOLOv5 head
|
|
||||||
|
# YOLOv5 v6.0 head
|
||||||
head:
|
head:
|
||||||
[[-1, 1, Conv, [512, 1, 1]],
|
- [-1, 1, Conv, [512, 1, 1]]
|
||||||
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
|
- [-1, 1, nn.Upsample, [None, 2, 'nearest']]
|
||||||
[[-1, 6], 1, Concat, [1]], # cat backbone P4
|
- [[-1, 6], 1, Concat, [1]] # cat backbone P4
|
||||||
[-1, 3, BottleneckCSP, [512, False]], # 13
|
- [-1, 3, C3, [512, False]] # 13
|
||||||
|
|
||||||
[-1, 1, Conv, [256, 1, 1]],
|
- [-1, 1, Conv, [256, 1, 1]]
|
||||||
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
|
- [-1, 1, nn.Upsample, [None, 2, 'nearest']]
|
||||||
[[-1, 4], 1, Concat, [1]], # cat backbone P3
|
- [[-1, 4], 1, Concat, [1]] # cat backbone P3
|
||||||
[-1, 3, BottleneckCSP, [256, False]], # 17 (P3/8-small)
|
- [-1, 3, C3, [256, False]] # 17 (P3/8-small)
|
||||||
|
|
||||||
[-1, 1, Conv, [256, 3, 2]],
|
- [-1, 1, Conv, [256, 3, 2]]
|
||||||
[[-1, 14], 1, Concat, [1]], # cat head P4
|
- [[-1, 14], 1, Concat, [1]] # cat head P4
|
||||||
[-1, 3, BottleneckCSP, [512, False]], # 20 (P4/16-medium)
|
- [-1, 3, C3, [512, False]] # 20 (P4/16-medium)
|
||||||
|
|
||||||
[-1, 1, Conv, [512, 3, 2]],
|
- [-1, 1, Conv, [512, 3, 2]]
|
||||||
[[-1, 10], 1, Concat, [1]], # cat head P5
|
- [[-1, 10], 1, Concat, [1]] # cat head P5
|
||||||
[-1, 3, BottleneckCSP, [1024, False]], # 23 (P5/32-large)
|
- [-1, 3, C3, [1024, False]] # 23 (P5/32-large)
|
||||||
|
|
||||||
[[17, 20, 23], 1, Detect, [nc, anchors]], # Detect(P3, P4, P5)
|
- [[17, 20, 23], 1, Detect, [nc]] # Detect(P3, P4, P5)
|
||||||
]
|
|
||||||
```
|
```
|
||||||
|
|
||||||
so we can define the freeze list to contain all modules with 'model.0.' - 'model.9.' in their names:
|
so we can define the freeze list to contain all modules with 'model.0.' - 'model.9.' in their names:
|
||||||
|
@ -80,7 +80,7 @@ Contribuir con un nuevo conjunto de datos implica varios pasos para garantizar q
|
|||||||
|
|
||||||
2. **Annotar Imágenes**: Anota estas imágenes con cuadros delimitadores, segmentos o puntos clave, dependiendo de la tarea.
|
2. **Annotar Imágenes**: Anota estas imágenes con cuadros delimitadores, segmentos o puntos clave, dependiendo de la tarea.
|
||||||
|
|
||||||
3. **Exportar Anotaciones**: Convierte estas anotaciones en el formato de archivo *.txt de YOLO que Ultralytics soporta.
|
3. **Exportar Anotaciones**: Convierte estas anotaciones en el formato de archivo `*.txt` de YOLO que Ultralytics soporta.
|
||||||
|
|
||||||
4. **Organizar Conjunto de Datos**: Organiza tu conjunto de datos en la estructura de carpetas correcta. Deberías tener directorios de nivel superior `train/` y `val/`, y dentro de cada uno, un subdirectorio `images/` y `labels/`.
|
4. **Organizar Conjunto de Datos**: Organiza tu conjunto de datos en la estructura de carpetas correcta. Deberías tener directorios de nivel superior `train/` y `val/`, y dentro de cada uno, un subdirectorio `images/` y `labels/`.
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ Contribuer un nouvel ensemble de données implique plusieurs étapes pour s'assu
|
|||||||
|
|
||||||
2. **Annoter des Images** : Annotez ces images avec des boîtes englobantes, des segments ou des points clés, en fonction de la tâche.
|
2. **Annoter des Images** : Annotez ces images avec des boîtes englobantes, des segments ou des points clés, en fonction de la tâche.
|
||||||
|
|
||||||
3. **Exporter des Annotations** : Convertissez ces annotations au format de fichier YOLO *.txt pris en charge par Ultralytics.
|
3. **Exporter des Annotations** : Convertissez ces annotations au format de fichier YOLO `*.txt` pris en charge par Ultralytics.
|
||||||
|
|
||||||
4. **Organiser l'Ensemble de Données** : Rangez votre ensemble de données dans la bonne structure de dossiers. Vous devriez avoir des répertoires de niveau supérieur `train/` et `val/`, et à l'intérieur de chacun, un sous-répertoire `images/` et `labels/`.
|
4. **Organiser l'Ensemble de Données** : Rangez votre ensemble de données dans la bonne structure de dossiers. Vous devriez avoir des répertoires de niveau supérieur `train/` et `val/`, et à l'intérieur de chacun, un sous-répertoire `images/` et `labels/`.
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ Ultralytics कंप्यूटर विज्ञान कार्यों
|
|||||||
इन छवियों को बाउंडिंग बॉक्स, संरेखण या कीपॉइंट्स के साथ थस्क करें, टास्क के आधार पर।
|
इन छवियों को बाउंडिंग बॉक्स, संरेखण या कीपॉइंट्स के साथ थस्क करें, टास्क के आधार पर।
|
||||||
|
|
||||||
3. **एनोटेशन निर्यात करें**:
|
3. **एनोटेशन निर्यात करें**:
|
||||||
इन एनोटेशन को योलो *.txt फ़ाइल प्रारूप में निर्यात करें, जिसे Ultralytics समर्थित करता है।
|
इन एनोटेशन को योलो `*.txt` फ़ाइल प्रारूप में निर्यात करें, जिसे Ultralytics समर्थित करता है।
|
||||||
|
|
||||||
4. **डेटासेट व्यवस्थित करें**:
|
4. **डेटासेट व्यवस्थित करें**:
|
||||||
अपने डेटासेट को सही फ़ोल्डर संरचना में व्यवस्थित करें। आपके पास `train/` और `val/` शीर्ष-स्तर निर्देशिकाएँ होनी चाहिए, और हर एक में `images/` और `labels/` उप-निर्देशिका होनी चाहिए।
|
अपने डेटासेट को सही फ़ोल्डर संरचना में व्यवस्थित करें। आपके पास `train/` और `val/` शीर्ष-स्तर निर्देशिकाएँ होनी चाहिए, और हर एक में `images/` और `labels/` उप-निर्देशिका होनी चाहिए।
|
||||||
|
@ -48,7 +48,7 @@ YOLOv3 श्रृंखला, इनमें YOLOv3, YOLOv3-Ultralytics औ
|
|||||||
|
|
||||||
=== "Python"
|
=== "Python"
|
||||||
|
|
||||||
`*.pt` प्रीट्रेन किए गए PyTorch मॉडल और कॉन्फ़िगरेशन *.yaml फ़ाइल Python में YOLO() क्लास कों यूज़ करके एक मॉडल इंस्टेंस तैयार करने के लिए पास कर सकते हैं:
|
`*.pt` प्रीट्रेन किए गए PyTorch मॉडल और कॉन्फ़िगरेशन `*.yaml` फ़ाइल Python में YOLO() क्लास कों यूज़ करके एक मॉडल इंस्टेंस तैयार करने के लिए पास कर सकते हैं:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from ultralytics import YOLO
|
from ultralytics import YOLO
|
||||||
|
@ -80,7 +80,7 @@ Ultralyticsは、検出、インスタンスセグメンテーション、ポー
|
|||||||
|
|
||||||
2. **画像をアノテート**します:これらの画像を、タスクに応じてバウンディングボックス、セグメント、またはキーポイントでアノテートします。
|
2. **画像をアノテート**します:これらの画像を、タスクに応じてバウンディングボックス、セグメント、またはキーポイントでアノテートします。
|
||||||
|
|
||||||
3. **アノテーションをエクスポート**します:これらのアノテーションを、UltralyticsがサポートしているYOLO *.txtファイルフォーマットに変換します。
|
3. **アノテーションをエクスポート**します:これらのアノテーションを、UltralyticsがサポートしているYOLO `*.txt`ファイルフォーマットに変換します。
|
||||||
|
|
||||||
4. **データセットを編成**します:データセットを正しいフォルダ構造に配置します。`train/` および `val/` のトップレベルディレクトリーを持ち、各ディレクトリー内に `images/` および `labels/` のサブディレクトリーがあるべきです。
|
4. **データセットを編成**します:データセットを正しいフォルダ構造に配置します。`train/` および `val/` のトップレベルディレクトリーを持ち、各ディレクトリー内に `images/` および `labels/` のサブディレクトリーがあるべきです。
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ Ultralytics는 탐지, 인스턴스 세분화, 자세 추정, 분류 및 다중
|
|||||||
|
|
||||||
2. **이미지 주석 달기**: 이러한 이미지에 작업에 따라 바운딩 박스, 세그먼트 또는 키포인트로 주석을 답니다.
|
2. **이미지 주석 달기**: 이러한 이미지에 작업에 따라 바운딩 박스, 세그먼트 또는 키포인트로 주석을 답니다.
|
||||||
|
|
||||||
3. **주석 내보내기**: 이 주석들을 Ultralytics가 지원하는 YOLO *.txt 파일 형식으로 변환합니다.
|
3. **주석 내보내기**: 이 주석들을 Ultralytics가 지원하는 YOLO `*.txt` 파일 형식으로 변환합니다.
|
||||||
|
|
||||||
4. **데이터셋 구성**: 데이터셋을 올바른 폴더 구조로 배열합니다. 'train/'과 'val/' 상위 디렉토리를 갖고 있어야 하며, 각각 'images/' 및 'labels/' 하위 디렉토리가 있어야 합니다.
|
4. **데이터셋 구성**: 데이터셋을 올바른 폴더 구조로 배열합니다. 'train/'과 'val/' 상위 디렉토리를 갖고 있어야 하며, 각각 'images/' 및 'labels/' 하위 디렉토리가 있어야 합니다.
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@ repo_url: https://github.com/ultralytics/ultralytics
|
|||||||
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/en/
|
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/en/
|
||||||
repo_name: ultralytics/ultralytics
|
repo_name: ultralytics/ultralytics
|
||||||
remote_name: https://github.com/ultralytics/docs
|
remote_name: https://github.com/ultralytics/docs
|
||||||
docs_dir: 'en/' # where to find the markdown files
|
docs_dir: "en/" # where to find the markdown files
|
||||||
site_dir: '../site/' # where to publish to
|
site_dir: "../site/" # where to publish to
|
||||||
|
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
@ -351,8 +351,8 @@ nav:
|
|||||||
- Integrations: hub/integrations.md
|
- Integrations: hub/integrations.md
|
||||||
- Ultralytics HUB App:
|
- Ultralytics HUB App:
|
||||||
- hub/app/index.md
|
- hub/app/index.md
|
||||||
- 'iOS': hub/app/ios.md
|
- iOS: hub/app/ios.md
|
||||||
- 'Android': hub/app/android.md
|
- Android: hub/app/android.md
|
||||||
- Inference API: hub/inference_api.md
|
- Inference API: hub/inference_api.md
|
||||||
|
|
||||||
- Reference:
|
- Reference:
|
||||||
|
@ -8,8 +8,8 @@ repo_url: https://github.com/ultralytics/ultralytics
|
|||||||
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/ar/
|
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/ar/
|
||||||
repo_name: ultralytics/ultralytics
|
repo_name: ultralytics/ultralytics
|
||||||
remote_name: https://github.com/ultralytics/docs
|
remote_name: https://github.com/ultralytics/docs
|
||||||
docs_dir: 'ar/' # where to find the markdown files
|
docs_dir: "ar/" # where to find the markdown files
|
||||||
site_dir: '../site/ar' # where to publish to
|
site_dir: "../site/ar" # where to publish to
|
||||||
|
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
@ -151,7 +151,6 @@ markdown_extensions:
|
|||||||
- pymdownx.tabbed:
|
- pymdownx.tabbed:
|
||||||
alternate_style: true
|
alternate_style: true
|
||||||
|
|
||||||
|
|
||||||
# Primary navigation ---------------------------------------------------------------------------------------------------
|
# Primary navigation ---------------------------------------------------------------------------------------------------
|
||||||
nav:
|
nav:
|
||||||
- الصفحة الرئيسية:
|
- الصفحة الرئيسية:
|
||||||
|
@ -8,8 +8,8 @@ repo_url: https://github.com/ultralytics/ultralytics
|
|||||||
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/de/
|
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/de/
|
||||||
repo_name: ultralytics/ultralytics
|
repo_name: ultralytics/ultralytics
|
||||||
remote_name: https://github.com/ultralytics/docs
|
remote_name: https://github.com/ultralytics/docs
|
||||||
docs_dir: 'de/' # where to find the markdown files
|
docs_dir: "de/" # where to find the markdown files
|
||||||
site_dir: '../site/de' # where to publish to
|
site_dir: "../site/de" # where to publish to
|
||||||
|
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
@ -151,7 +151,6 @@ markdown_extensions:
|
|||||||
- pymdownx.tabbed:
|
- pymdownx.tabbed:
|
||||||
alternate_style: true
|
alternate_style: true
|
||||||
|
|
||||||
|
|
||||||
# Primary navigation ---------------------------------------------------------------------------------------------------
|
# Primary navigation ---------------------------------------------------------------------------------------------------
|
||||||
nav:
|
nav:
|
||||||
- Startseite:
|
- Startseite:
|
||||||
|
@ -8,8 +8,8 @@ repo_url: https://github.com/ultralytics/ultralytics
|
|||||||
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/es/
|
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/es/
|
||||||
repo_name: ultralytics/ultralytics
|
repo_name: ultralytics/ultralytics
|
||||||
remote_name: https://github.com/ultralytics/docs
|
remote_name: https://github.com/ultralytics/docs
|
||||||
docs_dir: 'es/' # where to find the markdown files
|
docs_dir: "es/" # where to find the markdown files
|
||||||
site_dir: '../site/es' # where to publish to
|
site_dir: "../site/es" # where to publish to
|
||||||
|
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
@ -151,7 +151,6 @@ markdown_extensions:
|
|||||||
- pymdownx.tabbed:
|
- pymdownx.tabbed:
|
||||||
alternate_style: true
|
alternate_style: true
|
||||||
|
|
||||||
|
|
||||||
# Primary navigation ---------------------------------------------------------------------------------------------------
|
# Primary navigation ---------------------------------------------------------------------------------------------------
|
||||||
nav:
|
nav:
|
||||||
- Inicio:
|
- Inicio:
|
||||||
|
@ -8,8 +8,8 @@ repo_url: https://github.com/ultralytics/ultralytics
|
|||||||
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/fr/
|
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/fr/
|
||||||
repo_name: ultralytics/ultralytics
|
repo_name: ultralytics/ultralytics
|
||||||
remote_name: https://github.com/ultralytics/docs
|
remote_name: https://github.com/ultralytics/docs
|
||||||
docs_dir: 'fr/' # where to find the markdown files
|
docs_dir: "fr/" # where to find the markdown files
|
||||||
site_dir: '../site/fr' # where to publish to
|
site_dir: "../site/fr" # where to publish to
|
||||||
|
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
@ -151,7 +151,6 @@ markdown_extensions:
|
|||||||
- pymdownx.tabbed:
|
- pymdownx.tabbed:
|
||||||
alternate_style: true
|
alternate_style: true
|
||||||
|
|
||||||
|
|
||||||
# Primary navigation ---------------------------------------------------------------------------------------------------
|
# Primary navigation ---------------------------------------------------------------------------------------------------
|
||||||
nav:
|
nav:
|
||||||
- Accueil:
|
- Accueil:
|
||||||
|
@ -8,8 +8,8 @@ repo_url: https://github.com/ultralytics/ultralytics
|
|||||||
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/hi/
|
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/hi/
|
||||||
repo_name: ultralytics/ultralytics
|
repo_name: ultralytics/ultralytics
|
||||||
remote_name: https://github.com/ultralytics/docs
|
remote_name: https://github.com/ultralytics/docs
|
||||||
docs_dir: 'hi/' # where to find the markdown files
|
docs_dir: "hi/" # where to find the markdown files
|
||||||
site_dir: '../site/hi' # where to publish to
|
site_dir: "../site/hi" # where to publish to
|
||||||
|
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
@ -151,7 +151,6 @@ markdown_extensions:
|
|||||||
- pymdownx.tabbed:
|
- pymdownx.tabbed:
|
||||||
alternate_style: true
|
alternate_style: true
|
||||||
|
|
||||||
|
|
||||||
# Primary navigation ---------------------------------------------------------------------------------------------------
|
# Primary navigation ---------------------------------------------------------------------------------------------------
|
||||||
nav:
|
nav:
|
||||||
- होमपेज:
|
- होमपेज:
|
||||||
|
@ -8,8 +8,8 @@ repo_url: https://github.com/ultralytics/ultralytics
|
|||||||
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/ja/
|
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/ja/
|
||||||
repo_name: ultralytics/ultralytics
|
repo_name: ultralytics/ultralytics
|
||||||
remote_name: https://github.com/ultralytics/docs
|
remote_name: https://github.com/ultralytics/docs
|
||||||
docs_dir: 'ja/' # where to find the markdown files
|
docs_dir: "ja/" # where to find the markdown files
|
||||||
site_dir: '../site/ja' # where to publish to
|
site_dir: "../site/ja" # where to publish to
|
||||||
|
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
@ -151,7 +151,6 @@ markdown_extensions:
|
|||||||
- pymdownx.tabbed:
|
- pymdownx.tabbed:
|
||||||
alternate_style: true
|
alternate_style: true
|
||||||
|
|
||||||
|
|
||||||
# Primary navigation ---------------------------------------------------------------------------------------------------
|
# Primary navigation ---------------------------------------------------------------------------------------------------
|
||||||
nav:
|
nav:
|
||||||
- ホーム:
|
- ホーム:
|
||||||
|
@ -8,8 +8,8 @@ repo_url: https://github.com/ultralytics/ultralytics
|
|||||||
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/ko/
|
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/ko/
|
||||||
repo_name: ultralytics/ultralytics
|
repo_name: ultralytics/ultralytics
|
||||||
remote_name: https://github.com/ultralytics/docs
|
remote_name: https://github.com/ultralytics/docs
|
||||||
docs_dir: 'ko/' # where to find the markdown files
|
docs_dir: "ko/" # where to find the markdown files
|
||||||
site_dir: '../site/ko' # where to publish to
|
site_dir: "../site/ko" # where to publish to
|
||||||
|
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
@ -151,7 +151,6 @@ markdown_extensions:
|
|||||||
- pymdownx.tabbed:
|
- pymdownx.tabbed:
|
||||||
alternate_style: true
|
alternate_style: true
|
||||||
|
|
||||||
|
|
||||||
# Primary navigation ---------------------------------------------------------------------------------------------------
|
# Primary navigation ---------------------------------------------------------------------------------------------------
|
||||||
nav:
|
nav:
|
||||||
- 홈:
|
- 홈:
|
||||||
|
@ -8,8 +8,8 @@ repo_url: https://github.com/ultralytics/ultralytics
|
|||||||
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/pt/
|
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/pt/
|
||||||
repo_name: ultralytics/ultralytics
|
repo_name: ultralytics/ultralytics
|
||||||
remote_name: https://github.com/ultralytics/docs
|
remote_name: https://github.com/ultralytics/docs
|
||||||
docs_dir: 'pt/' # where to find the markdown files
|
docs_dir: "pt/" # where to find the markdown files
|
||||||
site_dir: '../site/pt' # where to publish to
|
site_dir: "../site/pt" # where to publish to
|
||||||
|
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
@ -151,7 +151,6 @@ markdown_extensions:
|
|||||||
- pymdownx.tabbed:
|
- pymdownx.tabbed:
|
||||||
alternate_style: true
|
alternate_style: true
|
||||||
|
|
||||||
|
|
||||||
# Primary navigation ---------------------------------------------------------------------------------------------------
|
# Primary navigation ---------------------------------------------------------------------------------------------------
|
||||||
nav:
|
nav:
|
||||||
- Página Inicial:
|
- Página Inicial:
|
||||||
|
@ -8,8 +8,8 @@ repo_url: https://github.com/ultralytics/ultralytics
|
|||||||
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/ru/
|
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/ru/
|
||||||
repo_name: ultralytics/ultralytics
|
repo_name: ultralytics/ultralytics
|
||||||
remote_name: https://github.com/ultralytics/docs
|
remote_name: https://github.com/ultralytics/docs
|
||||||
docs_dir: 'ru/' # where to find the markdown files
|
docs_dir: "ru/" # where to find the markdown files
|
||||||
site_dir: '../site/ru' # where to publish to
|
site_dir: "../site/ru" # where to publish to
|
||||||
|
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
@ -151,7 +151,6 @@ markdown_extensions:
|
|||||||
- pymdownx.tabbed:
|
- pymdownx.tabbed:
|
||||||
alternate_style: true
|
alternate_style: true
|
||||||
|
|
||||||
|
|
||||||
# Primary navigation ---------------------------------------------------------------------------------------------------
|
# Primary navigation ---------------------------------------------------------------------------------------------------
|
||||||
nav:
|
nav:
|
||||||
- Главная:
|
- Главная:
|
||||||
|
@ -8,8 +8,8 @@ repo_url: https://github.com/ultralytics/ultralytics
|
|||||||
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/zh/
|
edit_uri: https://github.com/ultralytics/ultralytics/tree/main/docs/zh/
|
||||||
repo_name: ultralytics/ultralytics
|
repo_name: ultralytics/ultralytics
|
||||||
remote_name: https://github.com/ultralytics/docs
|
remote_name: https://github.com/ultralytics/docs
|
||||||
docs_dir: 'zh/' # where to find the markdown files
|
docs_dir: "zh/" # where to find the markdown files
|
||||||
site_dir: '../site/zh' # where to publish to
|
site_dir: "../site/zh" # where to publish to
|
||||||
|
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
@ -151,7 +151,6 @@ markdown_extensions:
|
|||||||
- pymdownx.tabbed:
|
- pymdownx.tabbed:
|
||||||
alternate_style: true
|
alternate_style: true
|
||||||
|
|
||||||
|
|
||||||
# Primary navigation ---------------------------------------------------------------------------------------------------
|
# Primary navigation ---------------------------------------------------------------------------------------------------
|
||||||
nav:
|
nav:
|
||||||
- 主页:
|
- 主页:
|
||||||
|
@ -80,7 +80,7 @@ Contribuir com um novo conjunto de dados envolve várias etapas para garantir qu
|
|||||||
|
|
||||||
2. **Anotar Imagens**: Anote essas imagens com caixas delimitadoras, segmentos ou pontos-chave, dependendo da tarefa.
|
2. **Anotar Imagens**: Anote essas imagens com caixas delimitadoras, segmentos ou pontos-chave, dependendo da tarefa.
|
||||||
|
|
||||||
3. **Exportar Anotações**: Converta essas anotações no formato de arquivo *.txt YOLO que a Ultralytics suporta.
|
3. **Exportar Anotações**: Converta essas anotações no formato de arquivo `*.txt` YOLO que a Ultralytics suporta.
|
||||||
|
|
||||||
4. **Organizar Conjunto de Dados**: Organize seu conjunto de dados na estrutura de pastas correta. Você deve ter diretórios de topo `train/` e `val/`, e dentro de cada um, um subdiretório `images/` e `labels/`.
|
4. **Organizar Conjunto de Dados**: Organize seu conjunto de dados na estrutura de pastas correta. Você deve ter diretórios de topo `train/` e `val/`, e dentro de cada um, um subdiretório `images/` e `labels/`.
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ Ultralytics предоставляет поддержку различных н
|
|||||||
|
|
||||||
2. **Аннотация изображений**: Пометьте эти изображения ограничивающими рамками, сегментами или ключевыми точками в зависимости от задачи.
|
2. **Аннотация изображений**: Пометьте эти изображения ограничивающими рамками, сегментами или ключевыми точками в зависимости от задачи.
|
||||||
|
|
||||||
3. **Экспорт аннотаций**: Конвертируйте эти аннотации в формат файлов YOLO *.txt, который поддерживается Ultralytics.
|
3. **Экспорт аннотаций**: Конвертируйте эти аннотации в формат файлов YOLO `*.txt`, который поддерживается Ultralytics.
|
||||||
|
|
||||||
4. **Организация набора данных**: Распределите ваш набор данных в правильную структуру папок. У вас должны быть каталоги верхнего уровня `train/` и `val/`, и в каждом из них подкаталоги `images/` и `labels/`.
|
4. **Организация набора данных**: Распределите ваш набор данных в правильную структуру папок. У вас должны быть каталоги верхнего уровня `train/` и `val/`, и в каждом из них подкаталоги `images/` и `labels/`.
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ Ultralytics 支持多种数据集,方便开展计算机视觉任务,诸如
|
|||||||
|
|
||||||
2. **注释图像**:根据任务对这些图像进行边界框、分段或关键点的标记。
|
2. **注释图像**:根据任务对这些图像进行边界框、分段或关键点的标记。
|
||||||
|
|
||||||
3. **导出注释**:将这些注释转换为 Ultralytics 支持的 YOLO *.txt 文件格式。
|
3. **导出注释**:将这些注释转换为 Ultralytics 支持的 YOLO `*.txt` 文件格式。
|
||||||
|
|
||||||
4. **组织数据集**:按正确的文件夹结构排列您的数据集。您应该有 `train/ ` 和 `val/` 顶级目录,在每个目录内,有 `images/` 和 `labels/` 子目录。
|
4. **组织数据集**:按正确的文件夹结构排列您的数据集。您应该有 `train/ ` 和 `val/` 顶级目录,在每个目录内,有 `images/` 和 `labels/` 子目录。
|
||||||
|
|
||||||
|
@ -9,40 +9,38 @@ width_multiple: 1.0 # layer channel multiple
|
|||||||
# darknet53 backbone
|
# darknet53 backbone
|
||||||
backbone:
|
backbone:
|
||||||
# [from, number, module, args]
|
# [from, number, module, args]
|
||||||
[[-1, 1, Conv, [32, 3, 1]], # 0
|
- [-1, 1, Conv, [32, 3, 1]] # 0
|
||||||
[-1, 1, Conv, [64, 3, 2]], # 1-P1/2
|
- [-1, 1, Conv, [64, 3, 2]] # 1-P1/2
|
||||||
[-1, 1, Bottleneck, [64]],
|
- [-1, 1, Bottleneck, [64]]
|
||||||
[-1, 1, Conv, [128, 3, 2]], # 3-P2/4
|
- [-1, 1, Conv, [128, 3, 2]] # 3-P2/4
|
||||||
[-1, 2, Bottleneck, [128]],
|
- [-1, 2, Bottleneck, [128]]
|
||||||
[-1, 1, Conv, [256, 3, 2]], # 5-P3/8
|
- [-1, 1, Conv, [256, 3, 2]] # 5-P3/8
|
||||||
[-1, 8, Bottleneck, [256]],
|
- [-1, 8, Bottleneck, [256]]
|
||||||
[-1, 1, Conv, [512, 3, 2]], # 7-P4/16
|
- [-1, 1, Conv, [512, 3, 2]] # 7-P4/16
|
||||||
[-1, 8, Bottleneck, [512]],
|
- [-1, 8, Bottleneck, [512]]
|
||||||
[-1, 1, Conv, [1024, 3, 2]], # 9-P5/32
|
- [-1, 1, Conv, [1024, 3, 2]] # 9-P5/32
|
||||||
[-1, 4, Bottleneck, [1024]], # 10
|
- [-1, 4, Bottleneck, [1024]] # 10
|
||||||
]
|
|
||||||
|
|
||||||
# YOLOv3-SPP head
|
# YOLOv3-SPP head
|
||||||
head:
|
head:
|
||||||
[[-1, 1, Bottleneck, [1024, False]],
|
- [-1, 1, Bottleneck, [1024, False]]
|
||||||
[-1, 1, SPP, [512, [5, 9, 13]]],
|
- [-1, 1, SPP, [512, [5, 9, 13]]]
|
||||||
[-1, 1, Conv, [1024, 3, 1]],
|
- [-1, 1, Conv, [1024, 3, 1]]
|
||||||
[-1, 1, Conv, [512, 1, 1]],
|
- [-1, 1, Conv, [512, 1, 1]]
|
||||||
[-1, 1, Conv, [1024, 3, 1]], # 15 (P5/32-large)
|
- [-1, 1, Conv, [1024, 3, 1]] # 15 (P5/32-large)
|
||||||
|
|
||||||
[-2, 1, Conv, [256, 1, 1]],
|
- [-2, 1, Conv, [256, 1, 1]]
|
||||||
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
|
- [-1, 1, nn.Upsample, [None, 2, 'nearest']]
|
||||||
[[-1, 8], 1, Concat, [1]], # cat backbone P4
|
- [[-1, 8], 1, Concat, [1]] # cat backbone P4
|
||||||
[-1, 1, Bottleneck, [512, False]],
|
- [-1, 1, Bottleneck, [512, False]]
|
||||||
[-1, 1, Bottleneck, [512, False]],
|
- [-1, 1, Bottleneck, [512, False]]
|
||||||
[-1, 1, Conv, [256, 1, 1]],
|
- [-1, 1, Conv, [256, 1, 1]]
|
||||||
[-1, 1, Conv, [512, 3, 1]], # 22 (P4/16-medium)
|
- [-1, 1, Conv, [512, 3, 1]] # 22 (P4/16-medium)
|
||||||
|
|
||||||
[-2, 1, Conv, [128, 1, 1]],
|
- [-2, 1, Conv, [128, 1, 1]]
|
||||||
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
|
- [-1, 1, nn.Upsample, [None, 2, 'nearest']]
|
||||||
[[-1, 6], 1, Concat, [1]], # cat backbone P3
|
- [[-1, 6], 1, Concat, [1]] # cat backbone P3
|
||||||
[-1, 1, Bottleneck, [256, False]],
|
- [-1, 1, Bottleneck, [256, False]]
|
||||||
[-1, 2, Bottleneck, [256, False]], # 27 (P3/8-small)
|
- [-1, 2, Bottleneck, [256, False]] # 27 (P3/8-small)
|
||||||
|
|
||||||
[[27, 22, 15], 1, Detect, [nc]], # Detect(P3, P4, P5)
|
- [[27, 22, 15], 1, Detect, [nc]] # Detect(P3, P4, P5)
|
||||||
]
|
|
||||||
|
@ -9,31 +9,29 @@ width_multiple: 1.0 # layer channel multiple
|
|||||||
# YOLOv3-tiny backbone
|
# YOLOv3-tiny backbone
|
||||||
backbone:
|
backbone:
|
||||||
# [from, number, module, args]
|
# [from, number, module, args]
|
||||||
[[-1, 1, Conv, [16, 3, 1]], # 0
|
- [-1, 1, Conv, [16, 3, 1]] # 0
|
||||||
[-1, 1, nn.MaxPool2d, [2, 2, 0]], # 1-P1/2
|
- [-1, 1, nn.MaxPool2d, [2, 2, 0]] # 1-P1/2
|
||||||
[-1, 1, Conv, [32, 3, 1]],
|
- [-1, 1, Conv, [32, 3, 1]]
|
||||||
[-1, 1, nn.MaxPool2d, [2, 2, 0]], # 3-P2/4
|
- [-1, 1, nn.MaxPool2d, [2, 2, 0]] # 3-P2/4
|
||||||
[-1, 1, Conv, [64, 3, 1]],
|
- [-1, 1, Conv, [64, 3, 1]]
|
||||||
[-1, 1, nn.MaxPool2d, [2, 2, 0]], # 5-P3/8
|
- [-1, 1, nn.MaxPool2d, [2, 2, 0]] # 5-P3/8
|
||||||
[-1, 1, Conv, [128, 3, 1]],
|
- [-1, 1, Conv, [128, 3, 1]]
|
||||||
[-1, 1, nn.MaxPool2d, [2, 2, 0]], # 7-P4/16
|
- [-1, 1, nn.MaxPool2d, [2, 2, 0]] # 7-P4/16
|
||||||
[-1, 1, Conv, [256, 3, 1]],
|
- [-1, 1, Conv, [256, 3, 1]]
|
||||||
[-1, 1, nn.MaxPool2d, [2, 2, 0]], # 9-P5/32
|
- [-1, 1, nn.MaxPool2d, [2, 2, 0]] # 9-P5/32
|
||||||
[-1, 1, Conv, [512, 3, 1]],
|
- [-1, 1, Conv, [512, 3, 1]]
|
||||||
[-1, 1, nn.ZeroPad2d, [[0, 1, 0, 1]]], # 11
|
- [-1, 1, nn.ZeroPad2d, [[0, 1, 0, 1]]] # 11
|
||||||
[-1, 1, nn.MaxPool2d, [2, 1, 0]], # 12
|
- [-1, 1, nn.MaxPool2d, [2, 1, 0]] # 12
|
||||||
]
|
|
||||||
|
|
||||||
# YOLOv3-tiny head
|
# YOLOv3-tiny head
|
||||||
head:
|
head:
|
||||||
[[-1, 1, Conv, [1024, 3, 1]],
|
- [-1, 1, Conv, [1024, 3, 1]]
|
||||||
[-1, 1, Conv, [256, 1, 1]],
|
- [-1, 1, Conv, [256, 1, 1]]
|
||||||
[-1, 1, Conv, [512, 3, 1]], # 15 (P5/32-large)
|
- [-1, 1, Conv, [512, 3, 1]] # 15 (P5/32-large)
|
||||||
|
|
||||||
[-2, 1, Conv, [128, 1, 1]],
|
- [-2, 1, Conv, [128, 1, 1]]
|
||||||
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
|
- [-1, 1, nn.Upsample, [None, 2, 'nearest']]
|
||||||
[[-1, 8], 1, Concat, [1]], # cat backbone P4
|
- [[-1, 8], 1, Concat, [1]] # cat backbone P4
|
||||||
[-1, 1, Conv, [256, 3, 1]], # 19 (P4/16-medium)
|
- [-1, 1, Conv, [256, 3, 1]] # 19 (P4/16-medium)
|
||||||
|
|
||||||
[[19, 15], 1, Detect, [nc]], # Detect(P4, P5)
|
- [[19, 15], 1, Detect, [nc]] # Detect(P4, P5)
|
||||||
]
|
|
||||||
|
@ -9,40 +9,38 @@ width_multiple: 1.0 # layer channel multiple
|
|||||||
# darknet53 backbone
|
# darknet53 backbone
|
||||||
backbone:
|
backbone:
|
||||||
# [from, number, module, args]
|
# [from, number, module, args]
|
||||||
[[-1, 1, Conv, [32, 3, 1]], # 0
|
- [-1, 1, Conv, [32, 3, 1]] # 0
|
||||||
[-1, 1, Conv, [64, 3, 2]], # 1-P1/2
|
- [-1, 1, Conv, [64, 3, 2]] # 1-P1/2
|
||||||
[-1, 1, Bottleneck, [64]],
|
- [-1, 1, Bottleneck, [64]]
|
||||||
[-1, 1, Conv, [128, 3, 2]], # 3-P2/4
|
- [-1, 1, Conv, [128, 3, 2]] # 3-P2/4
|
||||||
[-1, 2, Bottleneck, [128]],
|
- [-1, 2, Bottleneck, [128]]
|
||||||
[-1, 1, Conv, [256, 3, 2]], # 5-P3/8
|
- [-1, 1, Conv, [256, 3, 2]] # 5-P3/8
|
||||||
[-1, 8, Bottleneck, [256]],
|
- [-1, 8, Bottleneck, [256]]
|
||||||
[-1, 1, Conv, [512, 3, 2]], # 7-P4/16
|
- [-1, 1, Conv, [512, 3, 2]] # 7-P4/16
|
||||||
[-1, 8, Bottleneck, [512]],
|
- [-1, 8, Bottleneck, [512]]
|
||||||
[-1, 1, Conv, [1024, 3, 2]], # 9-P5/32
|
- [-1, 1, Conv, [1024, 3, 2]] # 9-P5/32
|
||||||
[-1, 4, Bottleneck, [1024]], # 10
|
- [-1, 4, Bottleneck, [1024]] # 10
|
||||||
]
|
|
||||||
|
|
||||||
# YOLOv3 head
|
# YOLOv3 head
|
||||||
head:
|
head:
|
||||||
[[-1, 1, Bottleneck, [1024, False]],
|
- [-1, 1, Bottleneck, [1024, False]]
|
||||||
[-1, 1, Conv, [512, 1, 1]],
|
- [-1, 1, Conv, [512, 1, 1]]
|
||||||
[-1, 1, Conv, [1024, 3, 1]],
|
- [-1, 1, Conv, [1024, 3, 1]]
|
||||||
[-1, 1, Conv, [512, 1, 1]],
|
- [-1, 1, Conv, [512, 1, 1]]
|
||||||
[-1, 1, Conv, [1024, 3, 1]], # 15 (P5/32-large)
|
- [-1, 1, Conv, [1024, 3, 1]] # 15 (P5/32-large)
|
||||||
|
|
||||||
[-2, 1, Conv, [256, 1, 1]],
|
- [-2, 1, Conv, [256, 1, 1]]
|
||||||
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
|
- [-1, 1, nn.Upsample, [None, 2, 'nearest']]
|
||||||
[[-1, 8], 1, Concat, [1]], # cat backbone P4
|
- [[-1, 8], 1, Concat, [1]] # cat backbone P4
|
||||||
[-1, 1, Bottleneck, [512, False]],
|
- [-1, 1, Bottleneck, [512, False]]
|
||||||
[-1, 1, Bottleneck, [512, False]],
|
- [-1, 1, Bottleneck, [512, False]]
|
||||||
[-1, 1, Conv, [256, 1, 1]],
|
- [-1, 1, Conv, [256, 1, 1]]
|
||||||
[-1, 1, Conv, [512, 3, 1]], # 22 (P4/16-medium)
|
- [-1, 1, Conv, [512, 3, 1]] # 22 (P4/16-medium)
|
||||||
|
|
||||||
[-2, 1, Conv, [128, 1, 1]],
|
- [-2, 1, Conv, [128, 1, 1]]
|
||||||
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
|
- [-1, 1, nn.Upsample, [None, 2, 'nearest']]
|
||||||
[[-1, 6], 1, Concat, [1]], # cat backbone P3
|
- [[-1, 6], 1, Concat, [1]] # cat backbone P3
|
||||||
[-1, 1, Bottleneck, [256, False]],
|
- [-1, 1, Bottleneck, [256, False]]
|
||||||
[-1, 2, Bottleneck, [256, False]], # 27 (P3/8-small)
|
- [-1, 2, Bottleneck, [256, False]] # 27 (P3/8-small)
|
||||||
|
|
||||||
[[27, 22, 15], 1, Detect, [nc]], # Detect(P3, P4, P5)
|
- [[27, 22, 15], 1, Detect, [nc]] # Detect(P3, P4, P5)
|
||||||
]
|
|
||||||
|
@ -14,48 +14,46 @@ scales: # model compound scaling constants, i.e. 'model=yolov5n-p6.yaml' will ca
|
|||||||
# YOLOv5 v6.0 backbone
|
# YOLOv5 v6.0 backbone
|
||||||
backbone:
|
backbone:
|
||||||
# [from, number, module, args]
|
# [from, number, module, args]
|
||||||
[[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2
|
- [-1, 1, Conv, [64, 6, 2, 2]] # 0-P1/2
|
||||||
[-1, 1, Conv, [128, 3, 2]], # 1-P2/4
|
- [-1, 1, Conv, [128, 3, 2]] # 1-P2/4
|
||||||
[-1, 3, C3, [128]],
|
- [-1, 3, C3, [128]]
|
||||||
[-1, 1, Conv, [256, 3, 2]], # 3-P3/8
|
- [-1, 1, Conv, [256, 3, 2]] # 3-P3/8
|
||||||
[-1, 6, C3, [256]],
|
- [-1, 6, C3, [256]]
|
||||||
[-1, 1, Conv, [512, 3, 2]], # 5-P4/16
|
- [-1, 1, Conv, [512, 3, 2]] # 5-P4/16
|
||||||
[-1, 9, C3, [512]],
|
- [-1, 9, C3, [512]]
|
||||||
[-1, 1, Conv, [768, 3, 2]], # 7-P5/32
|
- [-1, 1, Conv, [768, 3, 2]] # 7-P5/32
|
||||||
[-1, 3, C3, [768]],
|
- [-1, 3, C3, [768]]
|
||||||
[-1, 1, Conv, [1024, 3, 2]], # 9-P6/64
|
- [-1, 1, Conv, [1024, 3, 2]] # 9-P6/64
|
||||||
[-1, 3, C3, [1024]],
|
- [-1, 3, C3, [1024]]
|
||||||
[-1, 1, SPPF, [1024, 5]], # 11
|
- [-1, 1, SPPF, [1024, 5]] # 11
|
||||||
]
|
|
||||||
|
|
||||||
# YOLOv5 v6.0 head
|
# YOLOv5 v6.0 head
|
||||||
head:
|
head:
|
||||||
[[-1, 1, Conv, [768, 1, 1]],
|
- [-1, 1, Conv, [768, 1, 1]]
|
||||||
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
|
- [-1, 1, nn.Upsample, [None, 2, 'nearest']]
|
||||||
[[-1, 8], 1, Concat, [1]], # cat backbone P5
|
- [[-1, 8], 1, Concat, [1]] # cat backbone P5
|
||||||
[-1, 3, C3, [768, False]], # 15
|
- [-1, 3, C3, [768, False]] # 15
|
||||||
|
|
||||||
[-1, 1, Conv, [512, 1, 1]],
|
- [-1, 1, Conv, [512, 1, 1]]
|
||||||
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
|
- [-1, 1, nn.Upsample, [None, 2, 'nearest']]
|
||||||
[[-1, 6], 1, Concat, [1]], # cat backbone P4
|
- [[-1, 6], 1, Concat, [1]] # cat backbone P4
|
||||||
[-1, 3, C3, [512, False]], # 19
|
- [-1, 3, C3, [512, False]] # 19
|
||||||
|
|
||||||
[-1, 1, Conv, [256, 1, 1]],
|
- [-1, 1, Conv, [256, 1, 1]]
|
||||||
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
|
- [-1, 1, nn.Upsample, [None, 2, 'nearest']]
|
||||||
[[-1, 4], 1, Concat, [1]], # cat backbone P3
|
- [[-1, 4], 1, Concat, [1]] # cat backbone P3
|
||||||
[-1, 3, C3, [256, False]], # 23 (P3/8-small)
|
- [-1, 3, C3, [256, False]] # 23 (P3/8-small)
|
||||||
|
|
||||||
[-1, 1, Conv, [256, 3, 2]],
|
- [-1, 1, Conv, [256, 3, 2]]
|
||||||
[[-1, 20], 1, Concat, [1]], # cat head P4
|
- [[-1, 20], 1, Concat, [1]] # cat head P4
|
||||||
[-1, 3, C3, [512, False]], # 26 (P4/16-medium)
|
- [-1, 3, C3, [512, False]] # 26 (P4/16-medium)
|
||||||
|
|
||||||
[-1, 1, Conv, [512, 3, 2]],
|
- [-1, 1, Conv, [512, 3, 2]]
|
||||||
[[-1, 16], 1, Concat, [1]], # cat head P5
|
- [[-1, 16], 1, Concat, [1]] # cat head P5
|
||||||
[-1, 3, C3, [768, False]], # 29 (P5/32-large)
|
- [-1, 3, C3, [768, False]] # 29 (P5/32-large)
|
||||||
|
|
||||||
[-1, 1, Conv, [768, 3, 2]],
|
- [-1, 1, Conv, [768, 3, 2]]
|
||||||
[[-1, 12], 1, Concat, [1]], # cat head P6
|
- [[-1, 12], 1, Concat, [1]] # cat head P6
|
||||||
[-1, 3, C3, [1024, False]], # 32 (P6/64-xlarge)
|
- [-1, 3, C3, [1024, False]] # 32 (P6/64-xlarge)
|
||||||
|
|
||||||
[[23, 26, 29, 32], 1, Detect, [nc]], # Detect(P3, P4, P5, P6)
|
- [[23, 26, 29, 32], 1, Detect, [nc]] # Detect(P3, P4, P5, P6)
|
||||||
]
|
|
||||||
|
@ -14,37 +14,36 @@ scales: # model compound scaling constants, i.e. 'model=yolov5n.yaml' will call
|
|||||||
# YOLOv5 v6.0 backbone
|
# YOLOv5 v6.0 backbone
|
||||||
backbone:
|
backbone:
|
||||||
# [from, number, module, args]
|
# [from, number, module, args]
|
||||||
[[-1, 1, Conv, [64, 6, 2, 2]], # 0-P1/2
|
- [-1, 1, Conv, [64, 6, 2, 2]] # 0-P1/2
|
||||||
[-1, 1, Conv, [128, 3, 2]], # 1-P2/4
|
- [-1, 1, Conv, [128, 3, 2]] # 1-P2/4
|
||||||
[-1, 3, C3, [128]],
|
- [-1, 3, C3, [128]]
|
||||||
[-1, 1, Conv, [256, 3, 2]], # 3-P3/8
|
- [-1, 1, Conv, [256, 3, 2]] # 3-P3/8
|
||||||
[-1, 6, C3, [256]],
|
- [-1, 6, C3, [256]]
|
||||||
[-1, 1, Conv, [512, 3, 2]], # 5-P4/16
|
- [-1, 1, Conv, [512, 3, 2]] # 5-P4/16
|
||||||
[-1, 9, C3, [512]],
|
- [-1, 9, C3, [512]]
|
||||||
[-1, 1, Conv, [1024, 3, 2]], # 7-P5/32
|
- [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
|
||||||
[-1, 3, C3, [1024]],
|
- [-1, 3, C3, [1024]]
|
||||||
[-1, 1, SPPF, [1024, 5]], # 9
|
- [-1, 1, SPPF, [1024, 5]] # 9
|
||||||
]
|
|
||||||
|
|
||||||
# YOLOv5 v6.0 head
|
# YOLOv5 v6.0 head
|
||||||
head:
|
head:
|
||||||
[[-1, 1, Conv, [512, 1, 1]],
|
- [-1, 1, Conv, [512, 1, 1]]
|
||||||
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
|
- [-1, 1, nn.Upsample, [None, 2, 'nearest']]
|
||||||
[[-1, 6], 1, Concat, [1]], # cat backbone P4
|
- [[-1, 6], 1, Concat, [1]] # cat backbone P4
|
||||||
[-1, 3, C3, [512, False]], # 13
|
- [-1, 3, C3, [512, False]] # 13
|
||||||
|
|
||||||
[-1, 1, Conv, [256, 1, 1]],
|
- [-1, 1, Conv, [256, 1, 1]]
|
||||||
[-1, 1, nn.Upsample, [None, 2, 'nearest']],
|
- [-1, 1, nn.Upsample, [None, 2, 'nearest']]
|
||||||
[[-1, 4], 1, Concat, [1]], # cat backbone P3
|
- [[-1, 4], 1, Concat, [1]] # cat backbone P3
|
||||||
[-1, 3, C3, [256, False]], # 17 (P3/8-small)
|
- [-1, 3, C3, [256, False]] # 17 (P3/8-small)
|
||||||
|
|
||||||
[-1, 1, Conv, [256, 3, 2]],
|
- [-1, 1, Conv, [256, 3, 2]]
|
||||||
[[-1, 14], 1, Concat, [1]], # cat head P4
|
- [[-1, 14], 1, Concat, [1]] # cat head P4
|
||||||
[-1, 3, C3, [512, False]], # 20 (P4/16-medium)
|
- [-1, 3, C3, [512, False]] # 20 (P4/16-medium)
|
||||||
|
|
||||||
[-1, 1, Conv, [512, 3, 2]],
|
- [-1, 1, Conv, [512, 3, 2]]
|
||||||
[[-1, 10], 1, Concat, [1]], # cat head P5
|
- [[-1, 10], 1, Concat, [1]] # cat head P5
|
||||||
[-1, 3, C3, [1024, False]], # 23 (P5/32-large)
|
- [-1, 3, C3, [1024, False]] # 23 (P5/32-large)
|
||||||
|
|
||||||
[[17, 20, 23], 1, Detect, [nc]], # Detect(P3, P4, P5)
|
- [[17, 20, 23], 1, Detect, [nc]] # Detect(P3, P4, P5)
|
||||||
]
|
|
||||||
|
@ -11,7 +11,7 @@ from ultralytics.utils.tal import TORCH_1_10, dist2bbox, dist2rbox, make_anchors
|
|||||||
from .block import DFL, Proto
|
from .block import DFL, Proto
|
||||||
from .conv import Conv
|
from .conv import Conv
|
||||||
from .transformer import MLP, DeformableTransformerDecoder, DeformableTransformerDecoderLayer
|
from .transformer import MLP, DeformableTransformerDecoder, DeformableTransformerDecoderLayer
|
||||||
from .utils import bias_init_with_prob, linear_init_
|
from .utils import bias_init_with_prob, linear_init
|
||||||
|
|
||||||
__all__ = "Detect", "Segment", "Pose", "Classify", "OBB", "RTDETRDecoder"
|
__all__ = "Detect", "Segment", "Pose", "Classify", "OBB", "RTDETRDecoder"
|
||||||
|
|
||||||
@ -417,18 +417,18 @@ class RTDETRDecoder(nn.Module):
|
|||||||
"""Initializes or resets the parameters of the model's various components with predefined weights and biases."""
|
"""Initializes or resets the parameters of the model's various components with predefined weights and biases."""
|
||||||
# Class and bbox head init
|
# Class and bbox head init
|
||||||
bias_cls = bias_init_with_prob(0.01) / 80 * self.nc
|
bias_cls = bias_init_with_prob(0.01) / 80 * self.nc
|
||||||
# NOTE: the weight initialization in `linear_init_` would cause NaN when training with custom datasets.
|
# NOTE: the weight initialization in `linear_init` would cause NaN when training with custom datasets.
|
||||||
# linear_init_(self.enc_score_head)
|
# linear_init(self.enc_score_head)
|
||||||
constant_(self.enc_score_head.bias, bias_cls)
|
constant_(self.enc_score_head.bias, bias_cls)
|
||||||
constant_(self.enc_bbox_head.layers[-1].weight, 0.0)
|
constant_(self.enc_bbox_head.layers[-1].weight, 0.0)
|
||||||
constant_(self.enc_bbox_head.layers[-1].bias, 0.0)
|
constant_(self.enc_bbox_head.layers[-1].bias, 0.0)
|
||||||
for cls_, reg_ in zip(self.dec_score_head, self.dec_bbox_head):
|
for cls_, reg_ in zip(self.dec_score_head, self.dec_bbox_head):
|
||||||
# linear_init_(cls_)
|
# linear_init(cls_)
|
||||||
constant_(cls_.bias, bias_cls)
|
constant_(cls_.bias, bias_cls)
|
||||||
constant_(reg_.layers[-1].weight, 0.0)
|
constant_(reg_.layers[-1].weight, 0.0)
|
||||||
constant_(reg_.layers[-1].bias, 0.0)
|
constant_(reg_.layers[-1].bias, 0.0)
|
||||||
|
|
||||||
linear_init_(self.enc_output[0])
|
linear_init(self.enc_output[0])
|
||||||
xavier_uniform_(self.enc_output[0].weight)
|
xavier_uniform_(self.enc_output[0].weight)
|
||||||
if self.learnt_init_query:
|
if self.learnt_init_query:
|
||||||
xavier_uniform_(self.tgt_embed.weight)
|
xavier_uniform_(self.tgt_embed.weight)
|
||||||
|
@ -23,7 +23,7 @@ def bias_init_with_prob(prior_prob=0.01):
|
|||||||
return float(-np.log((1 - prior_prob) / prior_prob)) # return bias_init
|
return float(-np.log((1 - prior_prob) / prior_prob)) # return bias_init
|
||||||
|
|
||||||
|
|
||||||
def linear_init_(module):
|
def linear_init(module):
|
||||||
"""Initialize the weights and biases of a linear module."""
|
"""Initialize the weights and biases of a linear module."""
|
||||||
bound = 1 / math.sqrt(module.weight.shape[0])
|
bound = 1 / math.sqrt(module.weight.shape[0])
|
||||||
uniform_(module.weight, -bound, bound)
|
uniform_(module.weight, -bound, bound)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user