├── docs ├── en │ ├── CNAME │ ├── reference │ │ ├── data │ │ │ ├── base.md │ │ │ ├── annotator.md │ │ │ ├── explorer │ │ │ │ ├── explorer.md │ │ │ │ └── utils.md │ │ │ ├── dataset.md │ │ │ ├── build.md │ │ │ ├── converter.md │ │ │ ├── loaders.md │ │ │ └── split_dota.md │ │ ├── hub │ │ │ ├── auth.md │ │ │ ├── session.md │ │ │ ├── utils.md │ │ │ └── __init__.md │ │ ├── engine │ │ │ ├── trainer.md │ │ │ ├── predictor.md │ │ │ ├── model.md │ │ │ ├── validator.md │ │ │ ├── tuner.md │ │ │ ├── exporter.md │ │ │ └── results.md │ │ ├── utils │ │ │ ├── tuner.md │ │ │ ├── triton.md │ │ │ ├── errors.md │ │ │ ├── callbacks │ │ │ │ ├── raytune.md │ │ │ │ ├── mlflow.md │ │ │ │ ├── wb.md │ │ │ │ ├── tensorboard.md │ │ │ │ ├── clearml.md │ │ │ │ ├── hub.md │ │ │ │ ├── neptune.md │ │ │ │ └── dvc.md │ │ │ ├── benchmarks.md │ │ │ ├── instance.md │ │ │ ├── autobatch.md │ │ │ ├── patches.md │ │ │ ├── dist.md │ │ │ ├── tal.md │ │ │ ├── files.md │ │ │ ├── loss.md │ │ │ ├── downloads.md │ │ │ └── plotting.md │ │ ├── models │ │ │ ├── nas │ │ │ │ ├── model.md │ │ │ │ ├── val.md │ │ │ │ └── predict.md │ │ │ ├── sam │ │ │ │ ├── model.md │ │ │ │ ├── modules │ │ │ │ │ ├── sam.md │ │ │ │ │ ├── decoders.md │ │ │ │ │ ├── transformer.md │ │ │ │ │ └── encoders.md │ │ │ │ ├── predict.md │ │ │ │ ├── build.md │ │ │ │ └── amg.md │ │ │ ├── fastsam │ │ │ │ ├── val.md │ │ │ │ ├── model.md │ │ │ │ ├── prompt.md │ │ │ │ ├── predict.md │ │ │ │ └── utils.md │ │ │ ├── yolo │ │ │ │ ├── pose │ │ │ │ │ ├── val.md │ │ │ │ │ ├── predict.md │ │ │ │ │ └── train.md │ │ │ │ ├── detect │ │ │ │ │ ├── val.md │ │ │ │ │ ├── predict.md │ │ │ │ │ └── train.md │ │ │ │ ├── segment │ │ │ │ │ ├── predict.md │ │ │ │ │ ├── val.md │ │ │ │ │ └── train.md │ │ │ │ ├── model.md │ │ │ │ ├── classify │ │ │ │ │ ├── predict.md │ │ │ │ │ ├── train.md │ │ │ │ │ └── val.md │ │ │ │ └── obb │ │ │ │ │ ├── val.md │ │ │ │ │ ├── predict.md │ │ │ │ │ └── train.md │ │ │ ├── rtdetr │ │ │ │ ├── model.md │ │ │ │ ├── predict.md │ │ │ │ ├── train.md │ │ │ │ └── val.md │ │ │ └── utils │ │ │ │ ├── ops.md │ │ │ │ └── loss.md │ │ ├── trackers │ │ │ ├── utils │ │ │ │ ├── gmc.md │ │ │ │ ├── kalman_filter.md │ │ │ │ └── matching.md │ │ │ ├── basetrack.md │ │ │ ├── bot_sort.md │ │ │ ├── byte_tracker.md │ │ │ └── track.md │ │ ├── solutions │ │ │ ├── ai_gym.md │ │ │ ├── heatmap.md │ │ │ ├── speed_estimation.md │ │ │ ├── distance_calculation.md │ │ │ └── object_counter.md │ │ ├── nn │ │ │ ├── autobackend.md │ │ │ └── modules │ │ │ │ ├── utils.md │ │ │ │ ├── head.md │ │ │ │ ├── transformer.md │ │ │ │ └── conv.md │ │ └── cfg │ │ │ └── __init__.md │ └── robots.txt └── overrides │ ├── assets │ └── favicon.ico │ ├── main.html │ ├── partials │ └── source-file.html │ └── stylesheets │ └── style.css ├── ultralytics ├── engine │ └── __init__.py ├── solutions │ └── __init__.py ├── models │ ├── utils │ │ └── __init__.py │ ├── sam │ │ ├── modules │ │ │ └── __init__.py │ │ └── __init__.py │ ├── nas │ │ └── __init__.py │ ├── yolov10 │ │ ├── __init__.py │ │ ├── train.py │ │ ├── val.py │ │ ├── model.py │ │ ├── predict.py │ │ └── card.py │ ├── rtdetr │ │ └── __init__.py │ ├── yolo │ │ ├── obb │ │ │ ├── __init__.py │ │ │ └── train.py │ │ ├── pose │ │ │ └── __init__.py │ │ ├── __init__.py │ │ ├── detect │ │ │ ├── __init__.py │ │ │ └── predict.py │ │ ├── segment │ │ │ └── __init__.py │ │ └── classify │ │ │ └── __init__.py │ ├── __init__.py │ └── fastsam │ │ ├── __init__.py │ │ └── model.py ├── trackers │ ├── utils │ │ └── __init__.py │ └── __init__.py ├── data │ ├── explorer │ │ ├── gui │ │ │ └── __init__.py │ │ └── __init__.py │ ├── __init__.py │ └── scripts │ │ ├── download_weights.sh │ │ └── get_coco128.sh ├── nn │ ├── Addmodules │ │ └── __init__.py │ └── __init__.py ├── print_model.py ├── utils │ ├── callbacks │ │ ├── __init__.py │ │ └── raytune.py │ └── errors.py ├── yolov10_train.py ├── cfg │ ├── trackers │ │ ├── bytetrack.yaml │ │ └── botsort.yaml │ └── models │ │ ├── v8 │ │ ├── yolov8-cls-resnet101.yaml │ │ ├── yolov8-cls-resnet50.yaml │ │ ├── yolov8-cls.yaml │ │ ├── yolov8-seg.yaml │ │ └── yolov8-pose.yaml │ │ ├── v10 │ │ ├── yolov10n-EMO-delete_PSA.yaml │ │ ├── yolov10n-sartnet-delete_PSA.yaml │ │ ├── yolov10n-EMO.yaml │ │ ├── yolov10n-sartnet.yaml │ │ ├── yolov10n-MobileNet.yaml │ │ ├── yolov10n-tov8.yaml │ │ ├── yolov10n-tov8-3.yaml │ │ ├── yolov10s.yaml │ │ ├── yolov10n-tov8-2.yaml │ │ ├── yolov10n.yaml │ │ ├── yolov10b.yaml │ │ ├── yolov10n+C2f-DualConv.yaml │ │ ├── yolov10x.yaml │ │ ├── yolov10n-tov8-2+DualConv.yaml │ │ ├── yolov10n-FasterBlock.yaml │ │ ├── yolov10l.yaml │ │ ├── yolov10n-FasterBlock-1.yaml │ │ ├── yolov10n-tov8+EMA.yaml │ │ ├── yolov10n-tov8-2+EMA+DualConv.yaml │ │ ├── yolov10n-tov8-2+EMA.yaml │ │ ├── yolov10n-tov8+EMA+DualConv.yaml │ │ ├── yolov10n-tov8+EMA-2.yaml │ │ ├── yolov10n+EMA.yaml │ │ ├── yolov10n-tov8-2+C2f-DualConv+EMA.yaml │ │ ├── yolov10m.yaml │ │ ├── yolov10n-tov8-2+EMA+FasterBlock.yaml │ │ └── yolov10n-tov8-2+EMA+FasterBlock-1.yaml │ │ ├── v9 │ │ └── yolov9c.yaml │ │ ├── v3 │ │ ├── yolov3-tiny.yaml │ │ ├── yolov3.yaml │ │ └── yolov3-spp.yaml │ │ ├── rt-detr │ │ ├── rtdetr-resnet50.yaml │ │ └── rtdetr-resnet101.yaml │ │ └── v5 │ │ └── yolov5.yaml └── __init__.py ├── flops.py ├── requirements.txt ├── examples ├── YOLOv8-OpenCV-ONNX-Python │ └── README.md ├── YOLOv8-CPP-Inference │ └── CMakeLists.txt ├── YOLOv8-ONNXRuntime-Rust │ ├── src │ │ └── main.rs │ └── Cargo.toml ├── YOLOv8-LibTorch-CPP-Inference │ └── README.md └── YOLOv8-ONNXRuntime │ └── README.md └── docker └── Dockerfile-runner /docs/en/CNAME: -------------------------------------------------------------------------------- 1 | docs.ultralytics.com 2 | -------------------------------------------------------------------------------- /ultralytics/engine/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | -------------------------------------------------------------------------------- /ultralytics/solutions/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | -------------------------------------------------------------------------------- /ultralytics/models/utils/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | -------------------------------------------------------------------------------- /ultralytics/trackers/utils/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | -------------------------------------------------------------------------------- /ultralytics/data/explorer/gui/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | -------------------------------------------------------------------------------- /ultralytics/models/sam/modules/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | -------------------------------------------------------------------------------- /ultralytics/nn/Addmodules/__init__.py: -------------------------------------------------------------------------------- 1 | from .DualConv import * 2 | from .EMAttention import * 3 | from .starnet import * -------------------------------------------------------------------------------- /docs/overrides/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mrpachimari0704/MidState-Yolo/HEAD/docs/overrides/assets/favicon.ico -------------------------------------------------------------------------------- /ultralytics/data/explorer/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from .utils import plot_query_result 4 | 5 | __all__ = ["plot_query_result"] 6 | -------------------------------------------------------------------------------- /ultralytics/models/sam/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from .model import SAM 4 | from .predict import Predictor 5 | 6 | __all__ = "SAM", "Predictor" # tuple or list 7 | -------------------------------------------------------------------------------- /ultralytics/models/nas/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from .model import NAS 4 | from .predict import NASPredictor 5 | from .val import NASValidator 6 | 7 | __all__ = "NASPredictor", "NASValidator", "NAS" 8 | -------------------------------------------------------------------------------- /flops.py: -------------------------------------------------------------------------------- 1 | from ultralytics import YOLOv10 2 | 3 | model = YOLOv10('yolov10n.yaml') 4 | model.model.model[-1].export = True 5 | model.model.model[-1].format = 'onnx' 6 | del model.model.model[-1].cv2 7 | del model.model.model[-1].cv3 8 | model.fuse() -------------------------------------------------------------------------------- /ultralytics/models/yolov10/__init__.py: -------------------------------------------------------------------------------- 1 | from .model import YOLOv10 2 | from .predict import YOLOv10DetectionPredictor 3 | from .val import YOLOv10DetectionValidator 4 | 5 | __all__ = "YOLOv10DetectionPredictor", "YOLOv10DetectionValidator", "YOLOv10" 6 | -------------------------------------------------------------------------------- /ultralytics/models/rtdetr/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from .model import RTDETR 4 | from .predict import RTDETRPredictor 5 | from .val import RTDETRValidator 6 | 7 | __all__ = "RTDETRPredictor", "RTDETRValidator", "RTDETR" 8 | -------------------------------------------------------------------------------- /ultralytics/models/yolo/obb/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from .predict import OBBPredictor 4 | from .train import OBBTrainer 5 | from .val import OBBValidator 6 | 7 | __all__ = "OBBPredictor", "OBBTrainer", "OBBValidator" 8 | -------------------------------------------------------------------------------- /ultralytics/print_model.py: -------------------------------------------------------------------------------- 1 | from ultralytics import YOLOv10 2 | # 加载训练好的模型或者网络结构配置文件 3 | model = YOLOv10('F:\\xianyu\\2024.7.8\\yolov10\\runs\detect\\batch_size=32\\25\\YOLOv10n-tov8-2+EMA-25-2\\weights\\best.pt') 4 | # 打印模型参数信息 5 | print(model.info()) 6 | 7 | -------------------------------------------------------------------------------- /ultralytics/models/yolo/pose/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from .predict import PosePredictor 4 | from .train import PoseTrainer 5 | from .val import PoseValidator 6 | 7 | __all__ = "PoseTrainer", "PoseValidator", "PosePredictor" 8 | -------------------------------------------------------------------------------- /ultralytics/utils/callbacks/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from .base import add_integration_callbacks, default_callbacks, get_default_callbacks 4 | 5 | __all__ = "add_integration_callbacks", "default_callbacks", "get_default_callbacks" 6 | -------------------------------------------------------------------------------- /ultralytics/trackers/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from .bot_sort import BOTSORT 4 | from .byte_tracker import BYTETracker 5 | from .track import register_tracker 6 | 7 | __all__ = "register_tracker", "BOTSORT", "BYTETracker" # allow simpler import 8 | -------------------------------------------------------------------------------- /ultralytics/models/yolo/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from ultralytics.models.yolo import classify, detect, obb, pose, segment 4 | 5 | from .model import YOLO, YOLOWorld 6 | 7 | __all__ = "classify", "segment", "detect", "pose", "obb", "YOLO", "YOLOWorld" 8 | -------------------------------------------------------------------------------- /ultralytics/models/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from .rtdetr import RTDETR 4 | from .sam import SAM 5 | from .yolo import YOLO, YOLOWorld 6 | from .yolov10 import YOLOv10 7 | 8 | __all__ = "YOLO", "RTDETR", "SAM", "YOLOWorld", "YOLOv10" # allow simpler import 9 | -------------------------------------------------------------------------------- /ultralytics/models/yolo/detect/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from .predict import DetectionPredictor 4 | from .train import DetectionTrainer 5 | from .val import DetectionValidator 6 | 7 | __all__ = "DetectionPredictor", "DetectionTrainer", "DetectionValidator" 8 | -------------------------------------------------------------------------------- /ultralytics/models/yolo/segment/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from .predict import SegmentationPredictor 4 | from .train import SegmentationTrainer 5 | from .val import SegmentationValidator 6 | 7 | __all__ = "SegmentationPredictor", "SegmentationTrainer", "SegmentationValidator" 8 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | 2 | onnx==1.14.0 3 | onnxruntime==1.15.1 4 | pycocotools==2.0.7 5 | PyYAML==6.0.1 6 | scipy==1.13.0 7 | onnxsim==0.4.36 8 | onnxruntime-gpu==1.18.0 9 | gradio==4.31.5 10 | opencv-python==4.9.0.80 11 | psutil==5.9.8 12 | py-cpuinfo==9.0.0 13 | huggingface-hub==0.23.2 14 | safetensors==0.4.3 -------------------------------------------------------------------------------- /ultralytics/models/fastsam/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from .model import FastSAM 4 | from .predict import FastSAMPredictor 5 | from .prompt import FastSAMPrompt 6 | from .val import FastSAMValidator 7 | 8 | __all__ = "FastSAMPredictor", "FastSAM", "FastSAMPrompt", "FastSAMValidator" 9 | -------------------------------------------------------------------------------- /ultralytics/models/yolo/classify/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from ultralytics.models.yolo.classify.predict import ClassificationPredictor 4 | from ultralytics.models.yolo.classify.train import ClassificationTrainer 5 | from ultralytics.models.yolo.classify.val import ClassificationValidator 6 | 7 | __all__ = "ClassificationPredictor", "ClassificationTrainer", "ClassificationValidator" 8 | -------------------------------------------------------------------------------- /examples/YOLOv8-OpenCV-ONNX-Python/README.md: -------------------------------------------------------------------------------- 1 | # YOLOv8 - OpenCV 2 | 3 | Implementation YOLOv8 on OpenCV using ONNX Format. 4 | 5 | Just simply clone and run 6 | 7 | ```bash 8 | pip install -r requirements.txt 9 | python main.py --model yolov8n.onnx --img image.jpg 10 | ``` 11 | 12 | If you start from scratch: 13 | 14 | ```bash 15 | pip install ultralytics 16 | yolo export model=yolov8n.pt imgsz=640 format=onnx opset=12 17 | ``` 18 | 19 | _\*Make sure to include "opset=12"_ 20 | -------------------------------------------------------------------------------- /ultralytics/yolov10_train.py: -------------------------------------------------------------------------------- 1 | from ultralytics import YOLOv10 2 | # Load a model 3 | # model = YOLOv10.from_pretrained('jameslahm/yolov10n') 4 | model = YOLOv10('cfg/models/v10/yolov10n+C2f-DualConv.yaml') 5 | # train 6 | model.train(data='cfg/datasets/data.yaml', 7 | cache=False, 8 | imgsz=640, 9 | epochs=30, 10 | batch=16, 11 | device='0', 12 | optimizer='SGD', # using SGD 13 | ) -------------------------------------------------------------------------------- /docs/overrides/main.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% extends "base.html" %} 4 | 5 | {% block announce %} 6 |
7 | 9 | Introducing Ultralytics HUB Cloud Training! ☁️ Scalable. Simple. Smart.   ➜ 10 | 11 |
12 | {% endblock %} 13 | -------------------------------------------------------------------------------- /ultralytics/data/__init__.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from .base import BaseDataset 4 | from .build import build_dataloader, build_yolo_dataset, load_inference_source 5 | from .dataset import ClassificationDataset, SemanticDataset, YOLODataset 6 | 7 | __all__ = ( 8 | "BaseDataset", 9 | "ClassificationDataset", 10 | "SemanticDataset", 11 | "YOLODataset", 12 | "build_yolo_dataset", 13 | "build_dataloader", 14 | "load_inference_source", 15 | ) 16 | -------------------------------------------------------------------------------- /ultralytics/data/scripts/download_weights.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Ultralytics YOLO 🚀, AGPL-3.0 license 3 | # Download latest models from https://github.com/ultralytics/assets/releases 4 | # Example usage: bash ultralytics/data/scripts/download_weights.sh 5 | # parent 6 | # └── weights 7 | # ├── yolov8n.pt ← downloads here 8 | # ├── yolov8s.pt 9 | # └── ... 10 | 11 | python - < Result<(), Box> { 6 | let args = Args::parse(); 7 | 8 | // 1. load image 9 | let x = image::io::Reader::open(&args.source)? 10 | .with_guessed_format()? 11 | .decode()?; 12 | 13 | // 2. model support dynamic batch inference, so input should be a Vec 14 | let xs = vec![x]; 15 | 16 | // You can test `--batch 2` with this 17 | // let xs = vec![x.clone(), x]; 18 | 19 | // 3. build yolov8 model 20 | let mut model = YOLOv8::new(args)?; 21 | model.summary(); // model info 22 | 23 | // 4. run 24 | let ys = model.run(&xs)?; 25 | println!("{:?}", ys); 26 | 27 | Ok(()) 28 | } 29 | -------------------------------------------------------------------------------- /ultralytics/utils/callbacks/raytune.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from ultralytics.utils import SETTINGS 4 | 5 | try: 6 | assert SETTINGS["raytune"] is True # verify integration is enabled 7 | import ray 8 | from ray import tune 9 | from ray.air import session 10 | 11 | except (ImportError, AssertionError): 12 | tune = None 13 | 14 | 15 | def on_fit_epoch_end(trainer): 16 | """Sends training metrics to Ray Tune at end of each epoch.""" 17 | if ray.tune.is_session_enabled(): 18 | metrics = trainer.metrics 19 | metrics["epoch"] = trainer.epoch 20 | session.report(metrics) 21 | 22 | 23 | callbacks = ( 24 | { 25 | "on_fit_epoch_end": on_fit_epoch_end, 26 | } 27 | if tune 28 | else {} 29 | ) 30 | -------------------------------------------------------------------------------- /docs/en/reference/data/base.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore BaseDataset in Ultralytics docs. Learn how this implementation simplifies dataset creation and manipulation. 3 | keywords: Ultralytics, docs, BaseDataset, data manipulation, dataset creation 4 | --- 5 | 6 | # Reference for `ultralytics/data/base.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/base.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/base.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/base.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.data.base.BaseDataset 15 | 16 |

17 | -------------------------------------------------------------------------------- /examples/YOLOv8-LibTorch-CPP-Inference/README.md: -------------------------------------------------------------------------------- 1 | # YOLOv8 LibTorch Inference C++ 2 | 3 | This example demonstrates how to perform inference using YOLOv8 models in C++ with LibTorch API. 4 | 5 | ## Dependencies 6 | 7 | | Dependency | Version | 8 | | ------------ | -------- | 9 | | OpenCV | >=4.0.0 | 10 | | C++ Standard | >=17 | 11 | | Cmake | >=3.18 | 12 | | Libtorch | >=1.12.1 | 13 | 14 | ## Usage 15 | 16 | ```bash 17 | git clone ultralytics 18 | cd ultralytics 19 | pip install . 20 | cd examples/YOLOv8-LibTorch-CPP-Inference 21 | 22 | mkdir build 23 | cd build 24 | cmake .. 25 | make 26 | ./yolov8_libtorch_inference 27 | ``` 28 | 29 | ## Exporting YOLOv8 30 | 31 | To export YOLOv8 models: 32 | 33 | ```commandline 34 | yolo export model=yolov8s.pt imgsz=640 format=torchscript 35 | ``` 36 | -------------------------------------------------------------------------------- /docs/en/reference/hub/auth.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Dive into the Ultralytics Auth API documentation & learn how to manage authentication in your AI & ML projects easily and effectively. 3 | keywords: Ultralytics, Auth, API documentation, User Authentication, AI, Machine Learning 4 | --- 5 | 6 | # Reference for `ultralytics/hub/auth.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/auth.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/auth.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/hub/auth.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.hub.auth.Auth 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/engine/trainer.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Learn about the BaseTrainer class in the Ultralytics library. From training control, customization to advanced usage. 3 | keywords: Ultralytics, BaseTrainer, Machine Learning, Training Control, Python library 4 | --- 5 | 6 | # Reference for `ultralytics/engine/trainer.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/trainer.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/trainer.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/trainer.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.engine.trainer.BaseTrainer 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/utils/tuner.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Learn to utilize the run_ray_tune function with Ultralytics. Make your machine learning tuning process easier and more efficient. 3 | keywords: Ultralytics, run_ray_tune, machine learning tuning, machine learning efficiency 4 | --- 5 | 6 | # Reference for `ultralytics/utils/tuner.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/tuner.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/tuner.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/tuner.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.tuner.run_ray_tune 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/engine/predictor.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Learn about Ultralytics BasePredictor, an essential component of our engine that serves as the foundation for all prediction operations. 3 | keywords: Ultralytics, BasePredictor, YOLO, prediction, engine 4 | --- 5 | 6 | # Reference for `ultralytics/engine/predictor.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/predictor.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/predictor.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/predictor.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.engine.predictor.BasePredictor 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Sitemap: https://docs.ultralytics.com/sitemap.xml 3 | Sitemap: https://docs.ultralytics.com/ar/sitemap.xml 4 | Sitemap: https://docs.ultralytics.com/de/sitemap.xml 5 | Sitemap: https://docs.ultralytics.com/es/sitemap.xml 6 | Sitemap: https://docs.ultralytics.com/fr/sitemap.xml 7 | Sitemap: https://docs.ultralytics.com/hi/sitemap.xml 8 | Sitemap: https://docs.ultralytics.com/it/sitemap.xml 9 | Sitemap: https://docs.ultralytics.com/ja/sitemap.xml 10 | Sitemap: https://docs.ultralytics.com/ko/sitemap.xml 11 | Sitemap: https://docs.ultralytics.com/nl/sitemap.xml 12 | Sitemap: https://docs.ultralytics.com/pt/sitemap.xml 13 | Sitemap: https://docs.ultralytics.com/ru/sitemap.xml 14 | Sitemap: https://docs.ultralytics.com/tr/sitemap.xml 15 | Sitemap: https://docs.ultralytics.com/vi/sitemap.xml 16 | Sitemap: https://docs.ultralytics.com/zh/sitemap.xml 17 | -------------------------------------------------------------------------------- /docs/en/reference/engine/model.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore the detailed guide on using the Ultralytics YOLO Engine Model. Learn better ways to implement, train and evaluate YOLO models. 3 | keywords: Ultralytics, YOLO, engine model, documentation, guide, implementation, training, evaluation 4 | --- 5 | 6 | # Reference for `ultralytics/engine/model.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/model.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/model.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/model.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.engine.model.Model 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/engine/validator.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Learn about the Ultralytics BaseValidator module. Understand its principles, uses, and how it interacts with other components. 3 | keywords: Ultralytics, BaseValidator, Ultralytics engine, module, components 4 | --- 5 | 6 | # Reference for `ultralytics/engine/validator.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/validator.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/validator.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/validator.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.engine.validator.BaseValidator 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/nas/model.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Learn how our NAS model operates in Ultralytics. Comprehensive guide with detailed examples. Master the nuances of Ultralytics NAS model. 3 | keywords: Ultralytics, NAS model, NAS guide, machine learning, model documentation 4 | --- 5 | 6 | # Reference for `ultralytics/models/nas/model.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/nas/model.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/nas/model.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/nas/model.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.nas.model.NAS 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/hub/session.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore details about the HUBTrainingSession in Ultralytics framework. Learn to utilize this functionality for effective model training. 3 | keywords: Ultralytics, HUBTrainingSession, Documentation, Model Training, AI, Machine Learning, YOLO 4 | --- 5 | 6 | # Reference for `ultralytics/hub/session.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/session.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/session.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/hub/session.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.hub.session.HUBTrainingSession 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/utils/triton.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Deploy ML models effortlessly with Ultralytics TritonRemoteModel. Simplify serving with our comprehensive utils guide. 3 | keywords: Ultralytics, YOLO, TritonRemoteModel, machine learning, model serving, deployment, utils, documentation 4 | --- 5 | 6 | # Reference for `ultralytics/utils/triton.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/triton.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/triton.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/triton.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.triton.TritonRemoteModel 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/sam/model.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Dive into the SAM model details in the Ultralytics YOLO documentation. Understand, implement, and optimize your model use. 3 | keywords: Ultralytics, YOLO, SAM Model, Documentations, Machine Learning, AI, Convolutional neural network 4 | --- 5 | 6 | # Reference for `ultralytics/models/sam/model.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/model.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/model.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/model.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.sam.model.SAM 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/utils/errors.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Learn about the HUBModelError in Ultralytics. Enhance your understanding, troubleshoot errors and optimize your machine learning projects. 3 | keywords: Ultralytics, HUBModelError, Machine Learning, Error troubleshooting, Ultralytics documentation 4 | --- 5 | 6 | # Reference for `ultralytics/utils/errors.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/errors.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/errors.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/errors.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.errors.HUBModelError 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/data/annotator.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Enhance your machine learning model with Ultralytics’ auto_annotate function. Simplify data annotation for improved model training. 3 | keywords: Ultralytics, Auto-Annotate, Machine Learning, AI, Annotation, Data Processing, Model Training 4 | --- 5 | 6 | # Reference for `ultralytics/data/annotator.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/annotator.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/annotator.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/annotator.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.data.annotator.auto_annotate 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/fastsam/val.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Learn about FastSAMValidator in Ultralytics models. Comprehensive guide to enhancing AI capabilities with Ultralytics. 3 | keywords: Ultralytics, FastSAMValidator, model, synthetic, AI, machine learning, validation 4 | --- 5 | 6 | # Reference for `ultralytics/models/fastsam/val.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/val.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/val.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/fastsam/val.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.fastsam.val.FastSAMValidator 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/nas/val.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore the utilities and functions of the Ultralytics NASValidator. Find out how it benefits allocation and optimization in AI models. 3 | keywords: Ultralytics, NASValidator, models.nas.val.NASValidator, AI models, allocation, optimization 4 | --- 5 | 6 | # Reference for `ultralytics/models/nas/val.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/nas/val.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/nas/val.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/nas/val.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.nas.val.NASValidator 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/yolo/pose/val.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore the PoseValidator—review how Ultralytics YOLO validates poses for object detection. Improve your understanding of YOLO. 3 | keywords: PoseValidator, Ultralytics, YOLO, Object detection, Pose validation 4 | --- 5 | 6 | # Reference for `ultralytics/models/yolo/pose/val.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/pose/val.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/pose/val.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/pose/val.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.yolo.pose.val.PoseValidator 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/fastsam/model.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Learn all about Ultralytics FastSAM model. Dive into our comprehensive guide for seamless integration and efficient model training. 3 | keywords: Ultralytics, FastSAM model, Model documentation, Efficient model training 4 | --- 5 | 6 | # Reference for `ultralytics/models/fastsam/model.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/model.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/model.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/fastsam/model.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.fastsam.model.FastSAM 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/rtdetr/model.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore the specifics of using the RTDETR model in Ultralytics. Detailed documentation layered with explanations and examples. 3 | keywords: Ultralytics, RTDETR model, Ultralytics models, object detection, Ultralytics documentation 4 | --- 5 | 6 | # Reference for `ultralytics/models/rtdetr/model.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/rtdetr/model.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/rtdetr/model.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/rtdetr/model.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.rtdetr.model.RTDETR 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/trackers/utils/gmc.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore the Ultralytics GMC tool in our comprehensive documentation. Learn how it works, best practices, and implementation advice. 3 | keywords: Ultralytics, GMC utility, Ultralytics documentation, Ultralytics tracker, machine learning tools 4 | --- 5 | 6 | # Reference for `ultralytics/trackers/utils/gmc.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/utils/gmc.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/utils/gmc.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/utils/gmc.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.trackers.utils.gmc.GMC 15 | 16 |

17 | -------------------------------------------------------------------------------- /examples/YOLOv8-ONNXRuntime-Rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "yolov8-rs" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | clap = { version = "4.2.4", features = ["derive"] } 10 | image = { version = "0.24.7", default-features = false, features = ["jpeg", "png", "webp-encoder"] } 11 | imageproc = { version = "0.23.0", default-features = false } 12 | ndarray = { version = "0.15.6" } 13 | ort = {version = "1.16.3", default-features = false, features = ["load-dynamic", "copy-dylibs", "half"]} 14 | rusttype = { version = "0.9", default-features = false } 15 | anyhow = { version = "1.0.75"} 16 | regex = { version = "1.5.4" } 17 | rand = { version ="0.8.5" } 18 | chrono = { version = "0.4.30" } 19 | half = { version = "2.3.1" } 20 | dirs = { version = "5.0.1" } 21 | ureq = { version = "2.9.1" } 22 | -------------------------------------------------------------------------------- /docs/en/reference/models/nas/predict.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore Ultralytics NASPredictor. Understand high-level architecture of the model for effective implementation and efficient predictions. 3 | keywords: NASPredictor, Ultralytics, Ultralytics model, model architecture, efficient predictions 4 | --- 5 | 6 | # Reference for `ultralytics/models/nas/predict.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/nas/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/nas/predict.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/nas/predict.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.nas.predict.NASPredictor 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/rtdetr/predict.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Learn how to use the RTDETRPredictor model of the Ultralytics package. Detailed documentation, usage instructions, and advice. 3 | keywords: Ultralytics, RTDETRPredictor, model documentation, guide, real-time object detection 4 | --- 5 | 6 | # Reference for `ultralytics/models/rtdetr/predict.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/rtdetr/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/rtdetr/predict.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/rtdetr/predict.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.rtdetr.predict.RTDETRPredictor 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/sam/modules/sam.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore the Sam module of Ultralytics. Discover detailed methods, classes, and information for efficient deep-learning model training!. 3 | keywords: Ultralytics, Sam module, deep learning, model training, Ultralytics documentation 4 | --- 5 | 6 | # Reference for `ultralytics/models/sam/modules/sam.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/sam.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/sam.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/modules/sam.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.sam.modules.sam.Sam 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/sam/predict.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Master the ultralytics.models.sam.predict.Predictor class with our comprehensive guide. Discover techniques to enhance your model predictions. 3 | keywords: Ultralytics, predictor, models, sam.predict.Predictor, AI, machine learning, predictive models 4 | --- 5 | 6 | # Reference for `ultralytics/models/sam/predict.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/predict.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/predict.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.sam.predict.Predictor 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/yolo/pose/predict.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Discover how to use PosePredictor in the Ultralytics YOLO model. Includes detailed guides, code examples, and explanations. 3 | keywords: Ultralytics, YOLO, PosePredictor, machine learning, AI, predictive models 4 | --- 5 | 6 | # Reference for `ultralytics/models/yolo/pose/predict.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/pose/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/pose/predict.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/pose/predict.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.yolo.pose.predict.PosePredictor 15 | 16 |

17 | -------------------------------------------------------------------------------- /ultralytics/utils/errors.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from ultralytics.utils import emojis 4 | 5 | 6 | class HUBModelError(Exception): 7 | """ 8 | Custom exception class for handling errors related to model fetching in Ultralytics YOLO. 9 | 10 | This exception is raised when a requested model is not found or cannot be retrieved. 11 | The message is also processed to include emojis for better user experience. 12 | 13 | Attributes: 14 | message (str): The error message displayed when the exception is raised. 15 | 16 | Note: 17 | The message is automatically processed through the 'emojis' function from the 'ultralytics.utils' package. 18 | """ 19 | 20 | def __init__(self, message="Model not found. Please check model URL and try again."): 21 | """Create an exception for when a model is not found.""" 22 | super().__init__(emojis(message)) 23 | -------------------------------------------------------------------------------- /docs/en/reference/models/fastsam/prompt.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Learn to effectively utilize FastSAMPrompt model from Ultralytics. Detailed guide to help you get the most out of your machine learning models. 3 | keywords: Ultralytics, FastSAMPrompt, machine learning, model, guide, documentation 4 | --- 5 | 6 | # Reference for `ultralytics/models/fastsam/prompt.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/prompt.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/prompt.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/fastsam/prompt.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.fastsam.prompt.FastSAMPrompt 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/yolo/detect/val.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Discover function valuation of your YOLO models with the Ultralytics Detection Validator. Enhance precision and recall rates today. 3 | keywords: Ultralytics, YOLO, Detection Validator, model valuation, precision, recall 4 | --- 5 | 6 | # Reference for `ultralytics/models/yolo/detect/val.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/detect/val.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/detect/val.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/detect/val.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.yolo.detect.val.DetectionValidator 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/yolo/pose/train.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore Ultralytics PoseTrainer for YOLO models. Get a step-by-step guide on how to train on custom pose data for more accurate AI modeling. 3 | keywords: Ultralytics, YOLO, PoseTrainer, pose training, AI modeling, custom data training 4 | --- 5 | 6 | # Reference for `ultralytics/models/yolo/pose/train.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/pose/train.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/pose/train.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/pose/train.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.yolo.pose.train.PoseTrainer 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/yolo/segment/predict.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Discover how to utilize the YOLO Segmentation Predictor in Ultralytics. Enhance your objects detection skills with us. 3 | keywords: YOLO, Ultralytics, object detection, segmentation predictor 4 | --- 5 | 6 | # Reference for `ultralytics/models/yolo/segment/predict.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/segment/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/segment/predict.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/segment/predict.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.yolo.segment.predict.SegmentationPredictor 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/yolo/detect/predict.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore the guide to using the DetectionPredictor in Ultralytics YOLO. Learn how to predict, detect and analyze objects accurately. 3 | keywords: Ultralytics, YOLO, DetectionPredictor, detect, predict, object detection, analysis 4 | --- 5 | 6 | # Reference for `ultralytics/models/yolo/detect/predict.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/detect/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/detect/predict.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/detect/predict.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.yolo.detect.predict.DetectionPredictor 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/yolo/model.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Discover the Ultralytics YOLO model class. Learn advanced techniques, tips, and tricks for training. 3 | keywords: Ultralytics YOLO, YOLO, YOLO model, Model Training, Machine Learning, Deep Learning, Computer Vision 4 | --- 5 | 6 | # Reference for `ultralytics/models/yolo/model.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/model.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/model.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/model.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.yolo.model.YOLO 15 | 16 |

17 | 18 | ## ::: ultralytics.models.yolo.model.YOLOWorld 19 | 20 |

21 | -------------------------------------------------------------------------------- /docs/en/reference/models/yolo/detect/train.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Maximize your model's potential with Ultralytics YOLO Detection Trainer. Learn advanced techniques, tips, and tricks for training. 3 | keywords: Ultralytics YOLO, YOLO, Detection Trainer, Model Training, Machine Learning, Deep Learning, Computer Vision 4 | --- 5 | 6 | # Reference for `ultralytics/models/yolo/detect/train.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/detect/train.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/detect/train.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/detect/train.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.yolo.detect.train.DetectionTrainer 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/utils/callbacks/raytune.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Discover the functionality of the on_fit_epoch_end callback in the Ultralytics YOLO framework. Learn how to end an epoch in your deep learning projects. 3 | keywords: Ultralytics, YOLO, on_fit_epoch_end, callbacks, documentation, deep learning, YOLO framework 4 | --- 5 | 6 | # Reference for `ultralytics/utils/callbacks/raytune.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/raytune.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/raytune.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/raytune.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.callbacks.raytune.on_fit_epoch_end 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/rtdetr/train.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Get insights into RTDETRTrainer, a crucial component of Ultralytics for effective model training. Explore detailed documentation at Ultralytics. 3 | keywords: Ultralytics, RTDETRTrainer, model training, Ultralytics models, PyTorch models, neural networks, machine learning, deep learning 4 | --- 5 | 6 | # Reference for `ultralytics/models/rtdetr/train.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/rtdetr/train.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/rtdetr/train.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/rtdetr/train.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.rtdetr.train.RTDETRTrainer 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/yolo/segment/val.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Get practical insights about our SegmentationValidator in YOLO Ultralytics models. Discover functionality details, methods, inputs, and outputs. 3 | keywords: Ultralytics, YOLO, SegmentationValidator, model segmentation, image classification, object detection 4 | --- 5 | 6 | # Reference for `ultralytics/models/yolo/segment/val.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/segment/val.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/segment/val.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/segment/val.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.yolo.segment.val.SegmentationValidator 15 | 16 |

17 | -------------------------------------------------------------------------------- /ultralytics/cfg/trackers/botsort.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | # Default YOLO tracker settings for BoT-SORT tracker https://github.com/NirAharon/BoT-SORT 3 | 4 | tracker_type: botsort # tracker type, ['botsort', 'bytetrack'] 5 | track_high_thresh: 0.5 # threshold for the first association 6 | track_low_thresh: 0.1 # threshold for the second association 7 | new_track_thresh: 0.6 # threshold for init new track if the detection does not match any tracks 8 | track_buffer: 30 # buffer to calculate the time when to remove tracks 9 | match_thresh: 0.8 # threshold for matching tracks 10 | # min_box_area: 10 # threshold for min box areas(for tracker evaluation, not used for now) 11 | # mot20: False # for tracker evaluation(not used for now) 12 | 13 | # BoT-SORT settings 14 | gmc_method: sparseOptFlow # method of global motion compensation 15 | # ReID model related thresh (not supported yet) 16 | proximity_thresh: 0.5 17 | appearance_thresh: 0.25 18 | with_reid: False 19 | -------------------------------------------------------------------------------- /ultralytics/models/yolov10/train.py: -------------------------------------------------------------------------------- 1 | from ultralytics.models.yolo.detect import DetectionTrainer 2 | from .val import YOLOv10DetectionValidator 3 | from .model import YOLOv10DetectionModel 4 | from copy import copy 5 | from ultralytics.utils import RANK 6 | 7 | class YOLOv10DetectionTrainer(DetectionTrainer): 8 | def get_validator(self): 9 | """Returns a DetectionValidator for YOLO model validation.""" 10 | self.loss_names = "box_om", "cls_om", "dfl_om", "box_oo", "cls_oo", "dfl_oo", 11 | return YOLOv10DetectionValidator( 12 | self.test_loader, save_dir=self.save_dir, args=copy(self.args), _callbacks=self.callbacks 13 | ) 14 | 15 | def get_model(self, cfg=None, weights=None, verbose=True): 16 | """Return a YOLO detection model.""" 17 | model = YOLOv10DetectionModel(cfg, nc=self.data["nc"], verbose=verbose and RANK == -1) 18 | if weights: 19 | model.load(weights) 20 | return model 21 | -------------------------------------------------------------------------------- /docs/en/reference/models/yolo/classify/predict.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore the Ultralytics ClassificationPredictor guide for model prediction and visualization. Build powerful AI models with YOLO. 3 | keywords: Ultralytics, classification predictor, predict, YOLO, AI models, model visualization 4 | --- 5 | 6 | # Reference for `ultralytics/models/yolo/classify/predict.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/classify/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/classify/predict.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/classify/predict.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.yolo.classify.predict.ClassificationPredictor 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/yolo/segment/train.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Maximize your YOLO model's performance with our SegmentationTrainer. Explore comprehensive guides and tutorials on ultralytics.com. 3 | keywords: Ultralytics, YOLO, SegmentationTrainer, image segmentation, object detection, model training, YOLO model 4 | --- 5 | 6 | # Reference for `ultralytics/models/yolo/segment/train.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/segment/train.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/segment/train.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/segment/train.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.yolo.segment.train.SegmentationTrainer 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/utils/benchmarks.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Discover how to profile your models using Ultralytics utilities. Enhance performance, optimize your benchmarks, and learn best practices. 3 | keywords: Ultralytics, ProfileModels, benchmarks, model profiling, performance optimization 4 | --- 5 | 6 | # Reference for `ultralytics/utils/benchmarks.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/benchmarks.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/benchmarks.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/benchmarks.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.benchmarks.ProfileModels 15 | 16 |

17 | 18 | ## ::: ultralytics.utils.benchmarks.benchmark 19 | 20 |

21 | -------------------------------------------------------------------------------- /docs/en/reference/models/yolo/classify/train.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Delve into Classification Trainer at Ultralytics YOLO docs and optimize your model's training process with insights from the masters!. 3 | keywords: Ultralytics, YOLO, Classification Trainer, deep learning, training process, AI models, documentation 4 | --- 5 | 6 | # Reference for `ultralytics/models/yolo/classify/train.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/classify/train.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/classify/train.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/classify/train.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.yolo.classify.train.ClassificationTrainer 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/yolo/classify/val.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore YOLO ClassificationValidator, a key element of Ultralytics YOLO models. Learn how it validates and fine-tunes model outputs. 3 | keywords: Ultralytics, YOLO, ClassificationValidator, model validation, model fine-tuning, deep learning, computer vision 4 | --- 5 | 6 | # Reference for `ultralytics/models/yolo/classify/val.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/classify/val.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/classify/val.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/classify/val.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.yolo.classify.val.ClassificationValidator 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/fastsam/predict.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Get detailed insights about Ultralytics FastSAMPredictor. Learn to predict and optimize your AI models with our properly documented guidelines. 3 | keywords: Ultralytics, FastSAMPredictor, predictive modeling, AI optimization, machine learning, deep learning, Ultralytics documentation 4 | --- 5 | 6 | # Reference for `ultralytics/models/fastsam/predict.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/predict.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/fastsam/predict.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.fastsam.predict.FastSAMPredictor 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/utils/ops.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Discover details for "HungarianMatcher" & "inverse_sigmoid" functions in Ultralytics YOLO, advanced tools supporting detection models. 3 | keywords: Ultralytics, YOLO, HungarianMatcher, inverse_sigmoid, detection models, model utilities, ops 4 | --- 5 | 6 | # Reference for `ultralytics/models/utils/ops.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/utils/ops.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/utils/ops.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/utils/ops.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.utils.ops.HungarianMatcher 15 | 16 |

17 | 18 | ## ::: ultralytics.models.utils.ops.get_cdn_group 19 | 20 |

21 | -------------------------------------------------------------------------------- /docs/en/reference/trackers/basetrack.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Get familiar with TrackState in Ultralytics. Learn how it is used in the BaseTrack of the Ultralytics tracker for enhanced functionality. 3 | keywords: Ultralytics, TrackState, BaseTrack, Ultralytics tracker, Ultralytics documentation 4 | --- 5 | 6 | # Reference for `ultralytics/trackers/basetrack.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/basetrack.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/basetrack.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/basetrack.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.trackers.basetrack.TrackState 15 | 16 |

17 | 18 | ## ::: ultralytics.trackers.basetrack.BaseTrack 19 | 20 |

21 | -------------------------------------------------------------------------------- /docs/overrides/partials/source-file.html: -------------------------------------------------------------------------------- 1 | {% import "partials/language.html" as lang with context %} 2 | 3 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | {% if page.meta.git_revision_date_localized %} 12 | 📅 {{ lang.t("source.file.date.updated") }}: 13 | {{ page.meta.git_revision_date_localized }} 14 | {% if page.meta.git_creation_date_localized %} 15 |
16 | 🎂 {{ lang.t("source.file.date.created") }}: 17 | {{ page.meta.git_creation_date_localized }} 18 | {% endif %} 19 | 20 | 21 | {% elif page.meta.revision_date %} 22 | 📅 {{ lang.t("source.file.date.updated") }}: 23 | {{ page.meta.revision_date }} 24 | {% endif %} 25 |
26 |
27 | -------------------------------------------------------------------------------- /docs/en/reference/utils/instance.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Dive into Ultralytics detailed utility guide. Learn about Bboxes, _ntuple and more from Ultralytics utils.instance module. 3 | keywords: Ultralytics, Bboxes, _ntuple, utility, ultralytics utils.instance 4 | --- 5 | 6 | # Reference for `ultralytics/utils/instance.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/instance.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/instance.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/instance.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.instance.Bboxes 15 | 16 |

17 | 18 | ## ::: ultralytics.utils.instance.Instances 19 | 20 |

21 | 22 | ## ::: ultralytics.utils.instance._ntuple 23 | 24 |

25 | -------------------------------------------------------------------------------- /ultralytics/models/yolov10/val.py: -------------------------------------------------------------------------------- 1 | from ultralytics.models.yolo.detect import DetectionValidator 2 | from ultralytics.utils import ops 3 | import torch 4 | 5 | class YOLOv10DetectionValidator(DetectionValidator): 6 | def __init__(self, *args, **kwargs): 7 | super().__init__(*args, **kwargs) 8 | self.args.save_json |= self.is_coco 9 | 10 | def postprocess(self, preds): 11 | if isinstance(preds, dict): 12 | preds = preds["one2one"] 13 | 14 | if isinstance(preds, (list, tuple)): 15 | preds = preds[0] 16 | 17 | # Acknowledgement: Thanks to sanha9999 in #190 and #181! 18 | if preds.shape[-1] == 6: 19 | return preds 20 | else: 21 | preds = preds.transpose(-1, -2) 22 | boxes, scores, labels = ops.v10postprocess(preds, self.args.max_det, self.nc) 23 | bboxes = ops.xywh2xyxy(boxes) 24 | return torch.cat([bboxes, scores.unsqueeze(-1), labels.unsqueeze(-1)], dim=-1) -------------------------------------------------------------------------------- /docs/en/reference/engine/tuner.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore the Ultralytics Tuner, a powerful tool designed for hyperparameter tuning of YOLO models to optimize performance across various tasks like object detection, image classification, and more. 3 | keywords: Ultralytics, Tuner, YOLO, hyperparameter tuning, optimization, object detection, image classification, instance segmentation, pose estimation, multi-object tracking 4 | --- 5 | 6 | # Reference for `ultralytics/engine/tuner.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/tuner.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/tuner.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/tuner.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.engine.tuner.Tuner 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/models/rtdetr/val.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore RTDETRDataset in Ultralytics Models. Learn about the RTDETRValidator function, understand its usage in real-time object detection. 3 | keywords: Ultralytics, RTDETRDataset, RTDETRValidator, real-time object detection, models documentation 4 | --- 5 | 6 | # Reference for `ultralytics/models/rtdetr/val.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/rtdetr/val.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/rtdetr/val.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/rtdetr/val.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.rtdetr.val.RTDETRDataset 15 | 16 |

17 | 18 | ## ::: ultralytics.models.rtdetr.val.RTDETRValidator 19 | 20 |

21 | -------------------------------------------------------------------------------- /docs/en/reference/utils/autobatch.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore Ultralytics documentation for check_train_batch_size utility in the autobatch module. Understand how it could improve your machine learning process. 3 | keywords: Ultralytics, check_train_batch_size, autobatch, utility, machine learning, documentation 4 | --- 5 | 6 | # Reference for `ultralytics/utils/autobatch.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/autobatch.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/autobatch.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/autobatch.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.autobatch.check_train_batch_size 15 | 16 |

17 | 18 | ## ::: ultralytics.utils.autobatch.autobatch 19 | 20 |

21 | -------------------------------------------------------------------------------- /docs/en/reference/models/yolo/obb/val.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Learn about Ultralytics' advanced OBBValidator, an extension of YOLO object detection for oriented bounding box validation. 3 | keywords: Ultralytics, YOLO, OBBValidator, object detection, oriented bounding box, OBB, machine learning, AI, deep learning, Python, YOLO model, image processing, computer vision, YOLO object detection 4 | --- 5 | 6 | # Reference for `ultralytics/models/yolo/obb/val.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/obb/val.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/obb/val.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/obb/val.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.yolo.obb.val.OBBValidator 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/trackers/bot_sort.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Master the use of Ultralytics BOTrack, a key component of the powerful Ultralytics tracking system. Learn to integrate and use BOTSORT in your projects. 3 | keywords: Ultralytics, BOTSORT, BOTrack, tracking system, official documentation, machine learning, AI tracking 4 | --- 5 | 6 | # Reference for `ultralytics/trackers/bot_sort.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/bot_sort.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/bot_sort.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/bot_sort.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.trackers.bot_sort.BOTrack 15 | 16 |

17 | 18 | ## ::: ultralytics.trackers.bot_sort.BOTSORT 19 | 20 |

21 | -------------------------------------------------------------------------------- /docs/en/reference/models/utils/loss.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Learn to use the DETRLoss function provided by Ultralytics YOLO. Understand how to utilize loss in RTDETR detection models to improve accuracy. 3 | keywords: Ultralytics, YOLO, Documentation, DETRLoss, Detection Loss, Loss function, DETR, RTDETR Detection Models 4 | --- 5 | 6 | # Reference for `ultralytics/models/utils/loss.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/utils/loss.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/utils/loss.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/utils/loss.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.utils.loss.DETRLoss 15 | 16 |

17 | 18 | ## ::: ultralytics.models.utils.loss.RTDETRDetectionLoss 19 | 20 |

21 | -------------------------------------------------------------------------------- /docs/en/reference/solutions/ai_gym.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore Ultralytics YOLO's advanced AI Gym feature for real-time pose estimation and gym exercise tracking using cutting-edge machine learning technology. 3 | keywords: Ultralytics, YOLO, AI Gym, pose estimation, real-time tracking, machine learning, exercise counting, AI fitness, computer vision, gym workout analysis, YOLOv8, artificial intelligence, fitness technology 4 | --- 5 | 6 | # Reference for `ultralytics/solutions/ai_gym.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/ai_gym.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/ai_gym.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/ai_gym.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.solutions.ai_gym.AIGym 15 | 16 |

17 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v8/yolov8-cls-resnet101.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | # YOLOv8-cls image classification model. For Usage examples see https://docs.ultralytics.com/tasks/classify 3 | 4 | # Parameters 5 | nc: 1000 # number of classes 6 | scales: # model compound scaling constants, i.e. 'model=yolov8n-cls.yaml' will call yolov8-cls.yaml with scale 'n' 7 | # [depth, width, max_channels] 8 | n: [0.33, 0.25, 1024] 9 | s: [0.33, 0.50, 1024] 10 | m: [0.67, 0.75, 1024] 11 | l: [1.00, 1.00, 1024] 12 | x: [1.00, 1.25, 1024] 13 | 14 | # YOLOv8.0n backbone 15 | backbone: 16 | # [from, repeats, module, args] 17 | - [-1, 1, ResNetLayer, [3, 64, 1, True, 1]] # 0-P1/2 18 | - [-1, 1, ResNetLayer, [64, 64, 1, False, 3]] # 1-P2/4 19 | - [-1, 1, ResNetLayer, [256, 128, 2, False, 4]] # 2-P3/8 20 | - [-1, 1, ResNetLayer, [512, 256, 2, False, 23]] # 3-P4/16 21 | - [-1, 1, ResNetLayer, [1024, 512, 2, False, 3]] # 4-P5/32 22 | 23 | # YOLOv8.0n head 24 | head: 25 | - [-1, 1, Classify, [nc]] # Classify 26 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v8/yolov8-cls-resnet50.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | # YOLOv8-cls image classification model. For Usage examples see https://docs.ultralytics.com/tasks/classify 3 | 4 | # Parameters 5 | nc: 1000 # number of classes 6 | scales: # model compound scaling constants, i.e. 'model=yolov8n-cls.yaml' will call yolov8-cls.yaml with scale 'n' 7 | # [depth, width, max_channels] 8 | n: [0.33, 0.25, 1024] 9 | s: [0.33, 0.50, 1024] 10 | m: [0.67, 0.75, 1024] 11 | l: [1.00, 1.00, 1024] 12 | x: [1.00, 1.25, 1024] 13 | 14 | # YOLOv8.0n backbone 15 | backbone: 16 | # [from, repeats, module, args] 17 | - [-1, 1, ResNetLayer, [3, 64, 1, True, 1]] # 0-P1/2 18 | - [-1, 1, ResNetLayer, [64, 64, 1, False, 3]] # 1-P2/4 19 | - [-1, 1, ResNetLayer, [256, 128, 2, False, 4]] # 2-P3/8 20 | - [-1, 1, ResNetLayer, [512, 256, 2, False, 6]] # 3-P4/16 21 | - [-1, 1, ResNetLayer, [1024, 512, 2, False, 3]] # 4-P5/32 22 | 23 | # YOLOv8.0n head 24 | head: 25 | - [-1, 1, Classify, [nc]] # Classify 26 | -------------------------------------------------------------------------------- /docs/en/reference/solutions/heatmap.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore Ultralytics YOLO's advanced Heatmaps feature designed to highlight areas of interest, providing an immediate, impactful way to interpret spatial information. 3 | keywords: Ultralytics, YOLO, heatmaps, object tracking, data visualization, real-time tracking, machine learning, object counting, computer vision, retail analytics, YOLOv8, artificial intelligence 4 | --- 5 | 6 | # Reference for `ultralytics/solutions/heatmap.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/heatmap.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/heatmap.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/heatmap.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.solutions.heatmap.Heatmap 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/trackers/byte_tracker.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Step-in to explore in-depth the functionalities of Ultralytics BYTETracker under STrack. Gain advanced feature insights to streamline your operations. 3 | keywords: STrack, Ultralytics, BYTETracker, documentation, Ultralytics tracker, object tracking, YOLO 4 | --- 5 | 6 | # Reference for `ultralytics/trackers/byte_tracker.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/byte_tracker.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/byte_tracker.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/byte_tracker.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.trackers.byte_tracker.STrack 15 | 16 |

17 | 18 | ## ::: ultralytics.trackers.byte_tracker.BYTETracker 19 | 20 |

21 | -------------------------------------------------------------------------------- /docs/en/reference/nn/autobackend.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Get to know more about Ultralytics nn.autobackend.check_class_names functionality. Optimize your YOLO models seamlessly. 3 | keywords: Ultralytics, AutoBackend, check_class_names, YOLO, YOLO models, optimization 4 | --- 5 | 6 | # Reference for `ultralytics/nn/autobackend.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/autobackend.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/autobackend.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/autobackend.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.nn.autobackend.AutoBackend 15 | 16 |

17 | 18 | ## ::: ultralytics.nn.autobackend.check_class_names 19 | 20 |

21 | 22 | ## ::: ultralytics.nn.autobackend.default_class_names 23 | 24 |

25 | -------------------------------------------------------------------------------- /docs/en/reference/models/fastsam/utils.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Learn how to adjust bounding boxes to image borders in Ultralytics models using the bbox_iou utility. Enhance your object detection performance. 3 | keywords: Ultralytics, bounding boxes, Bboxes, image borders, object detection, bbox_iou, model utilities 4 | --- 5 | 6 | # Reference for `ultralytics/models/fastsam/utils.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/utils.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/fastsam/utils.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/fastsam/utils.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.fastsam.utils.adjust_bboxes_to_image_border 15 | 16 |

17 | 18 | ## ::: ultralytics.models.fastsam.utils.bbox_iou 19 | 20 |

21 | -------------------------------------------------------------------------------- /docs/en/reference/models/yolo/obb/predict.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Discover OBBPredictor for YOLO, specializing in Oriented Bounding Box predictions. Essential for advanced object detection with Ultralytics YOLO. 3 | keywords: Ultralytics, OBBPredictor, YOLO, Oriented Bounding Box, object detection, advanced object detection, YOLO model, deep learning, AI, machine learning, computer vision, OBB detection 4 | --- 5 | 6 | # Reference for `ultralytics/models/yolo/obb/predict.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/obb/predict.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/obb/predict.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/obb/predict.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.yolo.obb.predict.OBBPredictor 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/trackers/utils/kalman_filter.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore KalmanFilterXYAH, a key component of Ultralytics trackers. Understand its utilities and learn to leverage it in your own projects. 3 | keywords: Ultralytics, KalmanFilterXYAH, tracker, documentation, guide 4 | --- 5 | 6 | # Reference for `ultralytics/trackers/utils/kalman_filter.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/utils/kalman_filter.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/utils/kalman_filter.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/utils/kalman_filter.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.trackers.utils.kalman_filter.KalmanFilterXYAH 15 | 16 |

17 | 18 | ## ::: ultralytics.trackers.utils.kalman_filter.KalmanFilterXYWH 19 | 20 |

21 | -------------------------------------------------------------------------------- /docs/en/reference/models/sam/modules/decoders.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore MaskDecoder, a part of the Ultralytics models. Gain insights on how to utilize it effectively in the SAM modules decoders MLP. 3 | keywords: Ultralytics, MaskDecoder, SAM modules, decoders, MLP, YOLO, machine learning, image recognition 4 | --- 5 | 6 | # Reference for `ultralytics/models/sam/modules/decoders.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/decoders.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/decoders.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/modules/decoders.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.sam.modules.decoders.MaskDecoder 15 | 16 |

17 | 18 | ## ::: ultralytics.models.sam.modules.decoders.MLP 19 | 20 |

21 | -------------------------------------------------------------------------------- /docs/en/reference/utils/patches.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Learn about Ultralytics utils patches including imread, imshow and torch_save. Enhance your image processing skills. 3 | keywords: Ultralytics, Utils, Patches, imread, imshow, torch_save, image processing 4 | --- 5 | 6 | # Reference for `ultralytics/utils/patches.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/patches.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/patches.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/patches.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.patches.imread 15 | 16 |

17 | 18 | ## ::: ultralytics.utils.patches.imwrite 19 | 20 |

21 | 22 | ## ::: ultralytics.utils.patches.imshow 23 | 24 |

25 | 26 | ## ::: ultralytics.utils.patches.torch_save 27 | 28 |

29 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v8/yolov8-cls.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | # YOLOv8-cls image classification model. For Usage examples see https://docs.ultralytics.com/tasks/classify 3 | 4 | # Parameters 5 | nc: 1000 # number of classes 6 | scales: # model compound scaling constants, i.e. 'model=yolov8n-cls.yaml' will call yolov8-cls.yaml with scale 'n' 7 | # [depth, width, max_channels] 8 | n: [0.33, 0.25, 1024] 9 | s: [0.33, 0.50, 1024] 10 | m: [0.67, 0.75, 1024] 11 | l: [1.00, 1.00, 1024] 12 | x: [1.00, 1.25, 1024] 13 | 14 | # YOLOv8.0n backbone 15 | backbone: 16 | # [from, repeats, module, args] 17 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 18 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 19 | - [-1, 3, C2f, [128, True]] 20 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 21 | - [-1, 6, C2f, [256, True]] 22 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 23 | - [-1, 6, C2f, [512, True]] 24 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 25 | - [-1, 3, C2f, [1024, True]] 26 | 27 | # YOLOv8.0n head 28 | head: 29 | - [-1, 1, Classify, [nc]] # Classify 30 | -------------------------------------------------------------------------------- /docs/en/reference/trackers/track.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore Ultralytics documentation on prediction function starters & register trackers. Understand our code & its applications better. 3 | keywords: Ultralytics, YOLO, on predict start, register tracker, prediction functions, documentation 4 | --- 5 | 6 | # Reference for `ultralytics/trackers/track.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/track.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/track.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/track.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.trackers.track.on_predict_start 15 | 16 |

17 | 18 | ## ::: ultralytics.trackers.track.on_predict_postprocess_end 19 | 20 |

21 | 22 | ## ::: ultralytics.trackers.track.register_tracker 23 | 24 |

25 | -------------------------------------------------------------------------------- /docs/en/reference/models/yolo/obb/train.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Master the Ultralytics YOLO OBB Trainer: A specialized tool for training YOLO models using Oriented Bounding Boxes. Features detailed usage, model initialization, and training processes. 3 | keywords: Ultralytics, YOLO OBB Trainer, Oriented Bounding Box, OBB model training, YOLO model training, computer vision, deep learning, machine learning, YOLO object detection, model initialization, YOLO training process 4 | --- 5 | 6 | # Reference for `ultralytics/models/yolo/obb/train.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/obb/train.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/obb/train.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/yolo/obb/train.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.yolo.obb.train.OBBTrainer 15 | 16 |

17 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n-EMO-delete_PSA.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, EMO_1M, []] #4 11 | - [-1, 1, SPPF, [1024, 5]] # 5 12 | 13 | # YOLOv8.0n head 14 | head: 15 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 16 | - [[-1, 3], 1, Concat, [1]] # cat backbone P4 17 | - [-1, 3, C2f, [512]] # 8 18 | 19 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 20 | - [[-1, 2], 1, Concat, [1]] # cat backbone P3 21 | - [-1, 3, C2f, [256]] # 11 (P3/8-small) 22 | 23 | - [-1, 1, Conv, [256, 3, 2]] 24 | - [[-1, 8], 1, Concat, [1]] # cat head P4 25 | - [-1, 3, C2f, [512]] # 14 (P4/16-medium) 26 | 27 | - [-1, 1, SCDown, [512, 3, 2]] 28 | - [[-1, 5], 1, Concat, [1]] # cat head P5 29 | - [-1, 3, C2fCIB, [1024, True, True]] # 17 (P5/32-large) 30 | 31 | - [[11, 14, 17], 1, v10Detect, [nc]] # Detect(P3, P4, P5) 32 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n-sartnet-delete_PSA.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, starnet_s1, []] #4 11 | - [-1, 1, SPPF, [1024, 5]] # 5 12 | 13 | # YOLOv8.0n head 14 | head: 15 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 16 | - [[-1, 3], 1, Concat, [1]] # cat backbone P4 17 | - [-1, 3, C2f, [512]] # 8 18 | 19 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 20 | - [[-1, 2], 1, Concat, [1]] # cat backbone P3 21 | - [-1, 3, C2f, [256]] # 11 (P3/8-small) 22 | 23 | - [-1, 1, Conv, [256, 3, 2]] 24 | - [[-1, 8], 1, Concat, [1]] # cat head P4 25 | - [-1, 3, C2f, [512]] # 14 (P4/16-medium) 26 | 27 | - [-1, 1, SCDown, [512, 3, 2]] 28 | - [[-1, 5], 1, Concat, [1]] # cat head P5 29 | - [-1, 3, C2fCIB, [1024, True, True]] # 17 (P5/32-large) 30 | 31 | - [[11, 14, 17], 1, v10Detect, [nc]] # Detect(P3, P4, P5) -------------------------------------------------------------------------------- /docs/en/reference/solutions/speed_estimation.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Transform speed estimation with Ultralytics YOLO speed estimation featuring cutting-edge technology for precise real-time counting in video streams. 3 | keywords: Ultralytics YOLO, speed estimation software, real-time vehicle tracking solutions, video stream analysis, YOLOv8 object detection, smart counting technology, computer vision, AI-powered tracking, video analytics tools, automated monitoring. 4 | --- 5 | 6 | # Reference for `ultralytics/solutions/speed_estimation.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/speed_estimation.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/speed_estimation.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/speed_estimation.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.solutions.speed_estimation.SpeedEstimator 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/solutions/distance_calculation.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore Ultralytics YOLO's distance calculation feature designed for advance analytics, providing an immediate, impactful way to interpret computer vision data. 3 | keywords: Ultralytics, YOLO, distance calculation, object tracking, data visualization, real-time tracking, machine learning, object counting, computer vision, vehicle analytics, YOLOv8, artificial intelligence 4 | --- 5 | 6 | # Reference for `ultralytics/solutions/distance_calculation.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/distance_calculation.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/distance_calculation.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/distance_calculation.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.solutions.distance_calculation.DistanceCalculation 15 | 16 |

17 | -------------------------------------------------------------------------------- /docs/en/reference/solutions/object_counter.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Transform object tracking with Ultralytics YOLO Object Counter featuring cutting-edge technology for precise real-time counting in video streams. 3 | keywords: Ultralytics YOLO, object tracking software, real-time counting solutions, video stream analysis, YOLOv8 object detection, AI surveillance, smart counting technology, computer vision, AI-powered tracking, object counting accuracy, video analytics tools, automated monitoring. 4 | --- 5 | 6 | # Reference for `ultralytics/solutions/object_counter.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/object_counter.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/solutions/object_counter.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/solutions/object_counter.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.solutions.object_counter.ObjectCounter 15 | 16 |

17 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n-EMO.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, EMO_1M, []] #4 11 | - [-1, 1, SPPF, [1024, 5]] # 5 12 | - [-1, 1, PSA, [1024]] # 6 13 | 14 | # YOLOv8.0n head 15 | head: 16 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 17 | - [[-1, 3], 1, Concat, [1]] # cat backbone P4 18 | - [-1, 3, C2f, [512]] # 9 19 | 20 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 21 | - [[-1, 2], 1, Concat, [1]] # cat backbone P3 22 | - [-1, 3, C2f, [256]] # 12 (P3/8-small) 23 | 24 | - [-1, 1, Conv, [256, 3, 2]] 25 | - [[-1, 8], 1, Concat, [1]] # cat head P4 26 | - [-1, 3, C2f, [512]] # 15 (P4/16-medium) 27 | 28 | - [-1, 1, SCDown, [512, 3, 2]] 29 | - [[-1, 5], 1, Concat, [1]] # cat head P5 30 | - [-1, 3, C2fCIB, [1024, True, True]] # 18 (P5/32-large) 31 | 32 | - [[12, 15, 18], 1, v10Detect, [nc]] # Detect(P3, P4, P5) 33 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n-sartnet.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, starnet_s1, []] #4 11 | - [-1, 1, SPPF, [1024, 5]] # 5 12 | - [-1, 1, PSA, [1024]] # 6 13 | 14 | # YOLOv8.0n head 15 | head: 16 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 17 | - [[-1, 3], 1, Concat, [1]] # cat backbone P4 18 | - [-1, 3, C2f, [512]] # 9 19 | 20 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 21 | - [[-1, 2], 1, Concat, [1]] # cat backbone P3 22 | - [-1, 3, C2f, [256]] # 12 (P3/8-small) 23 | 24 | - [-1, 1, Conv, [256, 3, 2]] 25 | - [[-1, 8], 1, Concat, [1]] # cat head P4 26 | - [-1, 3, C2f, [512]] # 15 (P4/16-medium) 27 | 28 | - [-1, 1, SCDown, [512, 3, 2]] 29 | - [[-1, 5], 1, Concat, [1]] # cat head P5 30 | - [-1, 3, C2fCIB, [1024, True, True]] # 18 (P5/32-large) 31 | 32 | - [[12, 15, 18], 1, v10Detect, [nc]] # Detect(P3, P4, P5) -------------------------------------------------------------------------------- /docs/en/reference/hub/utils.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore Ultralytics docs for various Events, including "request_with_credentials" and "requests_with_progress". Also, understand the use of the "smart_request". 3 | keywords: Ultralytics, Events, request_with_credentials, smart_request, Ultralytics hub utils, requests_with_progress 4 | --- 5 | 6 | # Reference for `ultralytics/hub/utils.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/utils.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/utils.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/hub/utils.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.hub.utils.Events 15 | 16 |

17 | 18 | ## ::: ultralytics.hub.utils.request_with_credentials 19 | 20 |

21 | 22 | ## ::: ultralytics.hub.utils.requests_with_progress 23 | 24 |

25 | 26 | ## ::: ultralytics.hub.utils.smart_request 27 | 28 |

29 | -------------------------------------------------------------------------------- /docs/en/reference/models/sam/modules/transformer.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Learn about TwoWayTransformer and Attention modules in Ultralytics. Leverage these tools to enhance your AI models. 3 | keywords: Ultralytics, TwoWayTransformer, Attention, AI models, transformers 4 | --- 5 | 6 | # Reference for `ultralytics/models/sam/modules/transformer.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/transformer.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/transformer.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/modules/transformer.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.sam.modules.transformer.TwoWayTransformer 15 | 16 |

17 | 18 | ## ::: ultralytics.models.sam.modules.transformer.TwoWayAttentionBlock 19 | 20 |

21 | 22 | ## ::: ultralytics.models.sam.modules.transformer.Attention 23 | 24 |

25 | -------------------------------------------------------------------------------- /docs/en/reference/utils/dist.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Discover the role of dist.find_free_network_port & dist.generate_ddp_command in Ultralytics DDP utilities. Use our guide for efficient deployment. 3 | keywords: Ultralytics, DDP, DDP utility functions, Distributed Data Processing, find free network port, generate DDP command 4 | --- 5 | 6 | # Reference for `ultralytics/utils/dist.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/dist.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/dist.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/dist.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.dist.find_free_network_port 15 | 16 |

17 | 18 | ## ::: ultralytics.utils.dist.generate_ddp_file 19 | 20 |

21 | 22 | ## ::: ultralytics.utils.dist.generate_ddp_command 23 | 24 |

25 | 26 | ## ::: ultralytics.utils.dist.ddp_cleanup 27 | 28 |

29 | -------------------------------------------------------------------------------- /docs/en/reference/data/explorer/explorer.md: -------------------------------------------------------------------------------- 1 | --- 2 | comments: true 3 | description: Comprehensive reference for the Explorer API. Get a brief description of all the main classes utilised for creating and handling the data in the Ultralytics data explorer project. 4 | keywords: Ultralytics, explorer.py, data explorer, Semantic search, vector similarity search, class reference, documentation, ExplorerDataset, Explorer, data handling 5 | --- 6 | 7 | # Reference for `ultralytics/data/explorer/explorer.py` 8 | 9 | !!! Note 10 | 11 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/explorer/explorer.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/explorer/explorer.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/explorer/explorer.py) 🛠️. Thank you 🙏! 12 | 13 |

14 | 15 | ## ::: ultralytics.data.explorer.explorer.ExplorerDataset 16 | 17 |

18 | 19 | ## ::: ultralytics.data.explorer.explorer.Explorer 20 | 21 |

22 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n-MobileNet.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, MobileNetV4ConvSmall, []] #4 11 | - [-1, 1, SPPF, [1024, 5]] # 5 12 | - [-1, 1, PSA, [1024]] # 6 13 | 14 | # YOLOv8.0n head 15 | head: 16 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 17 | - [[-1, 3], 1, Concat, [1]] # cat backbone P4 18 | - [-1, 3, C2f, [512]] # 9 19 | 20 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 21 | - [[-1, 2], 1, Concat, [1]] # cat backbone P3 22 | - [-1, 3, C2f, [256]] # 12 (P3/8-small) 23 | 24 | - [-1, 1, Conv, [256, 3, 2]] 25 | - [[-1, 8], 1, Concat, [1]] # cat head P4 26 | - [-1, 3, C2f, [512]] # 15 (P4/16-medium) 27 | 28 | - [-1, 1, SCDown, [512, 3, 2]] 29 | - [[-1, 5], 1, Concat, [1]] # cat head P5 30 | - [-1, 3, C2fCIB, [1024, True, True]] # 18 (P5/32-large) 31 | 32 | - [[12, 15, 18], 1, v10Detect, [nc]] # Detect(P3, P4, P5) 33 | -------------------------------------------------------------------------------- /docs/en/reference/engine/exporter.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore the exporter functionality of Ultralytics. Learn about exporting formats, IOSDetectModel, and try exporting with examples. 3 | keywords: Ultralytics, Exporter, IOSDetectModel, Export Formats, Try export 4 | --- 5 | 6 | # Reference for `ultralytics/engine/exporter.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/exporter.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/exporter.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/exporter.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.engine.exporter.Exporter 15 | 16 |

17 | 18 | ## ::: ultralytics.engine.exporter.IOSDetectModel 19 | 20 |

21 | 22 | ## ::: ultralytics.engine.exporter.export_formats 23 | 24 |

25 | 26 | ## ::: ultralytics.engine.exporter.gd_outputs 27 | 28 |

29 | 30 | ## ::: ultralytics.engine.exporter.try_export 31 | 32 |

33 | -------------------------------------------------------------------------------- /docs/en/reference/utils/callbacks/mlflow.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Understand routines at the end of pre-training and training in Ultralytics. Elevate your MLflow callbacks expertise. 3 | keywords: Ultralytics, MLflow, Callbacks, on_pretrain_routine_end, on_train_end, Machine Learning, Training 4 | --- 5 | 6 | # Reference for `ultralytics/utils/callbacks/mlflow.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/mlflow.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/mlflow.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/mlflow.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.callbacks.mlflow.on_pretrain_routine_end 15 | 16 |

17 | 18 | ## ::: ultralytics.utils.callbacks.mlflow.on_train_epoch_end 19 | 20 |

21 | 22 | ## ::: ultralytics.utils.callbacks.mlflow.on_fit_epoch_end 23 | 24 |

25 | 26 | ## ::: ultralytics.utils.callbacks.mlflow.on_train_end 27 | 28 |

29 | -------------------------------------------------------------------------------- /docs/en/reference/data/dataset.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore the YOLODataset and SemanticDataset classes in YOLO data. Learn how to efficiently handle and manipulate your data with Ultralytics. 3 | keywords: Ultralytics, YOLO, YOLODataset, SemanticDataset, data handling, data manipulation 4 | --- 5 | 6 | # Reference for `ultralytics/data/dataset.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/dataset.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/dataset.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/dataset.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.data.dataset.YOLODataset 15 | 16 |

17 | 18 | ## ::: ultralytics.data.dataset.ClassificationDataset 19 | 20 |

21 | 22 | ## ::: ultralytics.data.dataset.SemanticDataset 23 | 24 |

25 | 26 | ## ::: ultralytics.data.dataset.load_dataset_cache_file 27 | 28 |

29 | 30 | ## ::: ultralytics.data.dataset.save_dataset_cache_file 31 | 32 |

33 | -------------------------------------------------------------------------------- /ultralytics/models/fastsam/model.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from pathlib import Path 4 | 5 | from ultralytics.engine.model import Model 6 | from .predict import FastSAMPredictor 7 | from .val import FastSAMValidator 8 | 9 | 10 | class FastSAM(Model): 11 | """ 12 | FastSAM model interface. 13 | 14 | Example: 15 | ```python 16 | from ultralytics import FastSAM 17 | 18 | model = FastSAM('last.pt') 19 | results = model.predict('ultralytics/assets/bus.jpg') 20 | ``` 21 | """ 22 | 23 | def __init__(self, model="FastSAM-x.pt"): 24 | """Call the __init__ method of the parent class (YOLO) with the updated default model.""" 25 | if str(model) == "FastSAM.pt": 26 | model = "FastSAM-x.pt" 27 | assert Path(model).suffix not in (".yaml", ".yml"), "FastSAM models only support pre-trained models." 28 | super().__init__(model=model, task="segment") 29 | 30 | @property 31 | def task_map(self): 32 | """Returns a dictionary mapping segment task to corresponding predictor and validator classes.""" 33 | return {"segment": {"predictor": FastSAMPredictor, "validator": FastSAMValidator}} 34 | -------------------------------------------------------------------------------- /docs/en/reference/hub/__init__.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore Ultralytics hub functions for model resetting, checking datasets, model exporting and more. Easy-to-follow instructions provided. 3 | keywords: Ultralytics, hub functions, model export, dataset check, reset model, YOLO Docs 4 | --- 5 | 6 | # Reference for `ultralytics/hub/__init__.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/__init__.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/hub/__init__.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/hub/__init__.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.hub.login 15 | 16 |

17 | 18 | ## ::: ultralytics.hub.logout 19 | 20 |

21 | 22 | ## ::: ultralytics.hub.reset_model 23 | 24 |

25 | 26 | ## ::: ultralytics.hub.export_fmts_hub 27 | 28 |

29 | 30 | ## ::: ultralytics.hub.export_model 31 | 32 |

33 | 34 | ## ::: ultralytics.hub.get_export 35 | 36 |

37 | 38 | ## ::: ultralytics.hub.check_dataset 39 | 40 |

41 | -------------------------------------------------------------------------------- /docs/en/reference/engine/results.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Master Ultralytics engine results including base tensors, boxes, and keypoints with our thorough documentation. 3 | keywords: Ultralytics, engine, results, base tensor, boxes, keypoints 4 | --- 5 | 6 | # Reference for `ultralytics/engine/results.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/results.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/results.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/engine/results.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.engine.results.BaseTensor 15 | 16 |

17 | 18 | ## ::: ultralytics.engine.results.Results 19 | 20 |

21 | 22 | ## ::: ultralytics.engine.results.Boxes 23 | 24 |

25 | 26 | ## ::: ultralytics.engine.results.Masks 27 | 28 |

29 | 30 | ## ::: ultralytics.engine.results.Keypoints 31 | 32 |

33 | 34 | ## ::: ultralytics.engine.results.Probs 35 | 36 |

37 | 38 | ## ::: ultralytics.engine.results.OBB 39 | 40 |

41 | -------------------------------------------------------------------------------- /docs/en/reference/nn/modules/utils.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore Ultralytics neural network utils, such as bias_init_with_prob, inverse_sigmoid and multi_scale_deformable_attn_pytorch functions. 3 | keywords: Ultralytics, neural network, nn.modules.utils, bias_init_with_prob, inverse_sigmoid, multi_scale_deformable_attn_pytorch 4 | --- 5 | 6 | # Reference for `ultralytics/nn/modules/utils.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/utils.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/utils.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/modules/utils.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.nn.modules.utils._get_clones 15 | 16 |

17 | 18 | ## ::: ultralytics.nn.modules.utils.bias_init_with_prob 19 | 20 |

21 | 22 | ## ::: ultralytics.nn.modules.utils.linear_init 23 | 24 |

25 | 26 | ## ::: ultralytics.nn.modules.utils.inverse_sigmoid 27 | 28 |

29 | 30 | ## ::: ultralytics.nn.modules.utils.multi_scale_deformable_attn_pytorch 31 | 32 |

33 | -------------------------------------------------------------------------------- /docs/en/reference/utils/tal.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore Ultralytics utilities for optimized task assignment, bounding box creation, and distance calculation. Learn more about algorithm implementations. 3 | keywords: Ultralytics, task aligned assigner, select highest overlaps, make anchors, dist2bbox, bbox2dist, utilities, algorithm 4 | --- 5 | 6 | # Reference for `ultralytics/utils/tal.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/tal.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/tal.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/tal.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.tal.TaskAlignedAssigner 15 | 16 |

17 | 18 | ## ::: ultralytics.utils.tal.RotatedTaskAlignedAssigner 19 | 20 |

21 | 22 | ## ::: ultralytics.utils.tal.make_anchors 23 | 24 |

25 | 26 | ## ::: ultralytics.utils.tal.dist2bbox 27 | 28 |

29 | 30 | ## ::: ultralytics.utils.tal.bbox2dist 31 | 32 |

33 | 34 | ## ::: ultralytics.utils.tal.dist2rbox 35 | 36 |

37 | -------------------------------------------------------------------------------- /docs/en/reference/trackers/utils/matching.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore in-depth guidance for using Ultralytics trackers utils matching, including merge_matches, linear_assignment, iou_distance, embedding_distance, fuse_motion, and fuse_score. 3 | keywords: Ultralytics, Trackers Utils, Matching, merge_matches, linear_assignment, iou_distance, embedding_distance, fuse_motion, fuse_score, documentation 4 | --- 5 | 6 | # Reference for `ultralytics/trackers/utils/matching.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/utils/matching.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/trackers/utils/matching.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/trackers/utils/matching.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.trackers.utils.matching.linear_assignment 15 | 16 |

17 | 18 | ## ::: ultralytics.trackers.utils.matching.iou_distance 19 | 20 |

21 | 22 | ## ::: ultralytics.trackers.utils.matching.embedding_distance 23 | 24 |

25 | 26 | ## ::: ultralytics.trackers.utils.matching.fuse_score 27 | 28 |

29 | -------------------------------------------------------------------------------- /docs/en/reference/models/sam/build.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Master building SAM ViT models with Ultralytics. Discover steps to leverage the power of SAM and Vision Transformer sessions. 3 | keywords: Ultralytics, SAM, build sam, vision transformer, vits, build_sam_vit_l, build_sam_vit_b, build_sam 4 | --- 5 | 6 | # Reference for `ultralytics/models/sam/build.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/build.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/build.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/build.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.sam.build.build_sam_vit_h 15 | 16 |

17 | 18 | ## ::: ultralytics.models.sam.build.build_sam_vit_l 19 | 20 |

21 | 22 | ## ::: ultralytics.models.sam.build.build_sam_vit_b 23 | 24 |

25 | 26 | ## ::: ultralytics.models.sam.build.build_mobile_sam 27 | 28 |

29 | 30 | ## ::: ultralytics.models.sam.build._build_sam 31 | 32 |

33 | 34 | ## ::: ultralytics.models.sam.build.build_sam 35 | 36 |

37 | -------------------------------------------------------------------------------- /docs/en/reference/nn/modules/head.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore docs covering Ultralytics YOLO detection, pose & RTDETRDecoder. Comprehensive guides to help you understand Ultralytics nn modules. 3 | keywords: Ultralytics, YOLO, Detection, Pose, RTDETRDecoder, nn modules, guides 4 | --- 5 | 6 | # Reference for `ultralytics/nn/modules/head.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/head.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/head.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/modules/head.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.nn.modules.head.Detect 15 | 16 |

17 | 18 | ## ::: ultralytics.nn.modules.head.Segment 19 | 20 |

21 | 22 | ## ::: ultralytics.nn.modules.head.OBB 23 | 24 |

25 | 26 | ## ::: ultralytics.nn.modules.head.Pose 27 | 28 |

29 | 30 | ## ::: ultralytics.nn.modules.head.Classify 31 | 32 |

33 | 34 | ## ::: ultralytics.nn.modules.head.WorldDetect 35 | 36 |

37 | 38 | ## ::: ultralytics.nn.modules.head.RTDETRDecoder 39 | 40 |

41 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v9/yolov9c.yaml: -------------------------------------------------------------------------------- 1 | # YOLOv9 2 | 3 | # parameters 4 | nc: 80 # number of classes 5 | 6 | # gelan backbone 7 | backbone: 8 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 9 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 10 | - [-1, 1, RepNCSPELAN4, [256, 128, 64, 1]] # 2 11 | - [-1, 1, ADown, [256]] # 3-P3/8 12 | - [-1, 1, RepNCSPELAN4, [512, 256, 128, 1]] # 4 13 | - [-1, 1, ADown, [512]] # 5-P4/16 14 | - [-1, 1, RepNCSPELAN4, [512, 512, 256, 1]] # 6 15 | - [-1, 1, ADown, [512]] # 7-P5/32 16 | - [-1, 1, RepNCSPELAN4, [512, 512, 256, 1]] # 8 17 | - [-1, 1, SPPELAN, [512, 256]] # 9 18 | 19 | head: 20 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 21 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 22 | - [-1, 1, RepNCSPELAN4, [512, 512, 256, 1]] # 12 23 | 24 | - [-1, 1, nn.Upsample, [None, 2, 'nearest']] 25 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 26 | - [-1, 1, RepNCSPELAN4, [256, 256, 128, 1]] # 15 (P3/8-small) 27 | 28 | - [-1, 1, ADown, [256]] 29 | - [[-1, 12], 1, Concat, [1]] # cat head P4 30 | - [-1, 1, RepNCSPELAN4, [512, 512, 256, 1]] # 18 (P4/16-medium) 31 | 32 | - [-1, 1, ADown, [512]] 33 | - [[-1, 9], 1, Concat, [1]] # cat head P5 34 | - [-1, 1, RepNCSPELAN4, [512, 512, 256, 1]] # 21 (P5/32-large) 35 | 36 | - [[15, 18, 21], 1, Detect, [nc]] # DDetect(P3, P4, P5) 37 | -------------------------------------------------------------------------------- /docs/en/reference/data/build.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore the Ultralytics YOLO v3 data build procedures, including the InfiniteDataLoader, seed_worker, build_dataloader, and load_inference_source. 3 | keywords: Ultralytics, YOLO v3, Data build, DataLoader, InfiniteDataLoader, seed_worker, build_dataloader, load_inference_source 4 | --- 5 | 6 | # Reference for `ultralytics/data/build.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/build.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/build.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/build.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.data.build.InfiniteDataLoader 15 | 16 |

17 | 18 | ## ::: ultralytics.data.build._RepeatSampler 19 | 20 |

21 | 22 | ## ::: ultralytics.data.build.seed_worker 23 | 24 |

25 | 26 | ## ::: ultralytics.data.build.build_yolo_dataset 27 | 28 |

29 | 30 | ## ::: ultralytics.data.build.build_dataloader 31 | 32 |

33 | 34 | ## ::: ultralytics.data.build.check_source 35 | 36 |

37 | 38 | ## ::: ultralytics.data.build.load_inference_source 39 | 40 |

41 | -------------------------------------------------------------------------------- /docs/en/reference/data/converter.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore Ultralytics data converter functions like coco91_to_coco80_class, merge_multi_segment, rle2polygon for efficient data handling. 3 | keywords: Ultralytics, Data Converter, coco91_to_coco80_class, merge_multi_segment, rle2polygon 4 | --- 5 | 6 | # Reference for `ultralytics/data/converter.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/converter.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/converter.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/converter.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.data.converter.coco91_to_coco80_class 15 | 16 |

17 | 18 | ## ::: ultralytics.data.converter.coco80_to_coco91_class 19 | 20 |

21 | 22 | ## ::: ultralytics.data.converter.convert_coco 23 | 24 |

25 | 26 | ## ::: ultralytics.data.converter.convert_dota_to_yolo_obb 27 | 28 |

29 | 30 | ## ::: ultralytics.data.converter.min_index 31 | 32 |

33 | 34 | ## ::: ultralytics.data.converter.merge_multi_segment 35 | 36 |

37 | 38 | ## ::: ultralytics.data.converter.yolo_bbox2segment 39 | 40 |

41 | -------------------------------------------------------------------------------- /docs/en/reference/utils/callbacks/wb.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Deep dive into Ultralytics callbacks. Learn how to use the _log_plots, on_fit_epoch_end, and on_train_end functions effectively. 3 | keywords: Ultralytics, callbacks, _log_plots, on_fit_epoch_end, on_train_end 4 | --- 5 | 6 | # Reference for `ultralytics/utils/callbacks/wb.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/wb.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/wb.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/wb.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.callbacks.wb._custom_table 15 | 16 |

17 | 18 | ## ::: ultralytics.utils.callbacks.wb._plot_curve 19 | 20 |

21 | 22 | ## ::: ultralytics.utils.callbacks.wb._log_plots 23 | 24 |

25 | 26 | ## ::: ultralytics.utils.callbacks.wb.on_pretrain_routine_start 27 | 28 |

29 | 30 | ## ::: ultralytics.utils.callbacks.wb.on_fit_epoch_end 31 | 32 |

33 | 34 | ## ::: ultralytics.utils.callbacks.wb.on_train_epoch_end 35 | 36 |

37 | 38 | ## ::: ultralytics.utils.callbacks.wb.on_train_end 39 | 40 |

41 | -------------------------------------------------------------------------------- /docs/en/reference/data/explorer/utils.md: -------------------------------------------------------------------------------- 1 | --- 2 | comments: true 3 | description: Detailed reference for the Explorer utils. Provides descriptions and details on important utility functions for managing and interacting with data in the Ultralytics explorer project. 4 | keywords: Ultralytics, data explorer, function reference, documentation, get table schema, get sim index schema, sanitize batch, plot query result, prompt SQL query 5 | --- 6 | 7 | # Reference for `ultralytics/data/explorer/utils.py` 8 | 9 | !!! Note 10 | 11 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/explorer/utils.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/explorer/utils.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/explorer/utils.py) 🛠️. Thank you 🙏! 12 | 13 |

14 | 15 | ## ::: ultralytics.data.explorer.utils.get_table_schema 16 | 17 |

18 | 19 | ## ::: ultralytics.data.explorer.utils.get_sim_index_schema 20 | 21 |

22 | 23 | ## ::: ultralytics.data.explorer.utils.sanitize_batch 24 | 25 |

26 | 27 | ## ::: ultralytics.data.explorer.utils.plot_query_result 28 | 29 |

30 | 31 | ## ::: ultralytics.data.explorer.utils.prompt_sql_query 32 | 33 |

34 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v3/yolov3-tiny.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | # YOLOv3-tiny object detection model with P4-P5 outputs. For details see https://docs.ultralytics.com/models/yolov3 3 | 4 | # Parameters 5 | nc: 80 # number of classes 6 | depth_multiple: 1.0 # model depth multiple 7 | width_multiple: 1.0 # layer channel multiple 8 | 9 | # YOLOv3-tiny backbone 10 | backbone: 11 | # [from, number, module, args] 12 | - [-1, 1, Conv, [16, 3, 1]] # 0 13 | - [-1, 1, nn.MaxPool2d, [2, 2, 0]] # 1-P1/2 14 | - [-1, 1, Conv, [32, 3, 1]] 15 | - [-1, 1, nn.MaxPool2d, [2, 2, 0]] # 3-P2/4 16 | - [-1, 1, Conv, [64, 3, 1]] 17 | - [-1, 1, nn.MaxPool2d, [2, 2, 0]] # 5-P3/8 18 | - [-1, 1, Conv, [128, 3, 1]] 19 | - [-1, 1, nn.MaxPool2d, [2, 2, 0]] # 7-P4/16 20 | - [-1, 1, Conv, [256, 3, 1]] 21 | - [-1, 1, nn.MaxPool2d, [2, 2, 0]] # 9-P5/32 22 | - [-1, 1, Conv, [512, 3, 1]] 23 | - [-1, 1, nn.ZeroPad2d, [[0, 1, 0, 1]]] # 11 24 | - [-1, 1, nn.MaxPool2d, [2, 1, 0]] # 12 25 | 26 | # YOLOv3-tiny head 27 | head: 28 | - [-1, 1, Conv, [1024, 3, 1]] 29 | - [-1, 1, Conv, [256, 1, 1]] 30 | - [-1, 1, Conv, [512, 3, 1]] # 15 (P5/32-large) 31 | 32 | - [-2, 1, Conv, [128, 1, 1]] 33 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 34 | - [[-1, 8], 1, Concat, [1]] # cat backbone P4 35 | - [-1, 1, Conv, [256, 3, 1]] # 19 (P4/16-medium) 36 | 37 | - [[19, 15], 1, Detect, [nc]] # Detect(P4, P5) 38 | -------------------------------------------------------------------------------- /docs/en/reference/data/loaders.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Find detailed guides on Ultralytics YOLO data loaders, including LoadStreams, LoadImages and LoadTensor. Learn how to get the best YouTube URLs. 3 | keywords: Ultralytics, data loaders, LoadStreams, LoadImages, LoadTensor, YOLO, YouTube URLs 4 | --- 5 | 6 | # Reference for `ultralytics/data/loaders.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/loaders.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/loaders.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/loaders.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.data.loaders.SourceTypes 15 | 16 |

17 | 18 | ## ::: ultralytics.data.loaders.LoadStreams 19 | 20 |

21 | 22 | ## ::: ultralytics.data.loaders.LoadScreenshots 23 | 24 |

25 | 26 | ## ::: ultralytics.data.loaders.LoadImagesAndVideos 27 | 28 |

29 | 30 | ## ::: ultralytics.data.loaders.LoadPilAndNumpy 31 | 32 |

33 | 34 | ## ::: ultralytics.data.loaders.LoadTensor 35 | 36 |

37 | 38 | ## ::: ultralytics.data.loaders.autocast_list 39 | 40 |

41 | 42 | ## ::: ultralytics.data.loaders.get_best_youtube_url 43 | 44 |

45 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n-tov8.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 11 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 12 | - [-1, 3, C2f, [128, True]] 13 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 14 | - [-1, 6, C2f, [256, True]] 15 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 16 | - [-1, 6, C2f, [512, True]] 17 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 18 | - [-1, 3, C2f, [1024, True]] 19 | - [-1, 1, SPPF, [1024, 5]] # 9 20 | 21 | 22 | # YOLOv8.0n head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2f, [512]] # 12 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f, [256]] # 15 (P3/8-small) 31 | 32 | - [-1, 1, Conv, [256, 3, 2]] 33 | - [[-1, 12], 1, Concat, [1]] # cat head P4 34 | - [-1, 3, C2f, [512]] # 18 (P4/16-medium) 35 | 36 | - [-1, 1, Conv, [512, 3, 2]] 37 | - [[-1, 9], 1, Concat, [1]] # cat head P5 38 | - [-1, 3, C2fCIB, [1024, True, True]] # 21 (P5/32-large) 39 | 40 | - [[15, 18, 21], 1, v10Detect, [nc]] # Detect(P3, P4, P5) 41 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n-tov8-3.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 11 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 12 | - [-1, 3, C2f, [128, True]] 13 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 14 | - [-1, 6, C2f, [256, True]] 15 | - [-1, 1, SCDown, [512, 3, 2]] # 5-P4/16 16 | - [-1, 6, C2f, [512, True]] 17 | - [-1, 1, SCDown, [1024, 3, 2]] # 7-P5/32 18 | - [-1, 3, C2f, [1024, True]] 19 | - [-1, 1, SPPF, [1024, 5]] # 9 20 | 21 | 22 | # YOLOv8.0n head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2f, [512]] # 12 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f, [256]] # 15 (P3/8-small) 31 | 32 | - [-1, 1, Conv, [256, 3, 2]] 33 | - [[-1, 12], 1, Concat, [1]] # cat head P4 34 | - [-1, 3, C2f, [512]] # 18 (P4/16-medium) 35 | 36 | - [-1, 1, SCDown, [512, 3, 2]] 37 | - [[-1, 9], 1, Concat, [1]] # cat head P5 38 | - [-1, 3, C2fCIB, [1024, True, True]] # 21 (P5/32-large) 39 | 40 | - [[15, 18, 21], 1, Detect, [nc]] # Detect(P3, P4, P5) 41 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10s.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 80 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | s: [0.33, 0.50, 1024] 6 | 7 | backbone: 8 | # [from, repeats, module, args] 9 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 10 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 11 | - [-1, 3, C2f, [128, True]] 12 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 13 | - [-1, 6, C2f, [256, True]] 14 | - [-1, 1, SCDown, [512, 3, 2]] # 5-P4/16 15 | - [-1, 6, C2f, [512, True]] 16 | - [-1, 1, SCDown, [1024, 3, 2]] # 7-P5/32 17 | - [-1, 3, C2fCIB, [1024, True, True]] 18 | - [-1, 1, SPPF, [1024, 5]] # 9 19 | - [-1, 1, PSA, [1024]] # 10 20 | 21 | # YOLOv8.0n head 22 | head: 23 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 24 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 25 | - [-1, 3, C2f, [512]] # 13 26 | 27 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 28 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 29 | - [-1, 3, C2f, [256]] # 16 (P3/8-small) 30 | 31 | - [-1, 1, Conv, [256, 3, 2]] 32 | - [[-1, 13], 1, Concat, [1]] # cat head P4 33 | - [-1, 3, C2f, [512]] # 19 (P4/16-medium) 34 | 35 | - [-1, 1, SCDown, [512, 3, 2]] 36 | - [[-1, 10], 1, Concat, [1]] # cat head P5 37 | - [-1, 3, C2fCIB, [1024, True, True]] # 22 (P5/32-large) 38 | 39 | - [[16, 19, 22], 1, v10Detect, [nc]] # Detect(P3, P4, P5) 40 | -------------------------------------------------------------------------------- /docs/en/reference/utils/files.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Discover how to use Ultralytics utility functions for file-related operations including incrementing paths, finding file age, checking file size and creating directories. 3 | keywords: Ultralytics, utility functions, file operations, working directory, file age, file size, create directories 4 | --- 5 | 6 | # Reference for `ultralytics/utils/files.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/files.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/files.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/files.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.files.WorkingDirectory 15 | 16 |

17 | 18 | ## ::: ultralytics.utils.files.spaces_in_path 19 | 20 |

21 | 22 | ## ::: ultralytics.utils.files.increment_path 23 | 24 |

25 | 26 | ## ::: ultralytics.utils.files.file_age 27 | 28 |

29 | 30 | ## ::: ultralytics.utils.files.file_date 31 | 32 |

33 | 34 | ## ::: ultralytics.utils.files.file_size 35 | 36 |

37 | 38 | ## ::: ultralytics.utils.files.get_latest_run 39 | 40 |

41 | 42 | ## ::: ultralytics.utils.files.update_models 43 | 44 |

45 | -------------------------------------------------------------------------------- /docs/en/reference/utils/callbacks/tensorboard.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore Ultralytics YOLO Docs for a deep understanding of log_scalars, on_batch_end & other callback utilities embedded in the tensorboard module. 3 | keywords: Ultralytics, YOLO, documentation, callback utilities, log_scalars, on_batch_end, tensorboard 4 | --- 5 | 6 | # Reference for `ultralytics/utils/callbacks/tensorboard.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/tensorboard.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/tensorboard.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/tensorboard.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.callbacks.tensorboard._log_scalars 15 | 16 |

17 | 18 | ## ::: ultralytics.utils.callbacks.tensorboard._log_tensorboard_graph 19 | 20 |

21 | 22 | ## ::: ultralytics.utils.callbacks.tensorboard.on_pretrain_routine_start 23 | 24 |

25 | 26 | ## ::: ultralytics.utils.callbacks.tensorboard.on_train_start 27 | 28 |

29 | 30 | ## ::: ultralytics.utils.callbacks.tensorboard.on_train_epoch_end 31 | 32 |

33 | 34 | ## ::: ultralytics.utils.callbacks.tensorboard.on_fit_epoch_end 35 | 36 |

37 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n-tov8-2.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 11 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 12 | - [-1, 3, C2f, [128, True]] 13 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 14 | - [-1, 6, C2f, [256, True]] 15 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 16 | - [-1, 6, C2f, [512, True]] 17 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 18 | - [-1, 3, C2f, [1024, True]] 19 | - [-1, 1, SPPF, [1024, 5]] # 9 20 | - [-1, 1, PSA, [1024]] # 10 21 | 22 | 23 | # YOLOv8.0n head 24 | head: 25 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 26 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 27 | - [-1, 3, C2f, [512]] # 13 28 | 29 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 30 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 31 | - [-1, 3, C2f, [256]] # 16 (P3/8-small) 32 | 33 | - [-1, 1, Conv, [256, 3, 2]] 34 | - [[-1, 13], 1, Concat, [1]] # cat head P4 35 | - [-1, 3, C2f, [512]] # 19 (P4/16-medium) 36 | 37 | - [-1, 1, Conv, [512, 3, 2]] 38 | - [[-1, 10], 1, Concat, [1]] # cat head P5 39 | - [-1, 3, C2fCIB, [1024, True, True]] # 22 (P5/32-large) 40 | 41 | - [[16, 19, 22], 1, Detect, [nc]] # Detect(P3, P4, P5) 42 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 11 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 12 | - [-1, 3, C2f, [128, True]] 13 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 14 | - [-1, 6, C2f, [256, True]] 15 | - [-1, 1, SCDown, [512, 3, 2]] # 5-P4/16 16 | - [-1, 6, C2f, [512, True]] 17 | - [-1, 1, SCDown, [1024, 3, 2]] # 7-P5/32 18 | - [-1, 3, C2f, [1024, True]] 19 | - [-1, 1, SPPF, [1024, 5]] # 9 20 | - [-1, 1, PSA, [1024]] # 10 21 | 22 | # YOLOv8.0n head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2f, [512]] # 13 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f, [256]] # 16 (P3/8-small) 31 | 32 | - [-1, 1, Conv, [256, 3, 2]] 33 | - [[-1, 13], 1, Concat, [1]] # cat head P4 34 | - [-1, 3, C2f, [512]] # 19 (P4/16-medium) 35 | 36 | - [-1, 1, SCDown, [512, 3, 2]] 37 | - [[-1, 10], 1, Concat, [1]] # cat head P5 38 | - [-1, 3, C2fCIB, [1024, True, True]] # 22 (P5/32-large) 39 | 40 | - [[16, 19, 22], 1, v10Detect, [nc]] # Detect(P3, P4, P5) 41 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10b.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 80 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | b: [0.67, 1.00, 512] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 11 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 12 | - [-1, 3, C2f, [128, True]] 13 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 14 | - [-1, 6, C2f, [256, True]] 15 | - [-1, 1, SCDown, [512, 3, 2]] # 5-P4/16 16 | - [-1, 6, C2f, [512, True]] 17 | - [-1, 1, SCDown, [1024, 3, 2]] # 7-P5/32 18 | - [-1, 3, C2fCIB, [1024, True]] 19 | - [-1, 1, SPPF, [1024, 5]] # 9 20 | - [-1, 1, PSA, [1024]] # 10 21 | 22 | # YOLOv8.0n head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2fCIB, [512, True]] # 13 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f, [256]] # 16 (P3/8-small) 31 | 32 | - [-1, 1, Conv, [256, 3, 2]] 33 | - [[-1, 13], 1, Concat, [1]] # cat head P4 34 | - [-1, 3, C2fCIB, [512, True]] # 19 (P4/16-medium) 35 | 36 | - [-1, 1, SCDown, [512, 3, 2]] 37 | - [[-1, 10], 1, Concat, [1]] # cat head P5 38 | - [-1, 3, C2fCIB, [1024, True]] # 22 (P5/32-large) 39 | 40 | - [[16, 19, 22], 1, v10Detect, [nc]] # Detect(P3, P4, P5) 41 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n+C2f-DualConv.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov10n.yaml' will call yolov10.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | backbone: 8 | # [from, repeats, module, args] 9 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 10 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 11 | - [-1, 3, C2f_Dual, [128, True]] 12 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 13 | - [-1, 6, C2f_Dual, [256, True]] 14 | - [-1, 1, SCDown, [512, 3, 2]] # 5-P4/16 15 | - [-1, 6, C2f_Dual, [512, True]] 16 | - [-1, 1, SCDown, [1024, 3, 2]] # 7-P5/32 17 | - [-1, 3, C2f_Dual, [1024, True]] 18 | - [-1, 1, SPPF, [1024, 5]] # 9 19 | - [-1, 1, PSA, [1024]] # 10 20 | 21 | # YOLOv10.0n head 22 | head: 23 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 24 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 25 | - [-1, 3, C2f_Dual, [512]] # 13 26 | 27 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 28 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 29 | - [-1, 3, C2f_Dual, [256]] # 16 (P3/8-small) 30 | 31 | - [-1, 1, Conv, [256, 3, 2]] 32 | - [[-1, 13], 1, Concat, [1]] # cat head P4 33 | - [-1, 3, C2f_Dual, [512]] # 19 (P4/16-medium) 34 | 35 | - [-1, 1, SCDown, [512, 3, 2]] 36 | - [[-1, 10], 1, Concat, [1]] # cat head P5 37 | - [-1, 3, C2fCIB, [1024, True, True]] # 22 (P5/32-large) 38 | 39 | - [[16, 19, 22], 1, v10Detect, [nc]] # Detect(P3, P4, P5) -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10x.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 80 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | x: [1.00, 1.25, 512] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 11 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 12 | - [-1, 3, C2f, [128, True]] 13 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 14 | - [-1, 6, C2f, [256, True]] 15 | - [-1, 1, SCDown, [512, 3, 2]] # 5-P4/16 16 | - [-1, 6, C2fCIB, [512, True]] 17 | - [-1, 1, SCDown, [1024, 3, 2]] # 7-P5/32 18 | - [-1, 3, C2fCIB, [1024, True]] 19 | - [-1, 1, SPPF, [1024, 5]] # 9 20 | - [-1, 1, PSA, [1024]] # 10 21 | 22 | # YOLOv8.0n head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2fCIB, [512, True]] # 13 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f, [256]] # 16 (P3/8-small) 31 | 32 | - [-1, 1, Conv, [256, 3, 2]] 33 | - [[-1, 13], 1, Concat, [1]] # cat head P4 34 | - [-1, 3, C2fCIB, [512, True]] # 19 (P4/16-medium) 35 | 36 | - [-1, 1, SCDown, [512, 3, 2]] 37 | - [[-1, 10], 1, Concat, [1]] # cat head P5 38 | - [-1, 3, C2fCIB, [1024, True]] # 22 (P5/32-large) 39 | 40 | - [[16, 19, 22], 1, v10Detect, [nc]] # Detect(P3, P4, P5) 41 | -------------------------------------------------------------------------------- /docs/en/reference/utils/callbacks/clearml.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Uncover the specifics of Ultralytics ClearML callbacks, from pretrain routine start to training end. Boost your ML model performance. 3 | keywords: Ultralytics, clearML, callbacks, pretrain routine start, validation end, train epoch end, training end 4 | --- 5 | 6 | # Reference for `ultralytics/utils/callbacks/clearml.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/clearml.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/clearml.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/clearml.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.callbacks.clearml._log_debug_samples 15 | 16 |

17 | 18 | ## ::: ultralytics.utils.callbacks.clearml._log_plot 19 | 20 |

21 | 22 | ## ::: ultralytics.utils.callbacks.clearml.on_pretrain_routine_start 23 | 24 |

25 | 26 | ## ::: ultralytics.utils.callbacks.clearml.on_train_epoch_end 27 | 28 |

29 | 30 | ## ::: ultralytics.utils.callbacks.clearml.on_fit_epoch_end 31 | 32 |

33 | 34 | ## ::: ultralytics.utils.callbacks.clearml.on_val_end 35 | 36 |

37 | 38 | ## ::: ultralytics.utils.callbacks.clearml.on_train_end 39 | 40 |

41 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n-tov8-2+DualConv.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 11 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 12 | - [-1, 3, C2f_Dual, [128, True]] 13 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 14 | - [-1, 6, C2f_Dual, [256, True]] 15 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 16 | - [-1, 6, C2f_Dual, [512, True]] 17 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 18 | - [-1, 3, C2f_Dual, [1024, True]] 19 | - [-1, 1, SPPF, [1024, 5]] # 9 20 | - [-1, 1, PSA, [1024]] # 10 21 | 22 | 23 | # YOLOv8.0n head 24 | head: 25 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 26 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 27 | - [-1, 3, C2f, [512]] # 13 28 | 29 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 30 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 31 | - [-1, 3, C2f, [256]] # 16 (P3/8-small) 32 | 33 | - [-1, 1, Conv, [256, 3, 2]] 34 | - [[-1, 13], 1, Concat, [1]] # cat head P4 35 | - [-1, 3, C2f, [512]] # 19 (P4/16-medium) 36 | 37 | - [-1, 1, Conv, [512, 3, 2]] 38 | - [[-1, 10], 1, Concat, [1]] # cat head P5 39 | - [-1, 3, C2fCIB, [1024, True, True]] # 22 (P5/32-large) 40 | 41 | - [[16, 19, 22], 1, Detect, [nc]] # Detect(P3, P4, P5) 42 | -------------------------------------------------------------------------------- /ultralytics/models/yolov10/model.py: -------------------------------------------------------------------------------- 1 | from ultralytics.engine.model import Model 2 | from ultralytics.nn.tasks import YOLOv10DetectionModel 3 | from .val import YOLOv10DetectionValidator 4 | from .predict import YOLOv10DetectionPredictor 5 | from .train import YOLOv10DetectionTrainer 6 | 7 | from huggingface_hub import PyTorchModelHubMixin 8 | from .card import card_template_text 9 | 10 | class YOLOv10(Model, PyTorchModelHubMixin, model_card_template=card_template_text): 11 | 12 | def __init__(self, model="yolov10n.pt", task=None, verbose=False, 13 | names=None): 14 | super().__init__(model=model, task=task, verbose=verbose) 15 | if names is not None: 16 | setattr(self.model, 'names', names) 17 | 18 | def push_to_hub(self, repo_name, **kwargs): 19 | config = kwargs.get('config', {}) 20 | config['names'] = self.names 21 | config['model'] = self.model.yaml['yaml_file'] 22 | config['task'] = self.task 23 | kwargs['config'] = config 24 | super().push_to_hub(repo_name, **kwargs) 25 | 26 | @property 27 | def task_map(self): 28 | """Map head to model, trainer, validator, and predictor classes.""" 29 | return { 30 | "detect": { 31 | "model": YOLOv10DetectionModel, 32 | "trainer": YOLOv10DetectionTrainer, 33 | "validator": YOLOv10DetectionValidator, 34 | "predictor": YOLOv10DetectionPredictor, 35 | }, 36 | } -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n-FasterBlock.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 11 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 12 | - [-1, 3, C2f_FasterBlock, [128, True]] 13 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 14 | - [-1, 6, C2f_FasterBlock, [256, True]] 15 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 16 | - [-1, 6, C2f_FasterBlock, [512, True]] 17 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 18 | - [-1, 3, C2f_FasterBlock, [1024, True]] 19 | - [-1, 1, SPPF, [1024, 5]] # 9 20 | - [-1, 1, PSA, [1024]] # 10 21 | 22 | # YOLOv8.0n head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2f_FasterBlock, [512]] # 13 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f_FasterBlock, [256]] # 16 (P3/8-small) 31 | 32 | - [-1, 1, Conv, [256, 3, 2]] 33 | - [[-1, 13], 1, Concat, [1]] # cat head P4 34 | - [-1, 3, C2f_FasterBlock, [512]] # 19 (P4/16-medium) 35 | 36 | - [-1, 1, Conv, [512, 3, 2]] 37 | - [[-1, 10], 1, Concat, [1]] # cat head P5 38 | - [-1, 3, C2fCIB, [1024, True, True]] # 22 (P5/32-large) 39 | 40 | - [[16, 19, 22], 1, Detect, [nc]] # Detect(P3, P4, P5) 41 | -------------------------------------------------------------------------------- /docs/en/reference/data/split_dota.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Detailed guide on using YOLO with DOTA dataset for object detection, including dataset preparation, image splitting, and label handling. 3 | keywords: Ultralytics, YOLO, DOTA dataset, object detection, image processing, python, dataset preparation, image splitting, label handling, YOLO with DOTA, computer vision, AI, machine learning 4 | --- 5 | 6 | # Reference for `ultralytics/data/split_dota.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/split_dota.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/split_dota.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/data/split_dota.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.data.split_dota.bbox_iof 15 | 16 |

17 | 18 | ## ::: ultralytics.data.split_dota.load_yolo_dota 19 | 20 |

21 | 22 | ## ::: ultralytics.data.split_dota.get_windows 23 | 24 |

25 | 26 | ## ::: ultralytics.data.split_dota.get_window_obj 27 | 28 |

29 | 30 | ## ::: ultralytics.data.split_dota.crop_and_save 31 | 32 |

33 | 34 | ## ::: ultralytics.data.split_dota.split_images_and_labels 35 | 36 |

37 | 38 | ## ::: ultralytics.data.split_dota.split_trainval 39 | 40 |

41 | 42 | ## ::: ultralytics.data.split_dota.split_test 43 | 44 |

45 | -------------------------------------------------------------------------------- /docs/en/reference/utils/callbacks/hub.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore the detailed information on key Ultralytics callbacks such as on_pretrain_routine_end, on_model_save, on_train_start, and on_predict_start. 3 | keywords: Ultralytics, callbacks, on_pretrain_routine_end, on_model_save, on_train_start, on_predict_start, hub, training 4 | --- 5 | 6 | # Reference for `ultralytics/utils/callbacks/hub.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/hub.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/hub.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/hub.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.callbacks.hub.on_pretrain_routine_end 15 | 16 |

17 | 18 | ## ::: ultralytics.utils.callbacks.hub.on_fit_epoch_end 19 | 20 |

21 | 22 | ## ::: ultralytics.utils.callbacks.hub.on_model_save 23 | 24 |

25 | 26 | ## ::: ultralytics.utils.callbacks.hub.on_train_end 27 | 28 |

29 | 30 | ## ::: ultralytics.utils.callbacks.hub.on_train_start 31 | 32 |

33 | 34 | ## ::: ultralytics.utils.callbacks.hub.on_val_start 35 | 36 |

37 | 38 | ## ::: ultralytics.utils.callbacks.hub.on_predict_start 39 | 40 |

41 | 42 | ## ::: ultralytics.utils.callbacks.hub.on_export_start 43 | 44 |

45 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10l.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 80 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | l: [1.00, 1.00, 512] # YOLOv8l summary: 365 layers, 43691520 parameters, 43691504 gradients, 165.7 GFLOPs 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 11 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 12 | - [-1, 3, C2f, [128, True]] 13 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 14 | - [-1, 6, C2f, [256, True]] 15 | - [-1, 1, SCDown, [512, 3, 2]] # 5-P4/16 16 | - [-1, 6, C2f, [512, True]] 17 | - [-1, 1, SCDown, [1024, 3, 2]] # 7-P5/32 18 | - [-1, 3, C2fCIB, [1024, True]] 19 | - [-1, 1, SPPF, [1024, 5]] # 9 20 | - [-1, 1, PSA, [1024]] # 10 21 | 22 | # YOLOv8.0n head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2fCIB, [512, True]] # 13 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f, [256]] # 16 (P3/8-small) 31 | 32 | - [-1, 1, Conv, [256, 3, 2]] 33 | - [[-1, 13], 1, Concat, [1]] # cat head P4 34 | - [-1, 3, C2fCIB, [512, True]] # 19 (P4/16-medium) 35 | 36 | - [-1, 1, SCDown, [512, 3, 2]] 37 | - [[-1, 10], 1, Concat, [1]] # cat head P5 38 | - [-1, 3, C2fCIB, [1024, True]] # 22 (P5/32-large) 39 | 40 | - [[16, 19, 22], 1, v10Detect, [nc]] # Detect(P3, P4, P5) 41 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n-FasterBlock-1.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 11 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 12 | - [-1, 3, C2f_FasterBlock, [128, True]] 13 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 14 | - [-1, 6, C2f_FasterBlock, [256, True]] 15 | - [-1, 1, SCDown, [512, 3, 2]] # 5-P4/16 16 | - [-1, 6, C2f_FasterBlock, [512, True]] 17 | - [-1, 1, SCDown, [1024, 3, 2]] # 7-P5/32 18 | - [-1, 3, C2f_FasterBlock, [1024, True]] 19 | - [-1, 1, SPPF, [1024, 5]] # 9 20 | - [-1, 1, PSA, [1024]] # 10 21 | 22 | # YOLOv8.0n head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2f_FasterBlock, [512]] # 13 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f_FasterBlock, [256]] # 16 (P3/8-small) 31 | 32 | - [-1, 1, Conv, [256, 3, 2]] 33 | - [[-1, 13], 1, Concat, [1]] # cat head P4 34 | - [-1, 3, C2f_FasterBlock, [512]] # 19 (P4/16-medium) 35 | 36 | - [-1, 1, SCDown, [512, 3, 2]] 37 | - [[-1, 10], 1, Concat, [1]] # cat head P5 38 | - [-1, 3, C2fCIB, [1024, True, True]] # 22 (P5/32-large) 39 | 40 | - [[16, 19, 22], 1, Detect, [nc]] # Detect(P3, P4, P5) 41 | -------------------------------------------------------------------------------- /docs/en/reference/utils/loss.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore Ultralytics' versatile loss functions - VarifocalLoss, BboxLoss, v8DetectionLoss, v8PoseLoss. Improve your accuracy on YOLO implementations. 3 | keywords: Ultralytics, Loss functions, VarifocalLoss, BboxLoss, v8DetectionLoss, v8PoseLoss, YOLO, Ultralytics Documentation 4 | --- 5 | 6 | # Reference for `ultralytics/utils/loss.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/loss.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/loss.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/loss.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.loss.VarifocalLoss 15 | 16 |

17 | 18 | ## ::: ultralytics.utils.loss.FocalLoss 19 | 20 |

21 | 22 | ## ::: ultralytics.utils.loss.BboxLoss 23 | 24 |

25 | 26 | ## ::: ultralytics.utils.loss.RotatedBboxLoss 27 | 28 |

29 | 30 | ## ::: ultralytics.utils.loss.KeypointLoss 31 | 32 |

33 | 34 | ## ::: ultralytics.utils.loss.v8DetectionLoss 35 | 36 |

37 | 38 | ## ::: ultralytics.utils.loss.v8SegmentationLoss 39 | 40 |

41 | 42 | ## ::: ultralytics.utils.loss.v8PoseLoss 43 | 44 |

45 | 46 | ## ::: ultralytics.utils.loss.v8ClassificationLoss 47 | 48 |

49 | 50 | ## ::: ultralytics.utils.loss.v8OBBLoss 51 | 52 |

53 | -------------------------------------------------------------------------------- /examples/YOLOv8-ONNXRuntime/README.md: -------------------------------------------------------------------------------- 1 | # YOLOv8 - ONNX Runtime 2 | 3 | This project implements YOLOv8 using ONNX Runtime. 4 | 5 | ## Installation 6 | 7 | To run this project, you need to install the required dependencies. The following instructions will guide you through the installation process. 8 | 9 | ### Installing Required Dependencies 10 | 11 | You can install the required dependencies by running the following command: 12 | 13 | ```bash 14 | pip install -r requirements.txt 15 | ``` 16 | 17 | ### Installing `onnxruntime-gpu` 18 | 19 | If you have an NVIDIA GPU and want to leverage GPU acceleration, you can install the onnxruntime-gpu package using the following command: 20 | 21 | ```bash 22 | pip install onnxruntime-gpu 23 | ``` 24 | 25 | Note: Make sure you have the appropriate GPU drivers installed on your system. 26 | 27 | ### Installing `onnxruntime` (CPU version) 28 | 29 | If you don't have an NVIDIA GPU or prefer to use the CPU version of onnxruntime, you can install the onnxruntime package using the following command: 30 | 31 | ```bash 32 | pip install onnxruntime 33 | ``` 34 | 35 | ### Usage 36 | 37 | After successfully installing the required packages, you can run the YOLOv8 implementation using the following command: 38 | 39 | ```bash 40 | python main.py --model yolov8n.onnx --img image.jpg --conf-thres 0.5 --iou-thres 0.5 41 | ``` 42 | 43 | Make sure to replace yolov8n.onnx with the path to your YOLOv8 ONNX model file, image.jpg with the path to your input image, and adjust the confidence threshold (conf-thres) and IoU threshold (iou-thres) values as needed. 44 | -------------------------------------------------------------------------------- /docs/en/reference/utils/callbacks/neptune.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore exhaustive details about Ultralytics callbacks in Neptune, with specifics about scalar logging, routine start, and more. 3 | keywords: Ultralytics, Neptune callbacks, on_train_epoch_end, on_val_end, _log_plot, _log_images, on_pretrain_routine_start, on_fit_epoch_end, on_train_end 4 | --- 5 | 6 | # Reference for `ultralytics/utils/callbacks/neptune.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/neptune.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/neptune.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/neptune.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.callbacks.neptune._log_scalars 15 | 16 |

17 | 18 | ## ::: ultralytics.utils.callbacks.neptune._log_images 19 | 20 |

21 | 22 | ## ::: ultralytics.utils.callbacks.neptune._log_plot 23 | 24 |

25 | 26 | ## ::: ultralytics.utils.callbacks.neptune.on_pretrain_routine_start 27 | 28 |

29 | 30 | ## ::: ultralytics.utils.callbacks.neptune.on_train_epoch_end 31 | 32 |

33 | 34 | ## ::: ultralytics.utils.callbacks.neptune.on_fit_epoch_end 35 | 36 |

37 | 38 | ## ::: ultralytics.utils.callbacks.neptune.on_val_end 39 | 40 |

41 | 42 | ## ::: ultralytics.utils.callbacks.neptune.on_train_end 43 | 44 |

45 | -------------------------------------------------------------------------------- /docs/en/reference/utils/callbacks/dvc.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Browse through Ultralytics YOLO docs to learn about important logging and callback functions used in training and pretraining models. 3 | keywords: Ultralytics, YOLO, callbacks, logger, training, pretraining, machine learning, models 4 | --- 5 | 6 | # Reference for `ultralytics/utils/callbacks/dvc.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/dvc.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/dvc.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/callbacks/dvc.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.callbacks.dvc._log_images 15 | 16 |

17 | 18 | ## ::: ultralytics.utils.callbacks.dvc._log_plots 19 | 20 |

21 | 22 | ## ::: ultralytics.utils.callbacks.dvc._log_confusion_matrix 23 | 24 |

25 | 26 | ## ::: ultralytics.utils.callbacks.dvc.on_pretrain_routine_start 27 | 28 |

29 | 30 | ## ::: ultralytics.utils.callbacks.dvc.on_pretrain_routine_end 31 | 32 |

33 | 34 | ## ::: ultralytics.utils.callbacks.dvc.on_train_start 35 | 36 |

37 | 38 | ## ::: ultralytics.utils.callbacks.dvc.on_train_epoch_start 39 | 40 |

41 | 42 | ## ::: ultralytics.utils.callbacks.dvc.on_fit_epoch_end 43 | 44 |

45 | 46 | ## ::: ultralytics.utils.callbacks.dvc.on_train_end 47 | 48 |

49 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n-tov8+EMA.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 11 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 12 | - [-1, 3, C2f, [128, True]] 13 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 14 | - [-1, 6, C2f, [256, True]] 15 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 16 | - [-1, 6, C2f, [512, True]] 17 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 18 | - [-1, 3, C2f, [1024, True]] 19 | - [-1, 1, SPPF, [1024, 5]] # 9 20 | 21 | 22 | # YOLOv8.0n head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2f, [512]] # 12 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f, [256]] # 15 (P3/8-small) 31 | - [-1, 1, EMA, []] # 16 (P3/8-small) 小目标检测层输出位置增加注意力机制 32 | 33 | - [-1, 1, Conv, [256, 3, 2]] 34 | - [[-1, 12], 1, Concat, [1]] # cat head P4 35 | - [-1, 3, C2f, [512]] # 19 (P4/16-medium) 36 | - [-1, 1, EMA, []] # 20 (P4/16-medium) 中目标检测层输出位置增加注意力机制 37 | 38 | - [-1, 1, Conv, [512, 3, 2]] 39 | - [[-1, 9], 1, Concat, [1]] # cat head P5 40 | - [-1, 3, C2fCIB, [1024, True, True]] # 23 (P5/32-large) 41 | - [-1, 1, EMA, []] # 24 (P5/32-large) 大目标检测层输出位置增加注意力机制 42 | 43 | - [[16, 20, 24], 1, Detect, [nc]] # Detect(P3, P4, P5) 44 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n-tov8-2+EMA+DualConv.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 11 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 12 | - [-1, 3, C2f, [128, True]] 13 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 14 | - [-1, 6, C2f_Dual, [256, True]] 15 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 16 | - [-1, 6, C2f_Dual, [512, True]] 17 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 18 | - [-1, 3, C2f_Dual, [1024, True]] 19 | - [-1, 1, SPPF, [1024, 5]] # 9 20 | - [-1, 1, PSA, [1024]] # 10 21 | 22 | 23 | # YOLOv8.0n head 24 | head: 25 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 26 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 27 | - [-1, 3, C2f_Dual, [512]] # 13 28 | 29 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 30 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 31 | - [-1, 3, C2f_Dual, [256]] # 16 (P3/8-small) 32 | - [-1, 1, EMA, []] # 17 (P3/8-small) 小目标检测层输出位置增加注意力机制 33 | 34 | - [-1, 1, Conv, [256, 3, 2]] 35 | - [[-1, 13], 1, Concat, [1]] # cat head P4 36 | - [-1, 3, C2f_Dual, [512]] # 20 (P4/16-medium) 37 | - [-1, 1, EMA, []] # 21 (P4/16-medium) 中目标检测层输出位置增加注意力机制 38 | 39 | - [-1, 1, Conv, [512, 3, 2]] 40 | - [[-1, 10], 1, Concat, [1]] # cat head P5 41 | - [-1, 3, C2fCIB, [1024, True, True]] # 24 (P5/32-large) 42 | 43 | - [[17, 21, 24], 1, Detect, [nc]] # Detect(P3, P4, P5) 44 | -------------------------------------------------------------------------------- /docs/en/reference/utils/downloads.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Learn about the download utilities in Ultralytics YOLO, featuring functions like is_url, check_disk_space, get_github_assets, and download. 3 | keywords: Ultralytics, YOLO, download utilities, is_url, check_disk_space, get_github_assets, download, documentation 4 | --- 5 | 6 | # Reference for `ultralytics/utils/downloads.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/downloads.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/downloads.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/downloads.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.downloads.is_url 15 | 16 |

17 | 18 | ## ::: ultralytics.utils.downloads.delete_dsstore 19 | 20 |

21 | 22 | ## ::: ultralytics.utils.downloads.zip_directory 23 | 24 |

25 | 26 | ## ::: ultralytics.utils.downloads.unzip_file 27 | 28 |

29 | 30 | ## ::: ultralytics.utils.downloads.check_disk_space 31 | 32 |

33 | 34 | ## ::: ultralytics.utils.downloads.get_google_drive_file_info 35 | 36 |

37 | 38 | ## ::: ultralytics.utils.downloads.safe_download 39 | 40 |

41 | 42 | ## ::: ultralytics.utils.downloads.get_github_assets 43 | 44 |

45 | 46 | ## ::: ultralytics.utils.downloads.attempt_download_asset 47 | 48 |

49 | 50 | ## ::: ultralytics.utils.downloads.download 51 | 52 |

53 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n-tov8-2+EMA.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 11 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 12 | - [-1, 3, C2f, [128, True]] 13 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 14 | - [-1, 6, C2f, [256, True]] 15 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 16 | - [-1, 6, C2f, [512, True]] 17 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 18 | - [-1, 3, C2f, [1024, True]] 19 | - [-1, 1, SPPF, [1024, 5]] # 9 20 | - [-1, 1, PSA, [1024]] # 10 21 | 22 | 23 | # YOLOv8.0n head 24 | head: 25 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 26 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 27 | - [-1, 3, C2f, [512]] # 13 28 | 29 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 30 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 31 | - [-1, 3, C2f, [256]] # 16 (P3/8-small) 32 | - [-1, 1, EMA, []] # 17 (P3/8-small) 小目标检测层输出位置增加注意力机制 33 | 34 | - [-1, 1, Conv, [256, 3, 2]] 35 | - [[-1, 13], 1, Concat, [1]] # cat head P4 36 | - [-1, 3, C2f, [512]] # 20 (P4/16-medium) 37 | - [-1, 1, EMA, []] # 21 (P4/16-medium) 中目标检测层输出位置增加注意力机制 38 | 39 | - [-1, 1, Conv, [512, 3, 2]] 40 | - [[-1, 10], 1, Concat, [1]] # cat head P5 41 | - [-1, 3, C2fCIB, [1024, True, True]] # 24 (P5/32-large) 42 | - [-1, 1, EMA, []] # 25 (P5/32-large) 大目标检测层输出位置增加注意力机制 43 | 44 | - [[17, 21, 25], 1, Detect, [nc]] # Detect(P3, P4, P5) 45 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n-tov8+EMA+DualConv.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 11 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 12 | - [-1, 3, C2f_Dual, [128, True]] 13 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 14 | - [-1, 6, C2f_Dual, [256, True]] 15 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 16 | - [-1, 6, C2f_Dual, [512, True]] 17 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 18 | - [-1, 3, C2f_Dual, [1024, True]] 19 | - [-1, 1, SPPF, [1024, 5]] # 9 20 | 21 | 22 | # YOLOv8.0n head 23 | head: 24 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 25 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 26 | - [-1, 3, C2f_Dual, [512]] # 12 27 | 28 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 29 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 30 | - [-1, 3, C2f_Dual, [256]] # 15 (P3/8-small) 31 | - [-1, 1, EMA, []] # 16 (P3/8-small) 小目标检测层输出位置增加注意力机制 32 | 33 | - [-1, 1, Conv, [256, 3, 2]] 34 | - [[-1, 12], 1, Concat, [1]] # cat head P4 35 | - [-1, 3, C2f_Dual, [512]] # 19 (P4/16-medium) 36 | - [-1, 1, EMA, []] # 20 (P4/16-medium) 中目标检测层输出位置增加注意力机制 37 | 38 | - [-1, 1, Conv, [512, 3, 2]] 39 | - [[-1, 9], 1, Concat, [1]] # cat head P5 40 | - [-1, 3, C2fCIB, [1024, True, True]] # 23 (P5/32-large) 41 | - [-1, 1, EMA, []] # 24 (P5/32-large) 大目标检测层输出位置增加注意力机制 42 | 43 | - [[16, 20, 24], 1, Detect, [nc]] # Detect(P3, P4, P5) 44 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n-tov8+EMA-2.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 11 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 12 | - [-1, 3, C2f, [128, True]] 13 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 14 | - [-1, 6, C2f, [256, True]] 15 | - [-1, 1, SCDown, [512, 3, 2]] # 5-P4/16 16 | - [-1, 6, C2f, [512, True]] 17 | - [-1, 1, SCDown, [1024, 3, 2]] # 7-P5/32 18 | - [-1, 3, C2f, [1024, True]] 19 | - [-1, 1, SPPF, [1024, 5]] # 9 20 | - [-1, 1, PSA, [1024]] # 10 21 | 22 | 23 | # YOLOv8.0n head 24 | head: 25 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 26 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 27 | - [-1, 3, C2f, [512]] # 13 28 | 29 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 30 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 31 | - [-1, 3, C2f, [256]] # 16 (P3/8-small) 32 | - [-1, 1, EMA, []] # 17 (P3/8-small) 小目标检测层输出位置增加注意力机制 33 | 34 | - [-1, 1, Conv, [256, 3, 2]] 35 | - [[-1, 12], 1, Concat, [1]] # cat head P4 36 | - [-1, 3, C2f, [512]] # 20 (P4/16-medium) 37 | - [-1, 1, EMA, []] # 21 (P4/16-medium) 中目标检测层输出位置增加注意力机制 38 | 39 | - [-1, 1, SCDown, [512, 3, 2]] 40 | - [[-1, 9], 1, Concat, [1]] # cat head P5 41 | - [-1, 3, C2fCIB, [1024, True, True]] # 24 (P5/32-large) 42 | - [-1, 1, EMA, []] # 25 (P5/32-large) 大目标检测层输出位置增加注意力机制 43 | 44 | - [[17, 21, 25], 1, Detect, [nc]] # Detect(P3, P4, P5) 45 | -------------------------------------------------------------------------------- /ultralytics/models/yolo/obb/train.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from copy import copy 4 | 5 | from ultralytics.models import yolo 6 | from ultralytics.nn.tasks import OBBModel 7 | from ultralytics.utils import DEFAULT_CFG, RANK 8 | 9 | 10 | class OBBTrainer(yolo.detect.DetectionTrainer): 11 | """ 12 | A class extending the DetectionTrainer class for training based on an Oriented Bounding Box (OBB) model. 13 | 14 | Example: 15 | ```python 16 | from ultralytics.models.yolo.obb import OBBTrainer 17 | 18 | args = dict(model='yolov8n-obb.pt', data='dota8.yaml', epochs=3) 19 | trainer = OBBTrainer(overrides=args) 20 | trainer.train() 21 | ``` 22 | """ 23 | 24 | def __init__(self, cfg=DEFAULT_CFG, overrides=None, _callbacks=None): 25 | """Initialize a OBBTrainer object with given arguments.""" 26 | if overrides is None: 27 | overrides = {} 28 | overrides["task"] = "obb" 29 | super().__init__(cfg, overrides, _callbacks) 30 | 31 | def get_model(self, cfg=None, weights=None, verbose=True): 32 | """Return OBBModel initialized with specified config and weights.""" 33 | model = OBBModel(cfg, ch=3, nc=self.data["nc"], verbose=verbose and RANK == -1) 34 | if weights: 35 | model.load(weights) 36 | 37 | return model 38 | 39 | def get_validator(self): 40 | """Return an instance of OBBValidator for validation of YOLO model.""" 41 | self.loss_names = "box_loss", "cls_loss", "dfl_loss" 42 | return yolo.obb.OBBValidator(self.test_loader, save_dir=self.save_dir, args=copy(self.args)) 43 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n+EMA.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | backbone: 8 | # [from, repeats, module, args] 9 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 10 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 11 | - [-1, 3, C2f, [128, True]] 12 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 13 | - [-1, 6, C2f, [256, True]] 14 | - [-1, 1, SCDown, [512, 3, 2]] # 5-P4/16 15 | - [-1, 6, C2f, [512, True]] 16 | - [-1, 1, SCDown, [1024, 3, 2]] # 7-P5/32 17 | - [-1, 3, C2f, [1024, True]] 18 | - [-1, 1, SPPF, [1024, 5]] # 9 19 | - [-1, 1, PSA, [1024]] # 10 20 | 21 | # YOLOv10n head 22 | head: 23 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 24 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 25 | - [-1, 3, C2f, [512]] # 13 26 | 27 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 28 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 29 | - [-1, 3, C2f, [256]] # 16 (P3/8-small) 30 | - [-1, 1, EMA, []] # 17 (P3/8-small) 小目标检测层输出位置增加注意力机制 31 | 32 | - [-1, 1, Conv, [256, 3, 2]] 33 | - [[-1, 13], 1, Concat, [1]] # cat head P4 34 | - [-1, 3, C2f, [512]] # 20 (P4/16-medium) 35 | - [-1, 1, EMA, []] # 21 (P4/16-medium) 中目标检测层输出位置增加注意力机制 36 | 37 | - [-1, 1, SCDown, [512, 3, 2]] 38 | - [[-1, 10], 1, Concat, [1]] # cat head P5 39 | - [-1, 3, C2fCIB, [1024, True, True]] # 24 (P5/32-large) 40 | - [-1, 1, EMA, []] # 25 (P5/32-large) 大目标检测层输出位置增加注意力机制 41 | 42 | # 如果配置注意力位置注意from[17, 21, 25]位置要对应上对应的检测层! 43 | - [[17, 21, 25], 1, v10Detect, [nc]] # Detect(P3, P4, P5) 44 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n-tov8-2+C2f-DualConv+EMA.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 11 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 12 | - [-1, 3, C2f_Dual, [128, True]] 13 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 14 | - [-1, 6, C2f_Dual, [256, True]] 15 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 16 | - [-1, 6, C2f_Dual, [512, True]] 17 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 18 | - [-1, 3, C2f_Dual, [1024, True]] 19 | - [-1, 1, SPPF, [1024, 5]] # 9 20 | - [-1, 1, PSA, [1024]] # 10 21 | 22 | 23 | # YOLOv8.0n head 24 | head: 25 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 26 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 27 | - [-1, 3, C2f, [512]] # 13 28 | 29 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 30 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 31 | - [-1, 3, C2f, [256]] # 16 (P3/8-small) 32 | - [-1, 1, EMA, []] # 17 (P3/8-small) 小目标检测层输出位置增加注意力机制 33 | 34 | - [-1, 1, Conv, [256, 3, 2]] 35 | - [[-1, 12], 1, Concat, [1]] # cat head P4 36 | - [-1, 3, C2f, [512]] # 20 (P4/16-medium) 37 | - [-1, 1, EMA, []] # 21 (P4/16-medium) 中目标检测层输出位置增加注意力机制 38 | 39 | - [-1, 1, Conv, [512, 3, 2]] 40 | - [[-1, 9], 1, Concat, [1]] # cat head P5 41 | - [-1, 3, C2fCIB, [1024, True, True]] # 24 (P5/32-large) 42 | - [-1, 1, EMA, []] # 25 (P5/32-large) 大目标检测层输出位置增加注意力机制 43 | 44 | - [[17, 21, 25], 1, Detect, [nc]] # Detect(P3, P4, P5) 45 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v8/yolov8-seg.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | # YOLOv8-seg instance segmentation model. For Usage examples see https://docs.ultralytics.com/tasks/segment 3 | 4 | # Parameters 5 | nc: 80 # number of classes 6 | scales: # model compound scaling constants, i.e. 'model=yolov8n-seg.yaml' will call yolov8-seg.yaml with scale 'n' 7 | # [depth, width, max_channels] 8 | n: [0.33, 0.25, 1024] 9 | s: [0.33, 0.50, 1024] 10 | m: [0.67, 0.75, 768] 11 | l: [1.00, 1.00, 512] 12 | x: [1.00, 1.25, 512] 13 | 14 | # YOLOv8.0n backbone 15 | backbone: 16 | # [from, repeats, module, args] 17 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 18 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 19 | - [-1, 3, C2f, [128, True]] 20 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 21 | - [-1, 6, C2f, [256, True]] 22 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 23 | - [-1, 6, C2f, [512, True]] 24 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 25 | - [-1, 3, C2f, [1024, True]] 26 | - [-1, 1, SPPF, [1024, 5]] # 9 27 | 28 | # YOLOv8.0n head 29 | head: 30 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 31 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 32 | - [-1, 3, C2f, [512]] # 12 33 | 34 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 35 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 36 | - [-1, 3, C2f, [256]] # 15 (P3/8-small) 37 | 38 | - [-1, 1, Conv, [256, 3, 2]] 39 | - [[-1, 12], 1, Concat, [1]] # cat head P4 40 | - [-1, 3, C2f, [512]] # 18 (P4/16-medium) 41 | 42 | - [-1, 1, Conv, [512, 3, 2]] 43 | - [[-1, 9], 1, Concat, [1]] # cat head P5 44 | - [-1, 3, C2f, [1024]] # 21 (P5/32-large) 45 | 46 | - [[15, 18, 21], 1, Segment, [nc, 32, 256]] # Segment(P3, P4, P5) 47 | -------------------------------------------------------------------------------- /docs/en/reference/utils/plotting.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Master advanced plotting utils from Ultralytics including color annotations, label and image plotting, and feature visualization. 3 | keywords: Ultralytics, plotting, utils, color annotation, label plotting, image plotting, feature visualization 4 | --- 5 | 6 | # Reference for `ultralytics/utils/plotting.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/plotting.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/plotting.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/utils/plotting.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.utils.plotting.Colors 15 | 16 |

17 | 18 | ## ::: ultralytics.utils.plotting.Annotator 19 | 20 |

21 | 22 | ## ::: ultralytics.utils.plotting.plot_labels 23 | 24 |

25 | 26 | ## ::: ultralytics.utils.plotting.save_one_box 27 | 28 |

29 | 30 | ## ::: ultralytics.utils.plotting.plot_images 31 | 32 |

33 | 34 | ## ::: ultralytics.utils.plotting.plot_results 35 | 36 |

37 | 38 | ## ::: ultralytics.utils.plotting.plt_color_scatter 39 | 40 |

41 | 42 | ## ::: ultralytics.utils.plotting.plot_tune_results 43 | 44 |

45 | 46 | ## ::: ultralytics.utils.plotting.output_to_target 47 | 48 |

49 | 50 | ## ::: ultralytics.utils.plotting.output_to_rotated_target 51 | 52 |

53 | 54 | ## ::: ultralytics.utils.plotting.feature_visualization 55 | 56 |

57 | -------------------------------------------------------------------------------- /ultralytics/models/yolov10/predict.py: -------------------------------------------------------------------------------- 1 | from ultralytics.models.yolo.detect import DetectionPredictor 2 | import torch 3 | from ultralytics.utils import ops 4 | from ultralytics.engine.results import Results 5 | 6 | 7 | class YOLOv10DetectionPredictor(DetectionPredictor): 8 | def postprocess(self, preds, img, orig_imgs): 9 | if isinstance(preds, dict): 10 | preds = preds["one2one"] 11 | 12 | if isinstance(preds, (list, tuple)): 13 | preds = preds[0] 14 | 15 | if preds.shape[-1] == 6: 16 | pass 17 | else: 18 | preds = preds.transpose(-1, -2) 19 | bboxes, scores, labels = ops.v10postprocess(preds, self.args.max_det, preds.shape[-1]-4) 20 | bboxes = ops.xywh2xyxy(bboxes) 21 | preds = torch.cat([bboxes, scores.unsqueeze(-1), labels.unsqueeze(-1)], dim=-1) 22 | 23 | mask = preds[..., 4] > self.args.conf 24 | if self.args.classes is not None: 25 | mask = mask & (preds[..., 5:6] == torch.tensor(self.args.classes, device=preds.device).unsqueeze(0)).any(2) 26 | 27 | preds = [p[mask[idx]] for idx, p in enumerate(preds)] 28 | 29 | if not isinstance(orig_imgs, list): # input images are a torch.Tensor, not a list 30 | orig_imgs = ops.convert_torch2numpy_batch(orig_imgs) 31 | 32 | results = [] 33 | for i, pred in enumerate(preds): 34 | orig_img = orig_imgs[i] 35 | pred[:, :4] = ops.scale_boxes(img.shape[2:], pred[:, :4], orig_img.shape) 36 | img_path = self.batch[0][i] 37 | results.append(Results(orig_img, path=img_path, names=self.model.names, boxes=pred)) 38 | return results 39 | -------------------------------------------------------------------------------- /ultralytics/models/yolo/detect/predict.py: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | 3 | from ultralytics.engine.predictor import BasePredictor 4 | from ultralytics.engine.results import Results 5 | from ultralytics.utils import ops 6 | 7 | 8 | class DetectionPredictor(BasePredictor): 9 | """ 10 | A class extending the BasePredictor class for prediction based on a detection model. 11 | 12 | Example: 13 | ```python 14 | from ultralytics.utils import ASSETS 15 | from ultralytics.models.yolo.detect import DetectionPredictor 16 | 17 | args = dict(model='yolov8n.pt', source=ASSETS) 18 | predictor = DetectionPredictor(overrides=args) 19 | predictor.predict_cli() 20 | ``` 21 | """ 22 | 23 | def postprocess(self, preds, img, orig_imgs): 24 | """Post-processes predictions and returns a list of Results objects.""" 25 | preds = ops.non_max_suppression( 26 | preds, 27 | self.args.conf, 28 | self.args.iou, 29 | agnostic=self.args.agnostic_nms, 30 | max_det=self.args.max_det, 31 | classes=self.args.classes, 32 | ) 33 | 34 | if not isinstance(orig_imgs, list): # input images are a torch.Tensor, not a list 35 | orig_imgs = ops.convert_torch2numpy_batch(orig_imgs) 36 | 37 | results = [] 38 | for i, pred in enumerate(preds): 39 | orig_img = orig_imgs[i] 40 | pred[:, :4] = ops.scale_boxes(img.shape[2:], pred[:, :4], orig_img.shape) 41 | img_path = self.batch[0][i] 42 | results.append(Results(orig_img, path=img_path, names=self.model.names, boxes=pred)) 43 | return results 44 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/rt-detr/rtdetr-resnet50.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | # RT-DETR-ResNet50 object detection model with P3-P5 outputs. 3 | 4 | # Parameters 5 | nc: 80 # number of classes 6 | scales: # model compound scaling constants, i.e. 'model=yolov8n-cls.yaml' will call yolov8-cls.yaml with scale 'n' 7 | # [depth, width, max_channels] 8 | l: [1.00, 1.00, 1024] 9 | 10 | backbone: 11 | # [from, repeats, module, args] 12 | - [-1, 1, ResNetLayer, [3, 64, 1, True, 1]] # 0 13 | - [-1, 1, ResNetLayer, [64, 64, 1, False, 3]] # 1 14 | - [-1, 1, ResNetLayer, [256, 128, 2, False, 4]] # 2 15 | - [-1, 1, ResNetLayer, [512, 256, 2, False, 6]] # 3 16 | - [-1, 1, ResNetLayer, [1024, 512, 2, False, 3]] # 4 17 | 18 | head: 19 | - [-1, 1, Conv, [256, 1, 1, None, 1, 1, False]] # 5 20 | - [-1, 1, AIFI, [1024, 8]] 21 | - [-1, 1, Conv, [256, 1, 1]] # 7 22 | 23 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 24 | - [3, 1, Conv, [256, 1, 1, None, 1, 1, False]] # 9 25 | - [[-2, -1], 1, Concat, [1]] 26 | - [-1, 3, RepC3, [256]] # 11 27 | - [-1, 1, Conv, [256, 1, 1]] # 12 28 | 29 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 30 | - [2, 1, Conv, [256, 1, 1, None, 1, 1, False]] # 14 31 | - [[-2, -1], 1, Concat, [1]] # cat backbone P4 32 | - [-1, 3, RepC3, [256]] # X3 (16), fpn_blocks.1 33 | 34 | - [-1, 1, Conv, [256, 3, 2]] # 17, downsample_convs.0 35 | - [[-1, 12], 1, Concat, [1]] # cat Y4 36 | - [-1, 3, RepC3, [256]] # F4 (19), pan_blocks.0 37 | 38 | - [-1, 1, Conv, [256, 3, 2]] # 20, downsample_convs.1 39 | - [[-1, 7], 1, Concat, [1]] # cat Y5 40 | - [-1, 3, RepC3, [256]] # F5 (22), pan_blocks.1 41 | 42 | - [[16, 19, 22], 1, RTDETRDecoder, [nc]] # Detect(P3, P4, P5) 43 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10m.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | # YOLOv8 object detection model with P3-P5 outputs. For Usage examples see https://docs.ultralytics.com/tasks/detect 3 | 4 | # Parameters 5 | nc: 80 # number of classes 6 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 7 | # [depth, width, max_channels] 8 | m: [0.67, 0.75, 768] # YOLOv8m summary: 295 layers, 25902640 parameters, 25902624 gradients, 79.3 GFLOPs 9 | 10 | # YOLOv8.0n backbone 11 | backbone: 12 | # [from, repeats, module, args] 13 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 14 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 15 | - [-1, 3, C2f, [128, True]] 16 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 17 | - [-1, 6, C2f, [256, True]] 18 | - [-1, 1, SCDown, [512, 3, 2]] # 5-P4/16 19 | - [-1, 6, C2f, [512, True]] 20 | - [-1, 1, SCDown, [1024, 3, 2]] # 7-P5/32 21 | - [-1, 3, C2fCIB, [1024, True]] 22 | - [-1, 1, SPPF, [1024, 5]] # 9 23 | - [-1, 1, PSA, [1024]] # 10 24 | 25 | # YOLOv8.0n head 26 | head: 27 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 28 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 29 | - [-1, 3, C2f, [512]] # 13 30 | 31 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 32 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 33 | - [-1, 3, C2f, [256]] # 16 (P3/8-small) 34 | 35 | - [-1, 1, Conv, [256, 3, 2]] 36 | - [[-1, 13], 1, Concat, [1]] # cat head P4 37 | - [-1, 3, C2fCIB, [512, True]] # 19 (P4/16-medium) 38 | 39 | - [-1, 1, SCDown, [512, 3, 2]] 40 | - [[-1, 10], 1, Concat, [1]] # cat head P5 41 | - [-1, 3, C2fCIB, [1024, True]] # 22 (P5/32-large) 42 | 43 | - [[16, 19, 22], 1, v10Detect, [nc]] # Detect(P3, P4, P5) 44 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/rt-detr/rtdetr-resnet101.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | # RT-DETR-ResNet101 object detection model with P3-P5 outputs. 3 | 4 | # Parameters 5 | nc: 80 # number of classes 6 | scales: # model compound scaling constants, i.e. 'model=yolov8n-cls.yaml' will call yolov8-cls.yaml with scale 'n' 7 | # [depth, width, max_channels] 8 | l: [1.00, 1.00, 1024] 9 | 10 | backbone: 11 | # [from, repeats, module, args] 12 | - [-1, 1, ResNetLayer, [3, 64, 1, True, 1]] # 0 13 | - [-1, 1, ResNetLayer, [64, 64, 1, False, 3]] # 1 14 | - [-1, 1, ResNetLayer, [256, 128, 2, False, 4]] # 2 15 | - [-1, 1, ResNetLayer, [512, 256, 2, False, 23]] # 3 16 | - [-1, 1, ResNetLayer, [1024, 512, 2, False, 3]] # 4 17 | 18 | head: 19 | - [-1, 1, Conv, [256, 1, 1, None, 1, 1, False]] # 5 20 | - [-1, 1, AIFI, [1024, 8]] 21 | - [-1, 1, Conv, [256, 1, 1]] # 7 22 | 23 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 24 | - [3, 1, Conv, [256, 1, 1, None, 1, 1, False]] # 9 25 | - [[-2, -1], 1, Concat, [1]] 26 | - [-1, 3, RepC3, [256]] # 11 27 | - [-1, 1, Conv, [256, 1, 1]] # 12 28 | 29 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 30 | - [2, 1, Conv, [256, 1, 1, None, 1, 1, False]] # 14 31 | - [[-2, -1], 1, Concat, [1]] # cat backbone P4 32 | - [-1, 3, RepC3, [256]] # X3 (16), fpn_blocks.1 33 | 34 | - [-1, 1, Conv, [256, 3, 2]] # 17, downsample_convs.0 35 | - [[-1, 12], 1, Concat, [1]] # cat Y4 36 | - [-1, 3, RepC3, [256]] # F4 (19), pan_blocks.0 37 | 38 | - [-1, 1, Conv, [256, 3, 2]] # 20, downsample_convs.1 39 | - [[-1, 7], 1, Concat, [1]] # cat Y5 40 | - [-1, 3, RepC3, [256]] # F5 (22), pan_blocks.1 41 | 42 | - [[16, 19, 22], 1, RTDETRDecoder, [nc]] # Detect(P3, P4, P5) 43 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v3/yolov3.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | # YOLOv3 object detection model with P3-P5 outputs. For details see https://docs.ultralytics.com/models/yolov3 3 | 4 | # Parameters 5 | nc: 80 # number of classes 6 | depth_multiple: 1.0 # model depth multiple 7 | width_multiple: 1.0 # layer channel multiple 8 | 9 | # darknet53 backbone 10 | backbone: 11 | # [from, number, module, args] 12 | - [-1, 1, Conv, [32, 3, 1]] # 0 13 | - [-1, 1, Conv, [64, 3, 2]] # 1-P1/2 14 | - [-1, 1, Bottleneck, [64]] 15 | - [-1, 1, Conv, [128, 3, 2]] # 3-P2/4 16 | - [-1, 2, Bottleneck, [128]] 17 | - [-1, 1, Conv, [256, 3, 2]] # 5-P3/8 18 | - [-1, 8, Bottleneck, [256]] 19 | - [-1, 1, Conv, [512, 3, 2]] # 7-P4/16 20 | - [-1, 8, Bottleneck, [512]] 21 | - [-1, 1, Conv, [1024, 3, 2]] # 9-P5/32 22 | - [-1, 4, Bottleneck, [1024]] # 10 23 | 24 | # YOLOv3 head 25 | head: 26 | - [-1, 1, Bottleneck, [1024, False]] 27 | - [-1, 1, Conv, [512, 1, 1]] 28 | - [-1, 1, Conv, [1024, 3, 1]] 29 | - [-1, 1, Conv, [512, 1, 1]] 30 | - [-1, 1, Conv, [1024, 3, 1]] # 15 (P5/32-large) 31 | 32 | - [-2, 1, Conv, [256, 1, 1]] 33 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 34 | - [[-1, 8], 1, Concat, [1]] # cat backbone P4 35 | - [-1, 1, Bottleneck, [512, False]] 36 | - [-1, 1, Bottleneck, [512, False]] 37 | - [-1, 1, Conv, [256, 1, 1]] 38 | - [-1, 1, Conv, [512, 3, 1]] # 22 (P4/16-medium) 39 | 40 | - [-2, 1, Conv, [128, 1, 1]] 41 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 42 | - [[-1, 6], 1, Concat, [1]] # cat backbone P3 43 | - [-1, 1, Bottleneck, [256, False]] 44 | - [-1, 2, Bottleneck, [256, False]] # 27 (P3/8-small) 45 | 46 | - [[27, 22, 15], 1, Detect, [nc]] # Detect(P3, P4, P5) 47 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v3/yolov3-spp.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | # YOLOv3-SPP object detection model with P3-P5 outputs. For details see https://docs.ultralytics.com/models/yolov3 3 | 4 | # Parameters 5 | nc: 80 # number of classes 6 | depth_multiple: 1.0 # model depth multiple 7 | width_multiple: 1.0 # layer channel multiple 8 | 9 | # darknet53 backbone 10 | backbone: 11 | # [from, number, module, args] 12 | - [-1, 1, Conv, [32, 3, 1]] # 0 13 | - [-1, 1, Conv, [64, 3, 2]] # 1-P1/2 14 | - [-1, 1, Bottleneck, [64]] 15 | - [-1, 1, Conv, [128, 3, 2]] # 3-P2/4 16 | - [-1, 2, Bottleneck, [128]] 17 | - [-1, 1, Conv, [256, 3, 2]] # 5-P3/8 18 | - [-1, 8, Bottleneck, [256]] 19 | - [-1, 1, Conv, [512, 3, 2]] # 7-P4/16 20 | - [-1, 8, Bottleneck, [512]] 21 | - [-1, 1, Conv, [1024, 3, 2]] # 9-P5/32 22 | - [-1, 4, Bottleneck, [1024]] # 10 23 | 24 | # YOLOv3-SPP head 25 | head: 26 | - [-1, 1, Bottleneck, [1024, False]] 27 | - [-1, 1, SPP, [512, [5, 9, 13]]] 28 | - [-1, 1, Conv, [1024, 3, 1]] 29 | - [-1, 1, Conv, [512, 1, 1]] 30 | - [-1, 1, Conv, [1024, 3, 1]] # 15 (P5/32-large) 31 | 32 | - [-2, 1, Conv, [256, 1, 1]] 33 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 34 | - [[-1, 8], 1, Concat, [1]] # cat backbone P4 35 | - [-1, 1, Bottleneck, [512, False]] 36 | - [-1, 1, Bottleneck, [512, False]] 37 | - [-1, 1, Conv, [256, 1, 1]] 38 | - [-1, 1, Conv, [512, 3, 1]] # 22 (P4/16-medium) 39 | 40 | - [-2, 1, Conv, [128, 1, 1]] 41 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 42 | - [[-1, 6], 1, Concat, [1]] # cat backbone P3 43 | - [-1, 1, Bottleneck, [256, False]] 44 | - [-1, 2, Bottleneck, [256, False]] # 27 (P3/8-small) 45 | 46 | - [[27, 22, 15], 1, Detect, [nc]] # Detect(P3, P4, P5) 47 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n-tov8-2+EMA+FasterBlock.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 11 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 12 | - [-1, 3, C2f_FasterBlock, [128, True]] 13 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 14 | - [-1, 6, C2f_FasterBlock, [256, True]] 15 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 16 | - [-1, 6, C2f_FasterBlock, [512, True]] 17 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 18 | - [-1, 3, C2f_FasterBlock, [1024, True]] 19 | - [-1, 1, SPPF, [1024, 5]] # 9 20 | - [-1, 1, PSA, [1024]] # 10 21 | 22 | 23 | # YOLOv8.0n head 24 | head: 25 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 26 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 27 | - [-1, 3, C2f_FasterBlock, [512]] # 13 28 | 29 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 30 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 31 | - [-1, 3, C2f_FasterBlock, [256]] # 16 (P3/8-small) 32 | - [-1, 1, EMA, []] # 17 (P3/8-small) 小目标检测层输出位置增加注意力机制 33 | 34 | - [-1, 1, Conv, [256, 3, 2]] 35 | - [[-1, 13], 1, Concat, [1]] # cat head P4 36 | - [-1, 3, C2f_FasterBlock, [512]] # 20 (P4/16-medium) 37 | - [-1, 1, EMA, []] # 21 (P4/16-medium) 中目标检测层输出位置增加注意力机制 38 | 39 | - [-1, 1, Conv, [512, 3, 2]] 40 | - [[-1, 10], 1, Concat, [1]] # cat head P5 41 | - [-1, 3, C2fCIB, [1024, True, True]] # 24 (P5/32-large) 42 | - [-1, 1, EMA, []] # 25 (P5/32-large) 大目标检测层输出位置增加注意力机制 43 | 44 | - [[17, 21, 25], 1, Detect, [nc]] # Detect(P3, P4, P5) 45 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v5/yolov5.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | # YOLOv5 object detection model with P3-P5 outputs. For details see https://docs.ultralytics.com/models/yolov5 3 | 4 | # Parameters 5 | nc: 80 # number of classes 6 | scales: # model compound scaling constants, i.e. 'model=yolov5n.yaml' will call yolov5.yaml with scale 'n' 7 | # [depth, width, max_channels] 8 | n: [0.33, 0.25, 1024] 9 | s: [0.33, 0.50, 1024] 10 | m: [0.67, 0.75, 1024] 11 | l: [1.00, 1.00, 1024] 12 | x: [1.33, 1.25, 1024] 13 | 14 | # YOLOv5 v6.0 backbone 15 | backbone: 16 | # [from, number, module, args] 17 | - [-1, 1, Conv, [64, 6, 2, 2]] # 0-P1/2 18 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 19 | - [-1, 3, C3, [128]] 20 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 21 | - [-1, 6, C3, [256]] 22 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 23 | - [-1, 9, C3, [512]] 24 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 25 | - [-1, 3, C3, [1024]] 26 | - [-1, 1, SPPF, [1024, 5]] # 9 27 | 28 | # YOLOv5 v6.0 head 29 | head: 30 | - [-1, 1, Conv, [512, 1, 1]] 31 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 32 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 33 | - [-1, 3, C3, [512, False]] # 13 34 | 35 | - [-1, 1, Conv, [256, 1, 1]] 36 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 37 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 38 | - [-1, 3, C3, [256, False]] # 17 (P3/8-small) 39 | 40 | - [-1, 1, Conv, [256, 3, 2]] 41 | - [[-1, 14], 1, Concat, [1]] # cat head P4 42 | - [-1, 3, C3, [512, False]] # 20 (P4/16-medium) 43 | 44 | - [-1, 1, Conv, [512, 3, 2]] 45 | - [[-1, 10], 1, Concat, [1]] # cat head P5 46 | - [-1, 3, C3, [1024, False]] # 23 (P5/32-large) 47 | 48 | - [[17, 20, 23], 1, Detect, [nc]] # Detect(P3, P4, P5) 49 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v10/yolov10n-tov8-2+EMA+FasterBlock-1.yaml: -------------------------------------------------------------------------------- 1 | # Parameters 2 | nc: 200 # number of classes 3 | scales: # model compound scaling constants, i.e. 'model=yolov8n.yaml' will call yolov8.yaml with scale 'n' 4 | # [depth, width, max_channels] 5 | n: [0.33, 0.25, 1024] 6 | 7 | # YOLOv8.0n backbone 8 | backbone: 9 | # [from, repeats, module, args] 10 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 11 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 12 | - [-1, 3, C2f_FasterBlock, [128, True]] 13 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 14 | - [-1, 6, C2f_FasterBlock, [256, True]] 15 | - [-1, 1, SCDown, [512, 3, 2]] # 5-P4/16 16 | - [-1, 6, C2f_FasterBlock, [512, True]] 17 | - [-1, 1, SCDown, [1024, 3, 2]] # 7-P5/32 18 | - [-1, 3, C2f_FasterBlock, [1024, True]] 19 | - [-1, 1, SPPF, [1024, 5]] # 9 20 | - [-1, 1, PSA, [1024]] # 10 21 | 22 | 23 | # YOLOv8.0n head 24 | head: 25 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 26 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 27 | - [-1, 3, C2f_FasterBlock, [512]] # 13 28 | 29 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 30 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 31 | - [-1, 3, C2f_FasterBlock, [256]] # 16 (P3/8-small) 32 | - [-1, 1, EMA, []] # 17 (P3/8-small) 小目标检测层输出位置增加注意力机制 33 | 34 | - [-1, 1, Conv, [256, 3, 2]] 35 | - [[-1, 13], 1, Concat, [1]] # cat head P4 36 | - [-1, 3, C2f_FasterBlock, [512]] # 20 (P4/16-medium) 37 | - [-1, 1, EMA, []] # 21 (P4/16-medium) 中目标检测层输出位置增加注意力机制 38 | 39 | - [-1, 1, SCDown, [512, 3, 2]] 40 | - [[-1, 10], 1, Concat, [1]] # cat head P5 41 | - [-1, 3, C2fCIB, [1024, True, True]] # 24 (P5/32-large) 42 | - [-1, 1, EMA, []] # 25 (P5/32-large) 大目标检测层输出位置增加注意力机制 43 | 44 | - [[17, 21, 25], 1, Detect, [nc]] # Detect(P3, P4, P5) 45 | -------------------------------------------------------------------------------- /docs/overrides/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | /* Table format like GitHub ----------------------------------------------------------------------------------------- */ 2 | th, 3 | td { 4 | border: 1px solid var(--md-typeset-table-color); 5 | border-spacing: 0; 6 | border-bottom: none; 7 | border-left: none; 8 | border-top: none; 9 | } 10 | 11 | .md-typeset__table { 12 | line-height: 1; 13 | } 14 | 15 | .md-typeset__table table:not([class]) { 16 | font-size: 0.74rem; 17 | border-right: none; 18 | } 19 | 20 | .md-typeset__table table:not([class]) td, 21 | .md-typeset__table table:not([class]) th { 22 | padding: 9px; 23 | } 24 | 25 | /* light mode alternating table bg colors */ 26 | .md-typeset__table tr:nth-child(2n) { 27 | background-color: #f6f8fa; 28 | } 29 | 30 | /* dark mode alternating table bg colors */ 31 | [data-md-color-scheme="slate"] .md-typeset__table tr:nth-child(2n) { 32 | background-color: #161b22; 33 | } 34 | /* Table format like GitHub ----------------------------------------------------------------------------------------- */ 35 | 36 | /* Code block vertical scroll */ 37 | div.highlight { 38 | max-height: 20rem; 39 | overflow-y: auto; /* for adding a scrollbar when needed */ 40 | } 41 | 42 | /* Set content width */ 43 | .md-grid { 44 | max-width: 1440px; 45 | } 46 | 47 | /* Set language dropdown maximum height to screen height */ 48 | .md-header .md-select:hover .md-select__inner { 49 | max-height: 75vh; 50 | } 51 | 52 | /* Update the background of the banner (same as the one on the Ultralytics website) */ 53 | .md-banner { 54 | background-image: url(https://uploads-ssl.webflow.com/646dd1f1a3703e451ba81ecc/65e60cd6a4080bba757850a3_banner_ct.webp); 55 | background-size: cover; 56 | background-position: center; 57 | } 58 | -------------------------------------------------------------------------------- /docs/en/reference/models/sam/amg.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore Ultralytics methods for mask data processing, transformation and encoding. Deepen your understanding of RLE encoding, image cropping and more. 3 | keywords: Ultralytics, Mask Data, Transformation, Encoding, RLE encoding, Image cropping, Pytorch, SAM, AMG, Ultralytics model 4 | --- 5 | 6 | # Reference for `ultralytics/models/sam/amg.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/amg.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/amg.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/amg.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.sam.amg.is_box_near_crop_edge 15 | 16 |

17 | 18 | ## ::: ultralytics.models.sam.amg.batch_iterator 19 | 20 |

21 | 22 | ## ::: ultralytics.models.sam.amg.calculate_stability_score 23 | 24 |

25 | 26 | ## ::: ultralytics.models.sam.amg.build_point_grid 27 | 28 |

29 | 30 | ## ::: ultralytics.models.sam.amg.build_all_layer_point_grids 31 | 32 |

33 | 34 | ## ::: ultralytics.models.sam.amg.generate_crop_boxes 35 | 36 |

37 | 38 | ## ::: ultralytics.models.sam.amg.uncrop_boxes_xyxy 39 | 40 |

41 | 42 | ## ::: ultralytics.models.sam.amg.uncrop_points 43 | 44 |

45 | 46 | ## ::: ultralytics.models.sam.amg.uncrop_masks 47 | 48 |

49 | 50 | ## ::: ultralytics.models.sam.amg.remove_small_regions 51 | 52 |

53 | 54 | ## ::: ultralytics.models.sam.amg.batched_mask_to_box 55 | 56 |

57 | -------------------------------------------------------------------------------- /ultralytics/cfg/models/v8/yolov8-pose.yaml: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | # YOLOv8-pose keypoints/pose estimation model. For Usage examples see https://docs.ultralytics.com/tasks/pose 3 | 4 | # Parameters 5 | nc: 1 # number of classes 6 | kpt_shape: [17, 3] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible) 7 | scales: # model compound scaling constants, i.e. 'model=yolov8n-pose.yaml' will call yolov8-pose.yaml with scale 'n' 8 | # [depth, width, max_channels] 9 | n: [0.33, 0.25, 1024] 10 | s: [0.33, 0.50, 1024] 11 | m: [0.67, 0.75, 768] 12 | l: [1.00, 1.00, 512] 13 | x: [1.00, 1.25, 512] 14 | 15 | # YOLOv8.0n backbone 16 | backbone: 17 | # [from, repeats, module, args] 18 | - [-1, 1, Conv, [64, 3, 2]] # 0-P1/2 19 | - [-1, 1, Conv, [128, 3, 2]] # 1-P2/4 20 | - [-1, 3, C2f, [128, True]] 21 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8 22 | - [-1, 6, C2f, [256, True]] 23 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16 24 | - [-1, 6, C2f, [512, True]] 25 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32 26 | - [-1, 3, C2f, [1024, True]] 27 | - [-1, 1, SPPF, [1024, 5]] # 9 28 | 29 | # YOLOv8.0n head 30 | head: 31 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 32 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4 33 | - [-1, 3, C2f, [512]] # 12 34 | 35 | - [-1, 1, nn.Upsample, [None, 2, "nearest"]] 36 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3 37 | - [-1, 3, C2f, [256]] # 15 (P3/8-small) 38 | 39 | - [-1, 1, Conv, [256, 3, 2]] 40 | - [[-1, 12], 1, Concat, [1]] # cat head P4 41 | - [-1, 3, C2f, [512]] # 18 (P4/16-medium) 42 | 43 | - [-1, 1, Conv, [512, 3, 2]] 44 | - [[-1, 9], 1, Concat, [1]] # cat head P5 45 | - [-1, 3, C2f, [1024]] # 21 (P5/32-large) 46 | 47 | - [[15, 18, 21], 1, Pose, [nc, kpt_shape]] # Pose(P3, P4, P5) 48 | -------------------------------------------------------------------------------- /docs/en/reference/nn/modules/transformer.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Learn about Ultralytics transformer encoder, layer, MLP block, LayerNorm2d and the deformable transformer decoder layer. Expand your understanding of these crucial AI modules. 3 | keywords: Ultralytics, Ultralytics documentation, TransformerEncoderLayer, TransformerLayer, MLPBlock, LayerNorm2d, DeformableTransformerDecoderLayer 4 | --- 5 | 6 | # Reference for `ultralytics/nn/modules/transformer.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/transformer.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/transformer.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/modules/transformer.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.nn.modules.transformer.TransformerEncoderLayer 15 | 16 |

17 | 18 | ## ::: ultralytics.nn.modules.transformer.AIFI 19 | 20 |

21 | 22 | ## ::: ultralytics.nn.modules.transformer.TransformerLayer 23 | 24 |

25 | 26 | ## ::: ultralytics.nn.modules.transformer.TransformerBlock 27 | 28 |

29 | 30 | ## ::: ultralytics.nn.modules.transformer.MLPBlock 31 | 32 |

33 | 34 | ## ::: ultralytics.nn.modules.transformer.MLP 35 | 36 |

37 | 38 | ## ::: ultralytics.nn.modules.transformer.LayerNorm2d 39 | 40 |

41 | 42 | ## ::: ultralytics.nn.modules.transformer.MSDeformAttn 43 | 44 |

45 | 46 | ## ::: ultralytics.nn.modules.transformer.DeformableTransformerDecoderLayer 47 | 48 |

49 | 50 | ## ::: ultralytics.nn.modules.transformer.DeformableTransformerDecoder 51 | 52 |

53 | -------------------------------------------------------------------------------- /docs/en/reference/cfg/__init__.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore Ultralytics cfg functions like cfg2dict, handle_deprecation, merge_equal_args & more to handle YOLO settings and configurations efficiently. 3 | keywords: Ultralytics, YOLO, Configuration, cfg2dict, handle_deprecation, merge_equals_args, handle_yolo_settings, copy_default_cfg, Image Detection 4 | --- 5 | 6 | # Reference for `ultralytics/cfg/__init__.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/__init__.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/__init__.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/cfg/__init__.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.cfg.cfg2dict 15 | 16 |

17 | 18 | ## ::: ultralytics.cfg.get_cfg 19 | 20 |

21 | 22 | ## ::: ultralytics.cfg.check_cfg 23 | 24 |

25 | 26 | ## ::: ultralytics.cfg.get_save_dir 27 | 28 |

29 | 30 | ## ::: ultralytics.cfg._handle_deprecation 31 | 32 |

33 | 34 | ## ::: ultralytics.cfg.check_dict_alignment 35 | 36 |

37 | 38 | ## ::: ultralytics.cfg.merge_equals_args 39 | 40 |

41 | 42 | ## ::: ultralytics.cfg.handle_yolo_hub 43 | 44 |

45 | 46 | ## ::: ultralytics.cfg.handle_yolo_settings 47 | 48 |

49 | 50 | ## ::: ultralytics.cfg.handle_explorer 51 | 52 |

53 | 54 | ## ::: ultralytics.cfg.parse_key_value_pair 55 | 56 |

57 | 58 | ## ::: ultralytics.cfg.smart_value 59 | 60 |

61 | 62 | ## ::: ultralytics.cfg.entrypoint 63 | 64 |

65 | 66 | ## ::: ultralytics.cfg.copy_default_cfg 67 | 68 |

69 | -------------------------------------------------------------------------------- /ultralytics/models/yolov10/card.py: -------------------------------------------------------------------------------- 1 | card_template_text = """ 2 | --- 3 | license: agpl-3.0 4 | library_name: ultralytics 5 | repo_url: https://github.com/THU-MIG/yolov10 6 | tags: 7 | - object-detection 8 | - computer-vision 9 | - yolov10 10 | datasets: 11 | - detection-datasets/coco 12 | inference: false 13 | --- 14 | 15 | ### Model Description 16 | [YOLOv10: Real-Time End-to-End Object Detection](https://arxiv.org/abs/2405.14458v1) 17 | 18 | - arXiv: https://arxiv.org/abs/2405.14458v1 19 | - github: https://github.com/THU-MIG/yolov10 20 | 21 | ### Installation 22 | ``` 23 | pip install git+https://github.com/THU-MIG/yolov10.git 24 | ``` 25 | 26 | ### Training and validation 27 | ```python 28 | from ultralytics import YOLOv10 29 | 30 | model = YOLOv10.from_pretrained('jameslahm/yolov10n') 31 | # Training 32 | model.train(...) 33 | # after training, one can push to the hub 34 | model.push_to_hub("your-hf-username/yolov10-finetuned") 35 | 36 | # Validation 37 | model.val(...) 38 | ``` 39 | 40 | ### Inference 41 | 42 | Here's an end-to-end example showcasing inference on a cats image: 43 | 44 | ```python 45 | from ultralytics import YOLOv10 46 | 47 | model = YOLOv10.from_pretrained('jameslahm/yolov10n') 48 | source = 'http://images.cocodataset.org/val2017/000000039769.jpg' 49 | model.predict(source=source, save=True) 50 | ``` 51 | which shows: 52 | 53 | ![image/png](https://cdn-uploads.huggingface.co/production/uploads/628ece6054698ce61d1e7be3/tBwAsKcQA_96HCYQp7BRr.png) 54 | 55 | ### BibTeX Entry and Citation Info 56 | ``` 57 | @article{wang2024yolov10, 58 | title={YOLOv10: Real-Time End-to-End Object Detection}, 59 | author={Wang, Ao and Chen, Hui and Liu, Lihao and Chen, Kai and Lin, Zijia and Han, Jungong and Ding, Guiguang}, 60 | journal={arXiv preprint arXiv:2405.14458}, 61 | year={2024} 62 | } 63 | ``` 64 | """.strip() -------------------------------------------------------------------------------- /docker/Dockerfile-runner: -------------------------------------------------------------------------------- 1 | # Ultralytics YOLO 🚀, AGPL-3.0 license 2 | # Builds GitHub actions CI runner image for deployment to DockerHub https://hub.docker.com/r/ultralytics/ultralytics 3 | # Image is CUDA-optimized for YOLOv8 single/multi-GPU training and inference tests 4 | 5 | # Start FROM Ultralytics GPU image 6 | FROM ultralytics/ultralytics:latest 7 | 8 | # Set the working directory 9 | WORKDIR /actions-runner 10 | 11 | # Download and unpack the latest runner from https://github.com/actions/runner 12 | RUN FILENAME=actions-runner-linux-x64-2.309.0.tar.gz && \ 13 | curl -o $FILENAME -L https://github.com/actions/runner/releases/download/v2.309.0/$FILENAME && \ 14 | tar xzf $FILENAME && \ 15 | rm $FILENAME 16 | 17 | # Install runner dependencies 18 | ENV RUNNER_ALLOW_RUNASROOT=1 19 | ENV DEBIAN_FRONTEND=noninteractive 20 | RUN ./bin/installdependencies.sh && \ 21 | apt-get -y install libicu-dev 22 | 23 | # Inline ENTRYPOINT command to configure and start runner with default TOKEN and NAME 24 | ENTRYPOINT sh -c './config.sh --url https://github.com/ultralytics/ultralytics \ 25 | --token ${GITHUB_RUNNER_TOKEN:-TOKEN} \ 26 | --name ${GITHUB_RUNNER_NAME:-NAME} \ 27 | --labels gpu-latest \ 28 | --replace && \ 29 | ./run.sh' 30 | 31 | 32 | # Usage Examples ------------------------------------------------------------------------------------------------------- 33 | 34 | # Build and Push 35 | # t=ultralytics/ultralytics:latest-runner && sudo docker build -f docker/Dockerfile-runner -t $t . && sudo docker push $t 36 | 37 | # Pull and Run in detached mode with access to GPUs 0 and 1 38 | # t=ultralytics/ultralytics:latest-runner && sudo docker run -d -e GITHUB_RUNNER_TOKEN=TOKEN -e GITHUB_RUNNER_NAME=NAME --ipc=host --gpus '"device=0,1"' $t 39 | -------------------------------------------------------------------------------- /docs/en/reference/models/sam/modules/encoders.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Discover detailed information on ImageEncoderViT, PositionEmbeddingRandom, Attention, window_partition, get_rel_pos and more in Ultralytics models encoders documentation. 3 | keywords: Ultralytics, Encoders, Modules, Documentation, ImageEncoderViT, PositionEmbeddingRandom, Attention, window_partition, get_rel_pos 4 | --- 5 | 6 | # Reference for `ultralytics/models/sam/modules/encoders.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/encoders.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/encoders.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/models/sam/modules/encoders.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.models.sam.modules.encoders.ImageEncoderViT 15 | 16 |

17 | 18 | ## ::: ultralytics.models.sam.modules.encoders.PromptEncoder 19 | 20 |

21 | 22 | ## ::: ultralytics.models.sam.modules.encoders.PositionEmbeddingRandom 23 | 24 |

25 | 26 | ## ::: ultralytics.models.sam.modules.encoders.Block 27 | 28 |

29 | 30 | ## ::: ultralytics.models.sam.modules.encoders.Attention 31 | 32 |

33 | 34 | ## ::: ultralytics.models.sam.modules.encoders.PatchEmbed 35 | 36 |

37 | 38 | ## ::: ultralytics.models.sam.modules.encoders.window_partition 39 | 40 |

41 | 42 | ## ::: ultralytics.models.sam.modules.encoders.window_unpartition 43 | 44 |

45 | 46 | ## ::: ultralytics.models.sam.modules.encoders.get_rel_pos 47 | 48 |

49 | 50 | ## ::: ultralytics.models.sam.modules.encoders.add_decomposed_rel_pos 51 | 52 |

53 | -------------------------------------------------------------------------------- /docs/en/reference/nn/modules/conv.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Explore various Ultralytics convolution modules including Conv2, DWConv, ConvTranspose, GhostConv, Channel Attention and more. 3 | keywords: Ultralytics, Convolution Modules, Conv2, DWConv, ConvTranspose, GhostConv, ChannelAttention, CBAM, autopad 4 | --- 5 | 6 | # Reference for `ultralytics/nn/modules/conv.py` 7 | 8 | !!! Note 9 | 10 | This file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/conv.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/modules/conv.py). If you spot a problem please help fix it by [contributing](https://docs.ultralytics.com/help/contributing/) a [Pull Request](https://github.com/ultralytics/ultralytics/edit/main/ultralytics/nn/modules/conv.py) 🛠️. Thank you 🙏! 11 | 12 |

13 | 14 | ## ::: ultralytics.nn.modules.conv.Conv 15 | 16 |

17 | 18 | ## ::: ultralytics.nn.modules.conv.Conv2 19 | 20 |

21 | 22 | ## ::: ultralytics.nn.modules.conv.LightConv 23 | 24 |

25 | 26 | ## ::: ultralytics.nn.modules.conv.DWConv 27 | 28 |

29 | 30 | ## ::: ultralytics.nn.modules.conv.DWConvTranspose2d 31 | 32 |

33 | 34 | ## ::: ultralytics.nn.modules.conv.ConvTranspose 35 | 36 |

37 | 38 | ## ::: ultralytics.nn.modules.conv.Focus 39 | 40 |

41 | 42 | ## ::: ultralytics.nn.modules.conv.GhostConv 43 | 44 |

45 | 46 | ## ::: ultralytics.nn.modules.conv.RepConv 47 | 48 |

49 | 50 | ## ::: ultralytics.nn.modules.conv.ChannelAttention 51 | 52 |

53 | 54 | ## ::: ultralytics.nn.modules.conv.SpatialAttention 55 | 56 |

57 | 58 | ## ::: ultralytics.nn.modules.conv.CBAM 59 | 60 |

61 | 62 | ## ::: ultralytics.nn.modules.conv.Concat 63 | 64 |

65 | 66 | ## ::: ultralytics.nn.modules.conv.autopad 67 | 68 |

69 | --------------------------------------------------------------------------------