├── .DS_Store
├── LICENSE
├── README.md
├── carla
├── .gitignore
├── README.md
├── bounding_boxes.py
├── camera_utils.py
├── config
│ ├── sensors-cordinates-fixed-perception.json
│ ├── sensors-fixed-perception.json
│ ├── sensors.json
│ └── wheel.ini
├── configuration.py
├── datadescriptor.py
├── ego_vehicle.py
├── fixed_perception.py
├── main.py
├── npc_spawning.py
├── save_sensors.py
└── utils
│ ├── arg_parser.py
│ ├── g29_steering_wheel.py
│ └── weather.py
├── images
├── ego-perception-baselines.png
├── fixed-perception-baselines.png
├── related-datasets.png
└── teaser.png
├── rvt
├── .gitignore
├── LICENSE
├── README.md
├── callbacks
│ ├── custom.py
│ ├── detection.py
│ ├── gradflow.py
│ ├── utils
│ │ └── visualization.py
│ └── viz_base.py
├── config
│ ├── dataset
│ │ ├── base.yaml
│ │ ├── etrap.yaml
│ │ ├── gen1.yaml
│ │ └── gen4.yaml
│ ├── experiment
│ │ ├── gen1
│ │ │ ├── base.yaml
│ │ │ ├── default.yaml
│ │ │ ├── small.yaml
│ │ │ └── tiny.yaml
│ │ └── gen4
│ │ │ ├── base.yaml
│ │ │ ├── default.yaml
│ │ │ ├── small.yaml
│ │ │ └── tiny.yaml
│ ├── general.yaml
│ ├── model
│ │ ├── base.yaml
│ │ ├── maxvit_yolox
│ │ │ └── default.yaml
│ │ └── rnndet.yaml
│ ├── modifier.py
│ ├── train.yaml
│ └── val.yaml
├── data
│ ├── genx_utils
│ │ ├── collate.py
│ │ ├── collate_from_pytorch.py
│ │ ├── dataset_rnd.py
│ │ ├── dataset_streaming.py
│ │ ├── labels.py
│ │ ├── sequence_base.py
│ │ ├── sequence_for_streaming.py
│ │ └── sequence_rnd.py
│ └── utils
│ │ ├── augmentor.py
│ │ ├── representations.py
│ │ ├── spatial.py
│ │ ├── stream_concat_datapipe.py
│ │ ├── stream_sharded_datapipe.py
│ │ └── types.py
├── environment.yaml
├── finetune.py
├── gen4_class_labels.py
├── loggers
│ ├── utils.py
│ └── wandb_logger.py
├── models
│ ├── detection
│ │ ├── __init_.py
│ │ ├── recurrent_backbone
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ └── maxvit_rnn.py
│ │ ├── yolox
│ │ │ ├── models
│ │ │ │ ├── __init__.py
│ │ │ │ ├── losses.py
│ │ │ │ ├── network_blocks.py
│ │ │ │ └── yolo_head.py
│ │ │ └── utils
│ │ │ │ ├── __init__.py
│ │ │ │ ├── boxes.py
│ │ │ │ └── compat.py
│ │ └── yolox_extension
│ │ │ └── models
│ │ │ ├── __init__.py
│ │ │ ├── build.py
│ │ │ ├── detector.py
│ │ │ └── yolo_pafpn.py
│ └── layers
│ │ ├── maxvit
│ │ ├── __init__.py
│ │ ├── layers
│ │ │ ├── __init__.py
│ │ │ ├── activations.py
│ │ │ ├── activations_jit.py
│ │ │ ├── activations_me.py
│ │ │ ├── adaptive_avgmax_pool.py
│ │ │ ├── attention_pool2d.py
│ │ │ ├── blur_pool.py
│ │ │ ├── bottleneck_attn.py
│ │ │ ├── cbam.py
│ │ │ ├── classifier.py
│ │ │ ├── cond_conv2d.py
│ │ │ ├── config.py
│ │ │ ├── conv2d_same.py
│ │ │ ├── conv_bn_act.py
│ │ │ ├── create_act.py
│ │ │ ├── create_attn.py
│ │ │ ├── create_conv2d.py
│ │ │ ├── create_norm.py
│ │ │ ├── create_norm_act.py
│ │ │ ├── drop.py
│ │ │ ├── eca.py
│ │ │ ├── evo_norm.py
│ │ │ ├── fast_norm.py
│ │ │ ├── filter_response_norm.py
│ │ │ ├── gather_excite.py
│ │ │ ├── global_context.py
│ │ │ ├── halo_attn.py
│ │ │ ├── helpers.py
│ │ │ ├── inplace_abn.py
│ │ │ ├── lambda_layer.py
│ │ │ ├── linear.py
│ │ │ ├── median_pool.py
│ │ │ ├── mixed_conv2d.py
│ │ │ ├── ml_decoder.py
│ │ │ ├── mlp.py
│ │ │ ├── non_local_attn.py
│ │ │ ├── norm.py
│ │ │ ├── norm_act.py
│ │ │ ├── padding.py
│ │ │ ├── patch_embed.py
│ │ │ ├── pool2d_same.py
│ │ │ ├── pos_embed.py
│ │ │ ├── selective_kernel.py
│ │ │ ├── separable_conv.py
│ │ │ ├── space_to_depth.py
│ │ │ ├── split_attn.py
│ │ │ ├── split_batchnorm.py
│ │ │ ├── squeeze_excite.py
│ │ │ ├── std_conv.py
│ │ │ ├── test_time_pool.py
│ │ │ ├── trace_utils.py
│ │ │ └── weight_init.py
│ │ └── maxvit.py
│ │ └── rnn.py
├── modules
│ ├── __init__.py
│ ├── data
│ │ └── genx.py
│ ├── detection.py
│ └── utils
│ │ ├── detection.py
│ │ └── fetch.py
├── scripts
│ └── genx
│ │ ├── README.md
│ │ ├── conf_preprocess
│ │ ├── extraction
│ │ │ ├── const_count.yaml
│ │ │ └── const_duration.yaml
│ │ ├── filter_gen1.yaml
│ │ ├── filter_gen4.yaml
│ │ └── representation
│ │ │ ├── mixeddensity_stack.yaml
│ │ │ └── stacked_hist.yaml
│ │ ├── preprocess_dataset.py
│ │ └── preprocess_dataset_gen4.py
├── train.py
├── utils
│ ├── evaluation
│ │ └── prophesee
│ │ │ ├── __init__.py
│ │ │ ├── evaluation.py
│ │ │ ├── evaluator.py
│ │ │ ├── io
│ │ │ ├── __init__.py
│ │ │ ├── box_filtering.py
│ │ │ ├── box_loading.py
│ │ │ ├── dat_events_tools.py
│ │ │ ├── npy_events_tools.py
│ │ │ └── psee_loader.py
│ │ │ ├── metrics
│ │ │ ├── __init__.py
│ │ │ └── coco_eval.py
│ │ │ └── visualize
│ │ │ ├── __init__.py
│ │ │ └── vis_utils.py
│ ├── helpers.py
│ ├── padding.py
│ ├── preprocessing.py
│ └── timers.py
└── validation.py
└── ultralytics
├── .github
├── ISSUE_TEMPLATE
│ ├── bug-report.yml
│ ├── config.yml
│ ├── feature-request.yml
│ └── question.yml
├── dependabot.yml
├── translate-readme.yml
└── workflows
│ ├── ci.yaml
│ ├── cla.yml
│ ├── codeql.yaml
│ ├── docker.yaml
│ ├── greetings.yml
│ ├── links.yml
│ ├── publish.yml
│ └── stale.yml
├── .gitignore
├── .pre-commit-config.yaml
├── CITATION.cff
├── CONTRIBUTING.md
├── LICENSE
├── MANIFEST.in
├── README.md
├── README.zh-CN.md
├── docker
├── Dockerfile
├── Dockerfile-arm64
├── Dockerfile-conda
├── Dockerfile-cpu
├── Dockerfile-jetson
├── Dockerfile-python
└── Dockerfile-runner
├── docs
├── CNAME
├── README.md
├── SECURITY.md
├── assets
│ └── favicon.ico
├── build_reference.py
├── guides
│ ├── azureml-quickstart.md
│ ├── conda-quickstart.md
│ ├── docker-quickstart.md
│ ├── hyperparameter-tuning.md
│ ├── index.md
│ ├── kfold-cross-validation.md
│ ├── raspberry-pi.md
│ ├── sahi-tiled-inference.md
│ ├── triton-inference-server.md
│ └── yolo-common-issues.md
├── help
│ ├── CI.md
│ ├── CLA.md
│ ├── FAQ.md
│ ├── code_of_conduct.md
│ ├── contributing.md
│ ├── environmental-health-safety.md
│ ├── index.md
│ └── minimum_reproducible_example.md
├── hub
│ ├── app
│ │ ├── android.md
│ │ ├── index.md
│ │ └── ios.md
│ ├── datasets.md
│ ├── index.md
│ ├── inference_api.md
│ ├── integrations.md
│ ├── models.md
│ ├── projects.md
│ └── quickstart.md
├── index.md
├── integrations
│ ├── index.md
│ ├── mlflow.md
│ ├── openvino.md
│ ├── ray-tune.md
│ └── roboflow.md
├── models
│ ├── fast-sam.md
│ ├── index.md
│ ├── mobile-sam.md
│ ├── rtdetr.md
│ ├── sam.md
│ ├── yolo-nas.md
│ ├── yolov3.md
│ ├── yolov4.md
│ ├── yolov5.md
│ ├── yolov6.md
│ ├── yolov7.md
│ └── yolov8.md
├── modes
│ ├── benchmark.md
│ ├── export.md
│ ├── index.md
│ ├── predict.md
│ ├── track.md
│ ├── train.md
│ └── val.md
├── overrides
│ └── partials
│ │ ├── comments.html
│ │ └── source-file.html
├── quickstart.md
├── reference
│ ├── cfg
│ │ └── __init__.md
│ ├── data
│ │ ├── annotator.md
│ │ ├── augment.md
│ │ ├── base.md
│ │ ├── build.md
│ │ ├── converter.md
│ │ ├── dataset.md
│ │ ├── loaders.md
│ │ └── utils.md
│ ├── engine
│ │ ├── exporter.md
│ │ ├── model.md
│ │ ├── predictor.md
│ │ ├── results.md
│ │ ├── trainer.md
│ │ ├── tuner.md
│ │ └── validator.md
│ ├── hub
│ │ ├── __init__.md
│ │ ├── auth.md
│ │ ├── session.md
│ │ └── utils.md
│ ├── models
│ │ ├── fastsam
│ │ │ ├── model.md
│ │ │ ├── predict.md
│ │ │ ├── prompt.md
│ │ │ ├── utils.md
│ │ │ └── val.md
│ │ ├── nas
│ │ │ ├── model.md
│ │ │ ├── predict.md
│ │ │ └── val.md
│ │ ├── rtdetr
│ │ │ ├── model.md
│ │ │ ├── predict.md
│ │ │ ├── train.md
│ │ │ └── val.md
│ │ ├── sam
│ │ │ ├── amg.md
│ │ │ ├── build.md
│ │ │ ├── model.md
│ │ │ ├── modules
│ │ │ │ ├── decoders.md
│ │ │ │ ├── encoders.md
│ │ │ │ ├── sam.md
│ │ │ │ ├── tiny_encoder.md
│ │ │ │ └── transformer.md
│ │ │ └── predict.md
│ │ ├── utils
│ │ │ ├── loss.md
│ │ │ └── ops.md
│ │ └── yolo
│ │ │ ├── classify
│ │ │ ├── predict.md
│ │ │ ├── train.md
│ │ │ └── val.md
│ │ │ ├── detect
│ │ │ ├── predict.md
│ │ │ ├── train.md
│ │ │ └── val.md
│ │ │ ├── model.md
│ │ │ ├── pose
│ │ │ ├── predict.md
│ │ │ ├── train.md
│ │ │ └── val.md
│ │ │ └── segment
│ │ │ ├── predict.md
│ │ │ ├── train.md
│ │ │ └── val.md
│ ├── nn
│ │ ├── autobackend.md
│ │ ├── modules
│ │ │ ├── block.md
│ │ │ ├── conv.md
│ │ │ ├── head.md
│ │ │ ├── transformer.md
│ │ │ └── utils.md
│ │ └── tasks.md
│ ├── trackers
│ │ ├── basetrack.md
│ │ ├── bot_sort.md
│ │ ├── byte_tracker.md
│ │ ├── track.md
│ │ └── utils
│ │ │ ├── gmc.md
│ │ │ ├── kalman_filter.md
│ │ │ └── matching.md
│ └── utils
│ │ ├── __init__.md
│ │ ├── autobatch.md
│ │ ├── benchmarks.md
│ │ ├── callbacks
│ │ ├── base.md
│ │ ├── clearml.md
│ │ ├── comet.md
│ │ ├── dvc.md
│ │ ├── hub.md
│ │ ├── mlflow.md
│ │ ├── neptune.md
│ │ ├── raytune.md
│ │ ├── tensorboard.md
│ │ └── wb.md
│ │ ├── checks.md
│ │ ├── dist.md
│ │ ├── downloads.md
│ │ ├── errors.md
│ │ ├── files.md
│ │ ├── instance.md
│ │ ├── loss.md
│ │ ├── metrics.md
│ │ ├── ops.md
│ │ ├── patches.md
│ │ ├── plotting.md
│ │ ├── tal.md
│ │ ├── torch_utils.md
│ │ ├── triton.md
│ │ └── tuner.md
├── robots.txt
├── stylesheets
│ └── style.css
├── tasks
│ ├── classify.md
│ ├── detect.md
│ ├── index.md
│ ├── pose.md
│ └── segment.md
├── usage
│ ├── callbacks.md
│ ├── cfg.md
│ ├── cli.md
│ ├── engine.md
│ └── python.md
├── yolov5
│ ├── environments
│ │ ├── aws_quickstart_tutorial.md
│ │ ├── azureml_quickstart_tutorial.md
│ │ ├── docker_image_quickstart_tutorial.md
│ │ └── google_cloud_quickstart_tutorial.md
│ ├── index.md
│ ├── quickstart_tutorial.md
│ └── tutorials
│ │ ├── architecture_description.md
│ │ ├── clearml_logging_integration.md
│ │ ├── comet_logging_integration.md
│ │ ├── hyperparameter_evolution.md
│ │ ├── model_ensembling.md
│ │ ├── model_export.md
│ │ ├── model_pruning_and_sparsity.md
│ │ ├── multi_gpu_training.md
│ │ ├── neural_magic_pruning_quantization.md
│ │ ├── pytorch_hub_model_loading.md
│ │ ├── roboflow_datasets_integration.md
│ │ ├── running_on_jetson_nano.md
│ │ ├── test_time_augmentation.md
│ │ ├── tips_for_best_training_results.md
│ │ ├── train_custom_data.md
│ │ └── transfer_learning_with_frozen_layers.md
└── zh
│ └── index.md
├── environment.yaml
├── examples
├── README.md
├── YOLOv8-CPP-Inference
│ ├── CMakeLists.txt
│ ├── README.md
│ ├── inference.cpp
│ ├── inference.h
│ └── main.cpp
├── YOLOv8-ONNXRuntime-CPP
│ ├── CMakeLists.txt
│ ├── README.md
│ ├── inference.cpp
│ ├── inference.h
│ └── main.cpp
├── YOLOv8-ONNXRuntime
│ ├── README.md
│ └── main.py
├── YOLOv8-OpenCV-ONNX-Python
│ ├── README.md
│ └── main.py
├── YOLOv8-Region-Counter
│ ├── readme.md
│ └── yolov8_region_counter.py
├── YOLOv8-SAHI-Inference-Video
│ ├── readme.md
│ └── yolov8_sahi.py
├── hub.ipynb
├── tutorial.ipynb
├── yolov8.yaml
└── zidane.jpg
├── mkdocs.yml
├── requirements.txt
├── setup.cfg
├── setup.py
├── ultralytics
├── __init__.py
├── cfg
│ ├── __init__.py
│ ├── default.yaml
│ ├── models
│ │ ├── README.md
│ │ ├── rt-detr
│ │ │ ├── rtdetr-l.yaml
│ │ │ └── rtdetr-x.yaml
│ │ ├── v3
│ │ │ ├── yolov3-spp.yaml
│ │ │ ├── yolov3-tiny.yaml
│ │ │ └── yolov3.yaml
│ │ ├── v5
│ │ │ ├── yolov5-p6.yaml
│ │ │ └── yolov5.yaml
│ │ ├── v6
│ │ │ └── yolov6.yaml
│ │ └── v8
│ │ │ ├── yolov8-cls.yaml
│ │ │ ├── yolov8-p2.yaml
│ │ │ ├── yolov8-p6.yaml
│ │ │ ├── yolov8-pose-p6.yaml
│ │ │ ├── yolov8-pose.yaml
│ │ │ ├── yolov8-rtdetr.yaml
│ │ │ ├── yolov8-seg-p6.yaml
│ │ │ ├── yolov8-seg.yaml
│ │ │ └── yolov8.yaml
│ └── trackers
│ │ ├── botsort.yaml
│ │ └── bytetrack.yaml
├── data
│ ├── __init__.py
│ ├── annotator.py
│ ├── augment.py
│ ├── base.py
│ ├── build.py
│ ├── converter.py
│ ├── dataset.py
│ ├── loaders.py
│ ├── scripts
│ │ ├── download_weights.sh
│ │ ├── get_coco.sh
│ │ ├── get_coco128.sh
│ │ └── get_imagenet.sh
│ └── utils.py
├── engine
│ ├── __init__.py
│ ├── exporter.py
│ ├── model.py
│ ├── predictor.py
│ ├── results.py
│ ├── trainer.py
│ ├── tuner.py
│ └── validator.py
├── hub
│ ├── __init__.py
│ ├── auth.py
│ ├── session.py
│ └── utils.py
├── models
│ ├── __init__.py
│ ├── fastsam
│ │ ├── __init__.py
│ │ ├── model.py
│ │ ├── predict.py
│ │ ├── prompt.py
│ │ ├── utils.py
│ │ └── val.py
│ ├── nas
│ │ ├── __init__.py
│ │ ├── model.py
│ │ ├── predict.py
│ │ └── val.py
│ ├── rtdetr
│ │ ├── __init__.py
│ │ ├── model.py
│ │ ├── predict.py
│ │ ├── train.py
│ │ └── val.py
│ ├── sam
│ │ ├── __init__.py
│ │ ├── amg.py
│ │ ├── build.py
│ │ ├── model.py
│ │ ├── modules
│ │ │ ├── __init__.py
│ │ │ ├── decoders.py
│ │ │ ├── encoders.py
│ │ │ ├── sam.py
│ │ │ ├── tiny_encoder.py
│ │ │ └── transformer.py
│ │ └── predict.py
│ ├── utils
│ │ ├── __init__.py
│ │ ├── loss.py
│ │ └── ops.py
│ └── yolo
│ │ ├── __init__.py
│ │ ├── classify
│ │ ├── __init__.py
│ │ ├── predict.py
│ │ ├── train.py
│ │ └── val.py
│ │ ├── detect
│ │ ├── __init__.py
│ │ ├── predict.py
│ │ ├── train.py
│ │ └── val.py
│ │ ├── model.py
│ │ ├── pose
│ │ ├── __init__.py
│ │ ├── predict.py
│ │ ├── train.py
│ │ └── val.py
│ │ └── segment
│ │ ├── __init__.py
│ │ ├── predict.py
│ │ ├── train.py
│ │ └── val.py
├── nn
│ ├── __init__.py
│ ├── autobackend.py
│ ├── modules
│ │ ├── __init__.py
│ │ ├── block.py
│ │ ├── conv.py
│ │ ├── head.py
│ │ ├── transformer.py
│ │ └── utils.py
│ └── tasks.py
├── trackers
│ ├── README.md
│ ├── __init__.py
│ ├── basetrack.py
│ ├── bot_sort.py
│ ├── byte_tracker.py
│ ├── track.py
│ └── utils
│ │ ├── __init__.py
│ │ ├── gmc.py
│ │ ├── kalman_filter.py
│ │ └── matching.py
└── utils
│ ├── __init__.py
│ ├── autobatch.py
│ ├── benchmarks.py
│ ├── callbacks
│ ├── __init__.py
│ ├── base.py
│ ├── clearml.py
│ ├── comet.py
│ ├── dvc.py
│ ├── hub.py
│ ├── mlflow.py
│ ├── neptune.py
│ ├── raytune.py
│ ├── tensorboard.py
│ └── wb.py
│ ├── checks.py
│ ├── dist.py
│ ├── downloads.py
│ ├── errors.py
│ ├── files.py
│ ├── instance.py
│ ├── loss.py
│ ├── metrics.py
│ ├── ops.py
│ ├── patches.py
│ ├── plotting.py
│ ├── tal.py
│ ├── torch_utils.py
│ ├── triton.py
│ └── tuner.py
└── yolo
├── data.yaml
├── main.py
└── train.sh
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eventbasedvision/SEVD/5a187503f04092b7eb34683bbcb37933dde73d61/.DS_Store
--------------------------------------------------------------------------------
/carla/config/sensors-fixed-perception.json:
--------------------------------------------------------------------------------
1 | {
2 | "sensors": [
3 | {
4 | "type": "sensor.camera.semantic_segmentation",
5 | "role_name": "semantic_segmentation_camera",
6 | "fov": 90.0,
7 | "image_size_x": 1280,
8 | "image_size_y": 960
9 | },
10 | {
11 | "type": "sensor.camera.instance_segmentation",
12 | "role_name": "instance_segmentation_camera",
13 | "fov": 90.0,
14 | "image_size_x": 1280,
15 | "image_size_y": 960
16 | },
17 | {
18 | "type": "sensor.camera.optical_flow",
19 | "role_name": "optical_flow_camera",
20 | "fov": 90.0,
21 | "image_size_x": 1280,
22 | "image_size_y": 960
23 | },
24 | {
25 | "type": "sensor.camera.depth",
26 | "role_name": "depth_camera",
27 | "fov": 90.0,
28 | "image_size_x": 1280,
29 | "image_size_y": 960
30 | },
31 | {
32 | "type": "sensor.camera.dvs",
33 | "role_name": "dvs_camera",
34 | "fov": 90.0,
35 | "image_size_x": 1280,
36 | "image_size_y": 960
37 | },
38 | {
39 | "type": "sensor.camera.rgb",
40 | "role_name": "rgb_camera",
41 | "fov": 90.0,
42 | "image_size_x": 1280,
43 | "image_size_y": 960
44 | }
45 | ]
46 | }
--------------------------------------------------------------------------------
/carla/config/wheel.ini:
--------------------------------------------------------------------------------
1 | [G29 Racing Wheel]
2 | steering_wheel = 0
3 | throttle = 2
4 | brake = 3
5 | reverse = 5
6 | handbrake = 4
--------------------------------------------------------------------------------
/images/ego-perception-baselines.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eventbasedvision/SEVD/5a187503f04092b7eb34683bbcb37933dde73d61/images/ego-perception-baselines.png
--------------------------------------------------------------------------------
/images/fixed-perception-baselines.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eventbasedvision/SEVD/5a187503f04092b7eb34683bbcb37933dde73d61/images/fixed-perception-baselines.png
--------------------------------------------------------------------------------
/images/related-datasets.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eventbasedvision/SEVD/5a187503f04092b7eb34683bbcb37933dde73d61/images/related-datasets.png
--------------------------------------------------------------------------------
/images/teaser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eventbasedvision/SEVD/5a187503f04092b7eb34683bbcb37933dde73d61/images/teaser.png
--------------------------------------------------------------------------------
/rvt/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Mathias Gehrig
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/rvt/callbacks/custom.py:
--------------------------------------------------------------------------------
1 | from omegaconf import DictConfig
2 | from pytorch_lightning.callbacks import Callback
3 | from pytorch_lightning.callbacks import ModelCheckpoint
4 |
5 | from callbacks.detection import DetectionVizCallback
6 |
7 |
8 | def get_ckpt_callback(config: DictConfig) -> ModelCheckpoint:
9 | model_name = config.model.name
10 |
11 | prefix = 'val'
12 | if model_name == 'rnndet':
13 | metric = 'AP'
14 | mode = 'max'
15 | else:
16 | raise NotImplementedError
17 | ckpt_callback_monitor = prefix + '/' + metric
18 | filename_monitor_str = prefix + '_' + metric
19 |
20 | ckpt_filename = 'epoch={epoch:03d}-step={step}-' + filename_monitor_str + '={' + ckpt_callback_monitor + ':.2f}'
21 |
22 |
23 |
24 | cktp_callback = ModelCheckpoint(
25 | monitor=ckpt_callback_monitor,
26 | filename=ckpt_filename,
27 | auto_insert_metric_name=False, # because backslash would create a directory
28 | save_top_k=20,
29 | mode=mode,
30 | every_n_epochs=config.logging.ckpt_every_n_epochs,
31 | # save_on_train_epoch_end=True,
32 | save_last=True,
33 | verbose=True)
34 |
35 | cktp_callback.CHECKPOINT_NAME_LAST = 'last_epoch={epoch:03d}-step={step}'
36 | return cktp_callback
37 |
38 |
39 | def get_viz_callback(config: DictConfig) -> Callback:
40 | model_name = config.model.name
41 |
42 | if model_name == 'rnndet':
43 | return DetectionVizCallback(config=config)
44 | raise NotImplementedError
45 |
--------------------------------------------------------------------------------
/rvt/callbacks/gradflow.py:
--------------------------------------------------------------------------------
1 | from typing import Any
2 |
3 | import pytorch_lightning as pl
4 | from pytorch_lightning.callbacks import Callback
5 | from pytorch_lightning.utilities.rank_zero import rank_zero_only
6 |
7 | from callbacks.utils.visualization import get_grad_flow_figure
8 |
9 |
10 | class GradFlowLogCallback(Callback):
11 | def __init__(self, log_every_n_train_steps: int):
12 | super().__init__()
13 | assert log_every_n_train_steps > 0
14 | self.log_every_n_train_steps = log_every_n_train_steps
15 |
16 | @rank_zero_only
17 | def on_before_zero_grad(self, trainer: pl.Trainer, pl_module: pl.LightningModule, optimizer: Any) -> None:
18 | # NOTE: before we had this in the on_after_backward callback.
19 | # This was fine for fp32 but showed unscaled gradients for fp16.
20 | # That is why we move it to on_before_zero_grad where gradients are scaled.
21 | global_step = trainer.global_step
22 | if global_step % self.log_every_n_train_steps != 0:
23 | return
24 | named_parameters = pl_module.named_parameters()
25 | figure = get_grad_flow_figure(named_parameters)
26 | trainer.logger.log_metrics({'train/gradients': figure}, step=global_step)
27 |
--------------------------------------------------------------------------------
/rvt/callbacks/utils/visualization.py:
--------------------------------------------------------------------------------
1 | import pandas as pd
2 | import plotly.express as px
3 |
4 |
5 | def get_grad_flow_figure(named_params):
6 | """Creates figure to visualize gradients flowing through different layers in the net during training.
7 | Can be used for checking for possible gradient vanishing / exploding problems.
8 | Usage: Use this function after loss.backwards()
9 | """
10 | data_dict = {
11 | 'name': list(),
12 | 'grad_abs': list(),
13 | }
14 | for name, param in named_params:
15 | if param.requires_grad and param.grad is not None:
16 | grad_abs = param.grad.abs()
17 | data_dict['name'].append(name)
18 | data_dict['grad_abs'].append(grad_abs.mean().cpu().item())
19 |
20 | data_frame = pd.DataFrame.from_dict(data_dict)
21 |
22 | fig = px.bar(data_frame, x='name', y='grad_abs')
23 | return fig
24 |
--------------------------------------------------------------------------------
/rvt/config/dataset/base.yaml:
--------------------------------------------------------------------------------
1 | name: ???
2 | path: ???
3 | train:
4 | sampling: 'mixed' # ('random', 'stream', 'mixed')
5 | random:
6 | weighted_sampling: False
7 | mixed:
8 | w_stream: 1
9 | w_random: 1
10 | eval:
11 | sampling: 'stream'
12 | data_augmentation:
13 | random:
14 | prob_hflip: 0.5
15 | rotate:
16 | prob: 0
17 | min_angle_deg: 2
18 | max_angle_deg: 6
19 | zoom:
20 | prob: 0.8
21 | zoom_in:
22 | weight: 8
23 | factor:
24 | min: 1
25 | max: 1.5
26 | zoom_out:
27 | weight: 2
28 | factor:
29 | min: 1
30 | max: 1.2
31 | stream:
32 | prob_hflip: 0.5
33 | rotate:
34 | prob: 0
35 | min_angle_deg: 2
36 | max_angle_deg: 6
37 | zoom:
38 | prob: 0.5
39 | zoom_out:
40 | factor:
41 | min: 1
42 | max: 1.2
--------------------------------------------------------------------------------
/rvt/config/dataset/etrap.yaml:
--------------------------------------------------------------------------------
1 | defaults:
2 | - base
3 |
4 | name: etrap
5 | ev_repr_name: 'stacked_histogram_dt=50_nbins=10'
6 | sequence_length: 5
7 | resolution_hw: [720, 1280]
8 | downsample_by_factor_2: True
9 | only_load_end_labels: False
--------------------------------------------------------------------------------
/rvt/config/dataset/gen1.yaml:
--------------------------------------------------------------------------------
1 | defaults:
2 | - base
3 |
4 | name: gen1
5 | ev_repr_name: 'stacked_histogram_dt=50_nbins=10'
6 | sequence_length: 11
7 | resolution_hw: [240, 304]
8 | downsample_by_factor_2: False
9 | only_load_end_labels: False
--------------------------------------------------------------------------------
/rvt/config/dataset/gen4.yaml:
--------------------------------------------------------------------------------
1 | defaults:
2 | - base
3 |
4 | name: gen4
5 | ev_repr_name: 'stacked_histogram_dt=50_nbins=10'
6 | sequence_length: 5
7 | resolution_hw: [720, 1280]
8 | downsample_by_factor_2: True
9 | only_load_end_labels: False
--------------------------------------------------------------------------------
/rvt/config/experiment/gen1/base.yaml:
--------------------------------------------------------------------------------
1 | # @package _global_
2 | defaults:
3 | - default
4 |
5 | model:
6 | backbone:
7 | embed_dim: 64
8 | fpn:
9 | depth: 0.67
10 |
--------------------------------------------------------------------------------
/rvt/config/experiment/gen1/default.yaml:
--------------------------------------------------------------------------------
1 | # @package _global_
2 | defaults:
3 | - /model/maxvit_yolox: default
4 |
5 | training:
6 | precision: 16
7 | max_epochs: 10000
8 | max_steps: 400000
9 | learning_rate: 0.0002
10 | lr_scheduler:
11 | use: True
12 | total_steps: ${..max_steps}
13 | pct_start: 0.005
14 | div_factor: 20
15 | final_div_factor: 10000
16 | validation:
17 | val_check_interval: null
18 | check_val_every_n_epoch: 1
19 | batch_size:
20 | train: 8
21 | eval: 8
22 | hardware:
23 | num_workers:
24 | train: 6
25 | eval: 2
26 | dataset:
27 | train:
28 | sampling: 'mixed'
29 | random:
30 | weighted_sampling: False
31 | mixed:
32 | w_stream: 1
33 | w_random: 1
34 | eval:
35 | sampling: 'stream'
36 | ev_repr_name: 'stacked_histogram_dt=50_nbins=10'
37 | sequence_length: 21
38 | downsample_by_factor_2: False
39 | only_load_end_labels: False
40 | model:
41 | backbone:
42 | partition_split_32: 1
--------------------------------------------------------------------------------
/rvt/config/experiment/gen1/small.yaml:
--------------------------------------------------------------------------------
1 | # @package _global_
2 | defaults:
3 | - default
4 |
5 | model:
6 | backbone:
7 | embed_dim: 48
8 | stage:
9 | attention:
10 | dim_head: 24
11 | fpn:
12 | depth: 0.33
--------------------------------------------------------------------------------
/rvt/config/experiment/gen1/tiny.yaml:
--------------------------------------------------------------------------------
1 | # @package _global_
2 | defaults:
3 | - default
4 |
5 | model:
6 | backbone:
7 | embed_dim: 32
8 | fpn:
9 | depth: 0.33
--------------------------------------------------------------------------------
/rvt/config/experiment/gen4/base.yaml:
--------------------------------------------------------------------------------
1 | # @package _global_
2 | defaults:
3 | - default
4 |
5 | model:
6 | backbone:
7 | embed_dim: 64
8 | fpn:
9 | depth: 0.67
10 |
--------------------------------------------------------------------------------
/rvt/config/experiment/gen4/default.yaml:
--------------------------------------------------------------------------------
1 | # @package _global_
2 | defaults:
3 | - /model/maxvit_yolox: default
4 |
5 | training:
6 | precision: 16
7 | max_epochs: 10000
8 | max_steps: 400000000
9 | learning_rate: 0.000035 # 0.000346
10 | lr_scheduler:
11 | use: True
12 | total_steps: ${..max_steps}
13 | pct_start: 0.005
14 | div_factor: 20
15 | final_div_factor: 10000
16 | validation:
17 | val_check_interval: null
18 | check_val_every_n_epoch: 1
19 | batch_size:
20 | train: 12
21 | eval: 12
22 | hardware:
23 | num_workers:
24 | train: 1
25 | eval: 1
26 | dataset:
27 | train:
28 | sampling: 'mixed'
29 | random:
30 | weighted_sampling: False
31 | mixed:
32 | w_stream: 1
33 | w_random: 1
34 | eval:
35 | sampling: 'stream'
36 | ev_repr_name: 'stacked_histogram_dt=50_nbins=10'
37 | sequence_length: 5
38 | downsample_by_factor_2: True
39 | only_load_end_labels: False
40 |
--------------------------------------------------------------------------------
/rvt/config/experiment/gen4/small.yaml:
--------------------------------------------------------------------------------
1 | # @package _global_
2 | defaults:
3 | - default
4 |
5 | model:
6 | backbone:
7 | embed_dim: 48
8 | stage:
9 | attention:
10 | dim_head: 24
11 | fpn:
12 | depth: 0.33
--------------------------------------------------------------------------------
/rvt/config/experiment/gen4/tiny.yaml:
--------------------------------------------------------------------------------
1 | # @package _global_
2 | defaults:
3 | - default
4 |
5 | model:
6 | backbone:
7 | embed_dim: 32
8 | fpn:
9 | depth: 0.33
--------------------------------------------------------------------------------
/rvt/config/model/base.yaml:
--------------------------------------------------------------------------------
1 | name: ???
--------------------------------------------------------------------------------
/rvt/config/model/maxvit_yolox/default.yaml:
--------------------------------------------------------------------------------
1 | # @package _global_
2 | defaults:
3 | - override /model: rnndet
4 |
5 | model:
6 | backbone:
7 | name: MaxViTRNN
8 | compile:
9 | enable: False
10 | args:
11 | mode: reduce-overhead
12 | input_channels: 20
13 | enable_masking: False
14 | partition_split_32: 2
15 | embed_dim: 64
16 | dim_multiplier: [1, 2, 4, 8]
17 | num_blocks: [1, 1, 1, 1]
18 | T_max_chrono_init: [4, 8, 16, 32]
19 | stem:
20 | patch_size: 4
21 | stage:
22 | downsample:
23 | type: patch
24 | overlap: True
25 | norm_affine: True
26 | attention:
27 | use_torch_mha: False
28 | partition_size: ???
29 | dim_head: 32
30 | attention_bias: True
31 | mlp_activation: gelu
32 | mlp_gated: False
33 | mlp_bias: True
34 | mlp_ratio: 4
35 | drop_mlp: 0
36 | drop_path: 0
37 | ls_init_value: 1e-5
38 | lstm:
39 | dws_conv: False
40 | dws_conv_only_hidden: True
41 | dws_conv_kernel_size: 3
42 | drop_cell_update: 0
43 | fpn:
44 | name: PAFPN
45 | compile:
46 | enable: False
47 | args:
48 | mode: reduce-overhead
49 | depth: 0.67 # round(depth * 3) == num bottleneck blocks
50 | # stage 1 is the first and len(num_layers) is the last
51 | in_stages: [2, 3, 4]
52 | depthwise: False
53 | act: "silu"
54 | head:
55 | name: YoloX
56 | compile:
57 | enable: False
58 | args:
59 | mode: reduce-overhead
60 | depthwise: False
61 | act: "silu"
62 | postprocess:
63 | confidence_threshold: 0.1
64 | nms_threshold: 0.45
65 |
--------------------------------------------------------------------------------
/rvt/config/model/rnndet.yaml:
--------------------------------------------------------------------------------
1 | defaults:
2 | - base
3 |
4 | name: rnndet
5 | backbone:
6 | name: ???
7 | fpn:
8 | name: ???
9 | head:
10 | name: ???
11 | postprocess:
12 | confidence_threshold: 0.1
13 | nms_threshold: 0.45
--------------------------------------------------------------------------------
/rvt/config/train.yaml:
--------------------------------------------------------------------------------
1 | defaults:
2 | - general
3 | - dataset: ???
4 | - model: rnndet
5 | - optional model/dataset: ${model}_${dataset}
--------------------------------------------------------------------------------
/rvt/config/val.yaml:
--------------------------------------------------------------------------------
1 | defaults:
2 | - dataset: ???
3 | - model: rnndet
4 | - _self_
5 |
6 | checkpoint: ???
7 | use_test_set: False
8 | hardware:
9 | num_workers:
10 | eval: 4
11 | gpus: 0 # GPU idx (multi-gpu not supported for validation)
12 | batch_size:
13 | eval: 8
14 | training:
15 | precision: 16
16 |
--------------------------------------------------------------------------------
/rvt/data/genx_utils/collate.py:
--------------------------------------------------------------------------------
1 | from copy import deepcopy
2 | from typing import Any, Callable, Dict, Optional, Type, Tuple, Union
3 |
4 | import torch
5 |
6 | from data.genx_utils.collate_from_pytorch import collate, default_collate_fn_map
7 | from data.genx_utils.labels import ObjectLabels, SparselyBatchedObjectLabels
8 |
9 |
10 | def collate_object_labels(batch, *, collate_fn_map: Optional[Dict[Union[Type, Tuple[Type, ...]], Callable]] = None):
11 | return batch
12 |
13 |
14 | def collate_sparsely_batched_object_labels(batch, *, collate_fn_map: Optional[
15 | Dict[Union[Type, Tuple[Type, ...]], Callable]] = None):
16 | return SparselyBatchedObjectLabels.transpose_list(batch)
17 |
18 |
19 | custom_collate_fn_map = deepcopy(default_collate_fn_map)
20 | custom_collate_fn_map[ObjectLabels] = collate_object_labels
21 | custom_collate_fn_map[SparselyBatchedObjectLabels] = collate_sparsely_batched_object_labels
22 |
23 |
24 | def custom_collate(batch: Any):
25 | return collate(batch, collate_fn_map=custom_collate_fn_map)
26 |
27 |
28 | def custom_collate_rnd(batch: Any):
29 | samples = batch
30 | # NOTE: We do not really need the worker id for map style datasets (rnd) but we still provide the id for consistency
31 | worker_info = torch.utils.data.get_worker_info()
32 | local_worker_id = 0 if worker_info is None else worker_info.id
33 | return {
34 | 'data': custom_collate(samples),
35 | 'worker_id': local_worker_id,
36 | }
37 |
38 |
39 | def custom_collate_streaming(batch: Any):
40 | """We assume that we receive a batch collected by a worker of our streaming datapipe
41 | """
42 | samples = batch[0]
43 | worker_id = batch[1]
44 | assert isinstance(worker_id, int)
45 | return {
46 | 'data': custom_collate(samples),
47 | 'worker_id': worker_id,
48 | }
49 |
--------------------------------------------------------------------------------
/rvt/data/utils/spatial.py:
--------------------------------------------------------------------------------
1 | from omegaconf import DictConfig
2 |
3 | from data.utils.types import DatasetType
4 |
5 | _type_2_hw = {
6 | DatasetType.GEN1: (240, 304),
7 | DatasetType.GEN4: (720, 1280),
8 | }
9 |
10 | _str_2_type = {
11 | 'gen1': DatasetType.GEN1,
12 | 'gen4': DatasetType.GEN4,
13 | }
14 |
15 |
16 | def get_original_hw(dataset_type: DatasetType):
17 | return _type_2_hw[dataset_type]
18 |
19 |
20 | def get_dataloading_hw(dataset_config: DictConfig):
21 | dataset_name = dataset_config.name
22 | hw = get_original_hw(dataset_type=_str_2_type[dataset_name])
23 | downsample_by_factor_2 = dataset_config.downsample_by_factor_2
24 | if downsample_by_factor_2:
25 | hw = tuple(x // 2 for x in hw)
26 | return hw
27 |
--------------------------------------------------------------------------------
/rvt/data/utils/types.py:
--------------------------------------------------------------------------------
1 | from enum import auto, Enum
2 |
3 | try:
4 | from enum import StrEnum
5 | except ImportError:
6 | from strenum import StrEnum
7 | from typing import Dict, List, Optional, Tuple, Union
8 |
9 | import torch as th
10 |
11 | from data.genx_utils.labels import ObjectLabels, SparselyBatchedObjectLabels
12 |
13 |
14 | class DataType(Enum):
15 | EV_REPR = auto()
16 | FLOW = auto()
17 | IMAGE = auto()
18 | OBJLABELS = auto()
19 | OBJLABELS_SEQ = auto()
20 | IS_PADDED_MASK = auto()
21 | IS_FIRST_SAMPLE = auto()
22 | TOKEN_MASK = auto()
23 |
24 |
25 | class DatasetType(Enum):
26 | GEN1 = auto()
27 | GEN4 = auto()
28 |
29 |
30 | class DatasetMode(Enum):
31 | TRAIN = auto()
32 | VALIDATION = auto()
33 | TESTING = auto()
34 |
35 |
36 | class DatasetSamplingMode(StrEnum):
37 | RANDOM = 'random'
38 | STREAM = 'stream'
39 | MIXED = 'mixed'
40 |
41 |
42 | class ObjDetOutput(Enum):
43 | LABELS_PROPH = auto()
44 | PRED_PROPH = auto()
45 | EV_REPR = auto()
46 | SKIP_VIZ = auto()
47 |
48 |
49 | LoaderDataDictGenX = Dict[DataType, Union[List[th.Tensor], ObjectLabels, SparselyBatchedObjectLabels, List[bool]]]
50 |
51 | LstmState = Optional[Tuple[th.Tensor, th.Tensor]]
52 | LstmStates = List[LstmState]
53 |
54 | FeatureMap = th.Tensor
55 | BackboneFeatures = Dict[int, th.Tensor]
56 |
--------------------------------------------------------------------------------
/rvt/gen4_class_labels.py:
--------------------------------------------------------------------------------
1 | import os
2 | import numpy as np
3 | import glob
4 |
5 | """
6 | eTraP annotations
7 | {
8 | "0": "pedestrian",
9 | "1": "car",
10 | "2": "bicycle",
11 | "3": "bus",
12 | "4": "motorbike",
13 | "5": "truck",
14 | "6": "tram",
15 | "7": "wheelchair"
16 | }
17 |
18 | 1 Megapixel annotations
19 | pedestrian, two wheeler, car, truck, bus, traffic sign, traffic light
20 | """
21 | CONVERT_LABELS_TO_1MP_ORDER = {
22 | 0: 0,
23 | 1: 2,
24 | 2: 1,
25 | 3: 4,
26 | 4: 1,
27 | 5: 3,
28 | 6: 5,
29 | 7: 6
30 | }
31 |
32 | def mapping_labels(npy_file):
33 | original_npy = np.load(npy_file)
34 | converted_npy = np.copy(original_npy)
35 |
36 | # print(converted_npy[0:10])
37 | save_path = '/home/arpit/caram_air_ws/datasets/etrap_gen4/gen4_train_labels/' + npy_file.split('/')[-1]
38 |
39 | new_labels = [CONVERT_LABELS_TO_1MP_ORDER[x] for x in original_npy['class_id']]
40 | converted_npy['class_id'] = new_labels
41 | print(np.bincount(original_npy['class_id']))
42 | print(np.bincount(converted_npy['class_id']))
43 |
44 | print(converted_npy[0:10])
45 | print('NEW')
46 | np.save(save_path, converted_npy)
47 |
48 | if __name__ == "__main__":
49 | annotations_folder = "/home/arpit/caram_air_ws/datasets/etrap_gen4/train_labels"
50 | npy_files = glob.glob(os.path.join(annotations_folder, '*.npy'))
51 |
52 | # npy_files = ['/media/exx/data/aayush/RED/pretrained/eval/recording_2023-08-24_16-03-57_bbox.npy']
53 | for file in npy_files:
54 | mapping_labels(file)
--------------------------------------------------------------------------------
/rvt/loggers/utils.py:
--------------------------------------------------------------------------------
1 | from pathlib import Path
2 | from typing import Union
3 |
4 | import wandb
5 | from omegaconf import DictConfig, OmegaConf
6 |
7 | from loggers.wandb_logger import WandbLogger
8 |
9 |
10 | def get_wandb_logger(full_config: DictConfig) -> WandbLogger:
11 | wandb_config = full_config.wandb
12 | wandb_runpath = wandb_config.wandb_runpath
13 |
14 | if wandb_runpath is None:
15 | wandb_id = wandb.util.generate_id()
16 | print(f'new run: generating id {wandb_id}')
17 | else:
18 | wandb_id = Path(wandb_runpath).name
19 | print(f'using provided id {wandb_id}')
20 |
21 | full_config_dict = OmegaConf.to_container(full_config, resolve=True, throw_on_missing=True)
22 | logger = WandbLogger(
23 | project=wandb_config.project_name,
24 | group=wandb_config.group_name,
25 | wandb_id=wandb_id,
26 | log_model=True,
27 | save_last_only_final=False,
28 | save_code=True,
29 | config_args=full_config_dict,
30 | )
31 |
32 | return logger
33 |
34 |
35 | def get_ckpt_path(logger: WandbLogger, wandb_config: DictConfig) -> Union[Path, None]:
36 | cfg = wandb_config
37 | artifact_name = cfg.artifact_name
38 | assert artifact_name is not None, 'Artifact name is required to resume from checkpoint.'
39 | print(f'resuming checkpoint from artifact {artifact_name}')
40 | artifact_local_file = cfg.artifact_local_file
41 | if artifact_local_file is not None:
42 | artifact_local_file = Path(artifact_local_file)
43 | if isinstance(logger, WandbLogger):
44 | resume_path = logger.get_checkpoint(
45 | artifact_name=artifact_name,
46 | artifact_filepath=artifact_local_file)
47 | else:
48 | resume_path = artifact_local_file
49 | assert resume_path.exists()
50 | assert resume_path.suffix == '.ckpt', resume_path.suffix
51 | return resume_path
52 |
--------------------------------------------------------------------------------
/rvt/models/detection/__init_.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eventbasedvision/SEVD/5a187503f04092b7eb34683bbcb37933dde73d61/rvt/models/detection/__init_.py
--------------------------------------------------------------------------------
/rvt/models/detection/recurrent_backbone/__init__.py:
--------------------------------------------------------------------------------
1 | from omegaconf import DictConfig
2 |
3 | from .maxvit_rnn import RNNDetector as MaxViTRNNDetector
4 |
5 |
6 | def build_recurrent_backbone(backbone_cfg: DictConfig):
7 | name = backbone_cfg.name
8 | if name == 'MaxViTRNN':
9 | return MaxViTRNNDetector(backbone_cfg)
10 | else:
11 | raise NotImplementedError
12 |
--------------------------------------------------------------------------------
/rvt/models/detection/recurrent_backbone/base.py:
--------------------------------------------------------------------------------
1 | from typing import Tuple
2 |
3 | import torch.nn as nn
4 |
5 |
6 | class BaseDetector(nn.Module):
7 | def get_stage_dims(self, stages: Tuple[int, ...]) -> Tuple[int, ...]:
8 | raise NotImplementedError
9 |
10 | def get_strides(self, stages: Tuple[int, ...]) -> Tuple[int, ...]:
11 | raise NotImplementedError
12 |
--------------------------------------------------------------------------------
/rvt/models/detection/yolox/models/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eventbasedvision/SEVD/5a187503f04092b7eb34683bbcb37933dde73d61/rvt/models/detection/yolox/models/__init__.py
--------------------------------------------------------------------------------
/rvt/models/detection/yolox/models/losses.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- encoding: utf-8 -*-
3 | # Copyright (c) Megvii Inc. All rights reserved.
4 |
5 | import torch
6 | import torch.nn as nn
7 |
8 |
9 | class IOUloss(nn.Module):
10 | def __init__(self, reduction="none", loss_type="iou"):
11 | super(IOUloss, self).__init__()
12 | self.reduction = reduction
13 | self.loss_type = loss_type
14 |
15 | def forward(self, pred, target):
16 | assert pred.shape[0] == target.shape[0]
17 |
18 | pred = pred.view(-1, 4)
19 | target = target.view(-1, 4)
20 | tl = torch.max(
21 | (pred[:, :2] - pred[:, 2:] / 2), (target[:, :2] - target[:, 2:] / 2)
22 | )
23 | br = torch.min(
24 | (pred[:, :2] + pred[:, 2:] / 2), (target[:, :2] + target[:, 2:] / 2)
25 | )
26 |
27 | area_p = torch.prod(pred[:, 2:], 1)
28 | area_g = torch.prod(target[:, 2:], 1)
29 |
30 | en = (tl < br).type(tl.type()).prod(dim=1)
31 | area_i = torch.prod(br - tl, 1) * en
32 | area_u = area_p + area_g - area_i
33 | iou = (area_i) / (area_u + 1e-16)
34 |
35 | if self.loss_type == "iou":
36 | loss = 1 - iou ** 2
37 | elif self.loss_type == "giou":
38 | c_tl = torch.min(
39 | (pred[:, :2] - pred[:, 2:] / 2), (target[:, :2] - target[:, 2:] / 2)
40 | )
41 | c_br = torch.max(
42 | (pred[:, :2] + pred[:, 2:] / 2), (target[:, :2] + target[:, 2:] / 2)
43 | )
44 | area_c = torch.prod(c_br - c_tl, 1)
45 | giou = iou - (area_c - area_u) / area_c.clamp(1e-16)
46 | loss = 1 - giou.clamp(min=-1.0, max=1.0)
47 | else:
48 | raise NotImplementedError
49 |
50 | if self.reduction == "mean":
51 | loss = loss.mean()
52 | elif self.reduction == "sum":
53 | loss = loss.sum()
54 |
55 | return loss
56 |
--------------------------------------------------------------------------------
/rvt/models/detection/yolox/utils/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding:utf-8 -*-
3 | # Copyright (c) Megvii Inc. All rights reserved.
4 |
5 | from .boxes import *
6 | from .compat import meshgrid
7 |
--------------------------------------------------------------------------------
/rvt/models/detection/yolox/utils/compat.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # -*- coding:utf-8 -*-
3 |
4 | import torch
5 |
6 | _TORCH_VER = [int(x) for x in torch.__version__.split(".")[:2]]
7 |
8 | __all__ = ["meshgrid"]
9 |
10 |
11 | def meshgrid(*tensors):
12 | if _TORCH_VER >= [1, 10]:
13 | return torch.meshgrid(*tensors, indexing="ij")
14 | else:
15 | return torch.meshgrid(*tensors)
16 |
--------------------------------------------------------------------------------
/rvt/models/detection/yolox_extension/models/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eventbasedvision/SEVD/5a187503f04092b7eb34683bbcb37933dde73d61/rvt/models/detection/yolox_extension/models/__init__.py
--------------------------------------------------------------------------------
/rvt/models/detection/yolox_extension/models/build.py:
--------------------------------------------------------------------------------
1 | from typing import Tuple
2 |
3 | from omegaconf import OmegaConf, DictConfig
4 |
5 | from .yolo_pafpn import YOLOPAFPN
6 | from ...yolox.models.yolo_head import YOLOXHead
7 |
8 |
9 | def build_yolox_head(head_cfg: DictConfig, in_channels: Tuple[int, ...], strides: Tuple[int, ...]):
10 | head_cfg_dict = OmegaConf.to_container(head_cfg, resolve=True, throw_on_missing=True)
11 | head_cfg_dict.pop('name')
12 | head_cfg_dict.pop('version', None)
13 | head_cfg_dict.update({"in_channels": in_channels})
14 | head_cfg_dict.update({"strides": strides})
15 | compile_cfg = head_cfg_dict.pop('compile', None)
16 | head_cfg_dict.update({"compile_cfg": compile_cfg})
17 | return YOLOXHead(**head_cfg_dict)
18 |
19 |
20 | def build_yolox_fpn(fpn_cfg: DictConfig, in_channels: Tuple[int, ...]):
21 | fpn_cfg_dict = OmegaConf.to_container(fpn_cfg, resolve=True, throw_on_missing=True)
22 | fpn_name = fpn_cfg_dict.pop('name')
23 | fpn_cfg_dict.update({"in_channels": in_channels})
24 | if fpn_name in {'PAFPN', 'pafpn'}:
25 | compile_cfg = fpn_cfg_dict.pop('compile', None)
26 | fpn_cfg_dict.update({"compile_cfg": compile_cfg})
27 | return YOLOPAFPN(**fpn_cfg_dict)
28 | raise NotImplementedError
29 |
--------------------------------------------------------------------------------
/rvt/models/layers/maxvit/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eventbasedvision/SEVD/5a187503f04092b7eb34683bbcb37933dde73d61/rvt/models/layers/maxvit/__init__.py
--------------------------------------------------------------------------------
/rvt/models/layers/maxvit/layers/blur_pool.py:
--------------------------------------------------------------------------------
1 | """
2 | BlurPool layer inspired by
3 | - Kornia's Max_BlurPool2d
4 | - Making Convolutional Networks Shift-Invariant Again :cite:`zhang2019shiftinvar`
5 |
6 | Hacked together by Chris Ha and Ross Wightman
7 | """
8 |
9 | import torch
10 | import torch.nn as nn
11 | import torch.nn.functional as F
12 | import numpy as np
13 | from .padding import get_padding
14 |
15 |
16 | class BlurPool2d(nn.Module):
17 | r"""Creates a module that computes blurs and downsample a given feature map.
18 | See :cite:`zhang2019shiftinvar` for more details.
19 | Corresponds to the Downsample class, which does blurring and subsampling
20 |
21 | Args:
22 | channels = Number of input channels
23 | filt_size (int): binomial filter size for blurring. currently supports 3 (default) and 5.
24 | stride (int): downsampling filter stride
25 |
26 | Returns:
27 | torch.Tensor: the transformed tensor.
28 | """
29 | def __init__(self, channels, filt_size=3, stride=2) -> None:
30 | super(BlurPool2d, self).__init__()
31 | assert filt_size > 1
32 | self.channels = channels
33 | self.filt_size = filt_size
34 | self.stride = stride
35 | self.padding = [get_padding(filt_size, stride, dilation=1)] * 4
36 | coeffs = torch.tensor((np.poly1d((0.5, 0.5)) ** (self.filt_size - 1)).coeffs.astype(np.float32))
37 | blur_filter = (coeffs[:, None] * coeffs[None, :])[None, None, :, :].repeat(self.channels, 1, 1, 1)
38 | self.register_buffer('filt', blur_filter, persistent=False)
39 |
40 | def forward(self, x: torch.Tensor) -> torch.Tensor:
41 | x = F.pad(x, self.padding, 'reflect')
42 | return F.conv2d(x, self.filt, stride=self.stride, groups=self.channels)
43 |
--------------------------------------------------------------------------------
/rvt/models/layers/maxvit/layers/conv2d_same.py:
--------------------------------------------------------------------------------
1 | """ Conv2d w/ Same Padding
2 |
3 | Hacked together by / Copyright 2020 Ross Wightman
4 | """
5 | import torch
6 | import torch.nn as nn
7 | import torch.nn.functional as F
8 | from typing import Tuple, Optional
9 |
10 | from .padding import pad_same, get_padding_value
11 |
12 |
13 | def conv2d_same(
14 | x, weight: torch.Tensor, bias: Optional[torch.Tensor] = None, stride: Tuple[int, int] = (1, 1),
15 | padding: Tuple[int, int] = (0, 0), dilation: Tuple[int, int] = (1, 1), groups: int = 1):
16 | x = pad_same(x, weight.shape[-2:], stride, dilation)
17 | return F.conv2d(x, weight, bias, stride, (0, 0), dilation, groups)
18 |
19 |
20 | class Conv2dSame(nn.Conv2d):
21 | """ Tensorflow like 'SAME' convolution wrapper for 2D convolutions
22 | """
23 |
24 | def __init__(self, in_channels, out_channels, kernel_size, stride=1,
25 | padding=0, dilation=1, groups=1, bias=True):
26 | super(Conv2dSame, self).__init__(
27 | in_channels, out_channels, kernel_size, stride, 0, dilation, groups, bias)
28 |
29 | def forward(self, x):
30 | return conv2d_same(x, self.weight, self.bias, self.stride, self.padding, self.dilation, self.groups)
31 |
32 |
33 | def create_conv2d_pad(in_chs, out_chs, kernel_size, **kwargs):
34 | padding = kwargs.pop('padding', '')
35 | kwargs.setdefault('bias', False)
36 | padding, is_dynamic = get_padding_value(padding, kernel_size, **kwargs)
37 | if is_dynamic:
38 | return Conv2dSame(in_chs, out_chs, kernel_size, **kwargs)
39 | else:
40 | return nn.Conv2d(in_chs, out_chs, kernel_size, padding=padding, **kwargs)
41 |
42 |
43 |
--------------------------------------------------------------------------------
/rvt/models/layers/maxvit/layers/create_conv2d.py:
--------------------------------------------------------------------------------
1 | """ Create Conv2d Factory Method
2 |
3 | Hacked together by / Copyright 2020 Ross Wightman
4 | """
5 |
6 | from .mixed_conv2d import MixedConv2d
7 | from .cond_conv2d import CondConv2d
8 | from .conv2d_same import create_conv2d_pad
9 |
10 |
11 | def create_conv2d(in_channels, out_channels, kernel_size, **kwargs):
12 | """ Select a 2d convolution implementation based on arguments
13 | Creates and returns one of torch.nn.Conv2d, Conv2dSame, MixedConv2d, or CondConv2d.
14 |
15 | Used extensively by EfficientNet, MobileNetv3 and related networks.
16 | """
17 | if isinstance(kernel_size, list):
18 | assert 'num_experts' not in kwargs # MixNet + CondConv combo not supported currently
19 | if 'groups' in kwargs:
20 | groups = kwargs.pop('groups')
21 | if groups == in_channels:
22 | kwargs['depthwise'] = True
23 | else:
24 | assert groups == 1
25 | # We're going to use only lists for defining the MixedConv2d kernel groups,
26 | # ints, tuples, other iterables will continue to pass to normal conv and specify h, w.
27 | m = MixedConv2d(in_channels, out_channels, kernel_size, **kwargs)
28 | else:
29 | depthwise = kwargs.pop('depthwise', False)
30 | # for DW out_channels must be multiple of in_channels as must have out_channels % groups == 0
31 | groups = in_channels if depthwise else kwargs.pop('groups', 1)
32 | if 'num_experts' in kwargs and kwargs['num_experts'] > 0:
33 | m = CondConv2d(in_channels, out_channels, kernel_size, groups=groups, **kwargs)
34 | else:
35 | m = create_conv2d_pad(in_channels, out_channels, kernel_size, groups=groups, **kwargs)
36 | return m
37 |
--------------------------------------------------------------------------------
/rvt/models/layers/maxvit/layers/helpers.py:
--------------------------------------------------------------------------------
1 | """ Layer/Module Helpers
2 |
3 | Hacked together by / Copyright 2020 Ross Wightman
4 | """
5 | from itertools import repeat
6 | import collections.abc
7 |
8 |
9 | # From PyTorch internals
10 | def _ntuple(n):
11 | def parse(x):
12 | if isinstance(x, collections.abc.Iterable) and not isinstance(x, str):
13 | return x
14 | return tuple(repeat(x, n))
15 | return parse
16 |
17 |
18 | to_1tuple = _ntuple(1)
19 | to_2tuple = _ntuple(2)
20 | to_3tuple = _ntuple(3)
21 | to_4tuple = _ntuple(4)
22 | to_ntuple = _ntuple
23 |
24 |
25 | def make_divisible(v, divisor=8, min_value=None, round_limit=.9):
26 | min_value = min_value or divisor
27 | new_v = max(min_value, int(v + divisor / 2) // divisor * divisor)
28 | # Make sure that round down does not go down by more than 10%.
29 | if new_v < round_limit * v:
30 | new_v += divisor
31 | return new_v
32 |
33 |
34 | def extend_tuple(x, n):
35 | # pdas a tuple to specified n by padding with last value
36 | if not isinstance(x, (tuple, list)):
37 | x = (x,)
38 | else:
39 | x = tuple(x)
40 | pad_n = n - len(x)
41 | if pad_n <= 0:
42 | return x[:n]
43 | return x + (x[-1],) * pad_n
44 |
--------------------------------------------------------------------------------
/rvt/models/layers/maxvit/layers/linear.py:
--------------------------------------------------------------------------------
1 | """ Linear layer (alternate definition)
2 | """
3 | import torch
4 | import torch.nn.functional as F
5 | from torch import nn as nn
6 |
7 |
8 | class Linear(nn.Linear):
9 | r"""Applies a linear transformation to the incoming data: :math:`y = xA^T + b`
10 |
11 | Wraps torch.nn.Linear to support AMP + torchscript usage by manually casting
12 | weight & bias to input.dtype to work around an issue w/ torch.addmm in this use case.
13 | """
14 | def forward(self, input: torch.Tensor) -> torch.Tensor:
15 | if torch.jit.is_scripting():
16 | bias = self.bias.to(dtype=input.dtype) if self.bias is not None else None
17 | return F.linear(input, self.weight.to(dtype=input.dtype), bias=bias)
18 | else:
19 | return F.linear(input, self.weight, self.bias)
20 |
--------------------------------------------------------------------------------
/rvt/models/layers/maxvit/layers/median_pool.py:
--------------------------------------------------------------------------------
1 | """ Median Pool
2 | Hacked together by / Copyright 2020 Ross Wightman
3 | """
4 | import torch.nn as nn
5 | import torch.nn.functional as F
6 | from .helpers import to_2tuple, to_4tuple
7 |
8 |
9 | class MedianPool2d(nn.Module):
10 | """ Median pool (usable as median filter when stride=1) module.
11 |
12 | Args:
13 | kernel_size: size of pooling kernel, int or 2-tuple
14 | stride: pool stride, int or 2-tuple
15 | padding: pool padding, int or 4-tuple (l, r, t, b) as in pytorch F.pad
16 | same: override padding and enforce same padding, boolean
17 | """
18 | def __init__(self, kernel_size=3, stride=1, padding=0, same=False):
19 | super(MedianPool2d, self).__init__()
20 | self.k = to_2tuple(kernel_size)
21 | self.stride = to_2tuple(stride)
22 | self.padding = to_4tuple(padding) # convert to l, r, t, b
23 | self.same = same
24 |
25 | def _padding(self, x):
26 | if self.same:
27 | ih, iw = x.size()[2:]
28 | if ih % self.stride[0] == 0:
29 | ph = max(self.k[0] - self.stride[0], 0)
30 | else:
31 | ph = max(self.k[0] - (ih % self.stride[0]), 0)
32 | if iw % self.stride[1] == 0:
33 | pw = max(self.k[1] - self.stride[1], 0)
34 | else:
35 | pw = max(self.k[1] - (iw % self.stride[1]), 0)
36 | pl = pw // 2
37 | pr = pw - pl
38 | pt = ph // 2
39 | pb = ph - pt
40 | padding = (pl, pr, pt, pb)
41 | else:
42 | padding = self.padding
43 | return padding
44 |
45 | def forward(self, x):
46 | x = F.pad(x, self._padding(x), mode='reflect')
47 | x = x.unfold(2, self.k[0], self.stride[0]).unfold(3, self.k[1], self.stride[1])
48 | x = x.contiguous().view(x.size()[:4] + (-1,)).median(dim=-1)[0]
49 | return x
50 |
--------------------------------------------------------------------------------
/rvt/models/layers/maxvit/layers/patch_embed.py:
--------------------------------------------------------------------------------
1 | """ Image to Patch Embedding using Conv2d
2 |
3 | A convolution based approach to patchifying a 2D image w/ embedding projection.
4 |
5 | Based on the impl in https://github.com/google-research/vision_transformer
6 |
7 | Hacked together by / Copyright 2020 Ross Wightman
8 | """
9 | from torch import nn as nn
10 |
11 | from .helpers import to_2tuple
12 | from .trace_utils import _assert
13 |
14 |
15 | class PatchEmbed(nn.Module):
16 | """ 2D Image to Patch Embedding
17 | """
18 | def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=768, norm_layer=None, flatten=True):
19 | super().__init__()
20 | img_size = to_2tuple(img_size)
21 | patch_size = to_2tuple(patch_size)
22 | self.img_size = img_size
23 | self.patch_size = patch_size
24 | self.grid_size = (img_size[0] // patch_size[0], img_size[1] // patch_size[1])
25 | self.num_patches = self.grid_size[0] * self.grid_size[1]
26 | self.flatten = flatten
27 |
28 | self.proj = nn.Conv2d(in_chans, embed_dim, kernel_size=patch_size, stride=patch_size)
29 | self.norm = norm_layer(embed_dim) if norm_layer else nn.Identity()
30 |
31 | def forward(self, x):
32 | B, C, H, W = x.shape
33 | _assert(H == self.img_size[0], f"Input image height ({H}) doesn't match model ({self.img_size[0]}).")
34 | _assert(W == self.img_size[1], f"Input image width ({W}) doesn't match model ({self.img_size[1]}).")
35 | x = self.proj(x)
36 | if self.flatten:
37 | x = x.flatten(2).transpose(1, 2) # BCHW -> BNC
38 | x = self.norm(x)
39 | return x
40 |
--------------------------------------------------------------------------------
/rvt/models/layers/maxvit/layers/space_to_depth.py:
--------------------------------------------------------------------------------
1 | import torch
2 | import torch.nn as nn
3 |
4 |
5 | class SpaceToDepth(nn.Module):
6 | def __init__(self, block_size=4):
7 | super().__init__()
8 | assert block_size == 4
9 | self.bs = block_size
10 |
11 | def forward(self, x):
12 | N, C, H, W = x.size()
13 | x = x.view(N, C, H // self.bs, self.bs, W // self.bs, self.bs) # (N, C, H//bs, bs, W//bs, bs)
14 | x = x.permute(0, 3, 5, 1, 2, 4).contiguous() # (N, bs, bs, C, H//bs, W//bs)
15 | x = x.view(N, C * (self.bs ** 2), H // self.bs, W // self.bs) # (N, C*bs^2, H//bs, W//bs)
16 | return x
17 |
18 |
19 | @torch.jit.script
20 | class SpaceToDepthJit(object):
21 | def __call__(self, x: torch.Tensor):
22 | # assuming hard-coded that block_size==4 for acceleration
23 | N, C, H, W = x.size()
24 | x = x.view(N, C, H // 4, 4, W // 4, 4) # (N, C, H//bs, bs, W//bs, bs)
25 | x = x.permute(0, 3, 5, 1, 2, 4).contiguous() # (N, bs, bs, C, H//bs, W//bs)
26 | x = x.view(N, C * 16, H // 4, W // 4) # (N, C*bs^2, H//bs, W//bs)
27 | return x
28 |
29 |
30 | class SpaceToDepthModule(nn.Module):
31 | def __init__(self, no_jit=False):
32 | super().__init__()
33 | if not no_jit:
34 | self.op = SpaceToDepthJit()
35 | else:
36 | self.op = SpaceToDepth()
37 |
38 | def forward(self, x):
39 | return self.op(x)
40 |
41 |
42 | class DepthToSpace(nn.Module):
43 |
44 | def __init__(self, block_size):
45 | super().__init__()
46 | self.bs = block_size
47 |
48 | def forward(self, x):
49 | N, C, H, W = x.size()
50 | x = x.view(N, self.bs, self.bs, C // (self.bs ** 2), H, W) # (N, bs, bs, C//bs^2, H, W)
51 | x = x.permute(0, 3, 4, 1, 5, 2).contiguous() # (N, C//bs^2, H, bs, W, bs)
52 | x = x.view(N, C // (self.bs ** 2), H * self.bs, W * self.bs) # (N, C//bs^2, H * bs, W * bs)
53 | return x
54 |
--------------------------------------------------------------------------------
/rvt/models/layers/maxvit/layers/trace_utils.py:
--------------------------------------------------------------------------------
1 | try:
2 | from torch import _assert
3 | except ImportError:
4 | def _assert(condition: bool, message: str):
5 | assert condition, message
6 |
7 |
8 | def _float_to_int(x: float) -> int:
9 | """
10 | Symbolic tracing helper to substitute for inbuilt `int`.
11 | Hint: Inbuilt `int` can't accept an argument of type `Proxy`
12 | """
13 | return int(x)
14 |
--------------------------------------------------------------------------------
/rvt/modules/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eventbasedvision/SEVD/5a187503f04092b7eb34683bbcb37933dde73d61/rvt/modules/__init__.py
--------------------------------------------------------------------------------
/rvt/modules/utils/fetch.py:
--------------------------------------------------------------------------------
1 | import pytorch_lightning as pl
2 | from omegaconf import DictConfig
3 |
4 | from modules.data.genx import DataModule as genx_data_module
5 | from modules.detection import Module as rnn_det_module
6 |
7 |
8 | def fetch_model_module(config: DictConfig) -> pl.LightningModule:
9 | model_str = config.model.name
10 | if model_str == 'rnndet':
11 | return rnn_det_module(config)
12 | raise NotImplementedError
13 |
14 |
15 | def fetch_data_module(config: DictConfig) -> pl.LightningDataModule:
16 | batch_size_train = config.batch_size.train
17 | batch_size_eval = config.batch_size.eval
18 | num_workers_generic = config.hardware.get('num_workers', None)
19 | num_workers_train = config.hardware.num_workers.get('train', num_workers_generic)
20 | num_workers_eval = config.hardware.num_workers.get('eval', num_workers_generic)
21 | dataset_str = config.dataset.name
22 | if dataset_str in {'gen1', 'gen4'}:
23 | return genx_data_module(config.dataset,
24 | num_workers_train=num_workers_train,
25 | num_workers_eval=num_workers_eval,
26 | batch_size_train=batch_size_train,
27 | batch_size_eval=batch_size_eval)
28 | raise NotImplementedError
29 |
--------------------------------------------------------------------------------
/rvt/scripts/genx/conf_preprocess/extraction/const_count.yaml:
--------------------------------------------------------------------------------
1 | method: COUNT
2 | value: 50000
--------------------------------------------------------------------------------
/rvt/scripts/genx/conf_preprocess/extraction/const_duration.yaml:
--------------------------------------------------------------------------------
1 | method: DURATION
2 | # value is in milliseconds!
3 | value: 50
4 |
--------------------------------------------------------------------------------
/rvt/scripts/genx/conf_preprocess/filter_gen1.yaml:
--------------------------------------------------------------------------------
1 | apply_psee_bbox_filter: True
2 | apply_faulty_bbox_filter: True
--------------------------------------------------------------------------------
/rvt/scripts/genx/conf_preprocess/filter_gen4.yaml:
--------------------------------------------------------------------------------
1 | apply_psee_bbox_filter: False
2 | apply_faulty_bbox_filter: True
--------------------------------------------------------------------------------
/rvt/scripts/genx/conf_preprocess/representation/mixeddensity_stack.yaml:
--------------------------------------------------------------------------------
1 | name: "mixeddensity_stack"
2 | nbins: 10
3 | count_cutoff: 32
4 |
--------------------------------------------------------------------------------
/rvt/scripts/genx/conf_preprocess/representation/stacked_hist.yaml:
--------------------------------------------------------------------------------
1 | name: "stacked_histogram"
2 | nbins: 10
3 | count_cutoff: 10
4 |
--------------------------------------------------------------------------------
/rvt/utils/evaluation/prophesee/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eventbasedvision/SEVD/5a187503f04092b7eb34683bbcb37933dde73d61/rvt/utils/evaluation/prophesee/__init__.py
--------------------------------------------------------------------------------
/rvt/utils/evaluation/prophesee/evaluation.py:
--------------------------------------------------------------------------------
1 | from .io.box_filtering import filter_boxes
2 | from .metrics.coco_eval import evaluate_detection
3 |
4 |
5 | def evaluate_list(result_boxes_list,
6 | gt_boxes_list,
7 | height: int,
8 | width: int,
9 | camera: str = 'gen1',
10 | apply_bbox_filters: bool = True,
11 | downsampled_by_2: bool = False,
12 | return_aps: bool = True):
13 | assert camera in {'gen1', 'gen4'}
14 |
15 | if camera == 'gen1':
16 | classes = ("car", "pedestrian")
17 | elif camera == 'gen4':
18 | classes = ("pedestrian", "two-wheeler", "car")
19 | elif camera == 'etrap':
20 | classes = ('pedestrian', 'car', 'bicycle')
21 | else:
22 | raise NotImplementedError
23 |
24 | if apply_bbox_filters:
25 | # Default values taken from: https://github.com/prophesee-ai/prophesee-automotive-dataset-toolbox/blob/0393adea2bf22d833893c8cb1d986fcbe4e6f82d/src/psee_evaluator.py#L23-L24
26 | min_box_diag = 60 if camera == 'gen4' else 30
27 | # In the supplementary mat, they say that min_box_side is 20 for gen4.
28 | min_box_side = 20 if camera == 'gen4' else 10
29 | if downsampled_by_2:
30 | assert min_box_diag % 2 == 0
31 | min_box_diag //= 2
32 | assert min_box_side % 2 == 0
33 | min_box_side //= 2
34 |
35 | half_sec_us = int(5e5)
36 | filter_boxes_fn = lambda x: filter_boxes(x, half_sec_us, min_box_diag, min_box_side)
37 |
38 | gt_boxes_list = map(filter_boxes_fn, gt_boxes_list)
39 | # NOTE: We also filter the prediction to follow the prophesee protocol of evaluation.
40 | result_boxes_list = map(filter_boxes_fn, result_boxes_list)
41 |
42 | return evaluate_detection(gt_boxes_list, result_boxes_list,
43 | height=height, width=width,
44 | classes=classes, return_aps=return_aps)
45 |
--------------------------------------------------------------------------------
/rvt/utils/evaluation/prophesee/io/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eventbasedvision/SEVD/5a187503f04092b7eb34683bbcb37933dde73d61/rvt/utils/evaluation/prophesee/io/__init__.py
--------------------------------------------------------------------------------
/rvt/utils/evaluation/prophesee/io/box_filtering.py:
--------------------------------------------------------------------------------
1 | """
2 | Define same filtering that we apply in:
3 | "Learning to detect objects on a 1 Megapixel Event Camera" by Etienne Perot et al.
4 |
5 | Namely we apply 2 different filters:
6 | 1. skip all boxes before 0.5s (before we assume it is unlikely you have sufficient historic)
7 | 2. filter all boxes whose diagonal <= min_box_diag**2 and whose side <= min_box_side
8 |
9 |
10 |
11 | Copyright: (c) 2019-2020 Prophesee
12 | """
13 | from __future__ import print_function
14 |
15 | import numpy as np
16 |
17 |
18 | def filter_boxes(boxes, skip_ts=int(5e5), min_box_diag=60, min_box_side=20):
19 | """Filters boxes according to the paper rule.
20 |
21 | To note: the default represents our threshold when evaluating GEN4 resolution (1280x720)
22 | To note: we assume the initial time of the video is always 0
23 |
24 | Args:
25 | boxes (np.ndarray): structured box array with fields ['t','x','y','w','h','class_id','track_id','class_confidence']
26 | (example BBOX_DTYPE is provided in src/box_loading.py)
27 |
28 | Returns:
29 | boxes: filtered boxes
30 | """
31 | ts = boxes['t']
32 | width = boxes['w']
33 | height = boxes['h']
34 | diag_square = width ** 2 + height ** 2
35 | mask = (ts > skip_ts) * (diag_square >= min_box_diag ** 2) * (width >= min_box_side) * (height >= min_box_side)
36 | return boxes[mask]
37 |
--------------------------------------------------------------------------------
/rvt/utils/evaluation/prophesee/metrics/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eventbasedvision/SEVD/5a187503f04092b7eb34683bbcb37933dde73d61/rvt/utils/evaluation/prophesee/metrics/__init__.py
--------------------------------------------------------------------------------
/rvt/utils/evaluation/prophesee/visualize/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eventbasedvision/SEVD/5a187503f04092b7eb34683bbcb37933dde73d61/rvt/utils/evaluation/prophesee/visualize/__init__.py
--------------------------------------------------------------------------------
/rvt/utils/helpers.py:
--------------------------------------------------------------------------------
1 | from typing import Union
2 |
3 | import torch as th
4 |
5 |
6 | def torch_uniform_sample_scalar(min_value: float, max_value: float):
7 | assert max_value >= min_value, f'{max_value=} is smaller than {min_value=}'
8 | if max_value == min_value:
9 | return min_value
10 | return min_value + (max_value - min_value) * th.rand(1).item()
11 |
12 |
13 | def clamp(value: Union[int, float], smallest: Union[int, float], largest: Union[int, float]):
14 | return max(smallest, min(value, largest))
15 |
--------------------------------------------------------------------------------
/rvt/utils/preprocessing.py:
--------------------------------------------------------------------------------
1 | def _blosc_opts(complevel=1, complib='blosc:zstd', shuffle='byte'):
2 | shuffle = 2 if shuffle == 'bit' else 1 if shuffle == 'byte' else 0
3 | compressors = ['blosclz', 'lz4', 'lz4hc', 'snappy', 'zlib', 'zstd']
4 | complib = ['blosc:' + c for c in compressors].index(complib)
5 | args = {
6 | 'compression': 32001,
7 | 'compression_opts': (0, 0, 0, 0, complevel, shuffle, complib),
8 | }
9 | if shuffle > 0:
10 | # Do not use h5py shuffle if blosc shuffle is enabled.
11 | args['shuffle'] = False
12 | return args
13 |
--------------------------------------------------------------------------------
/ultralytics/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: true
2 | contact_links:
3 | - name: 📄 Docs
4 | url: https://docs.ultralytics.com/
5 | about: Full Ultralytics YOLOv8 Documentation
6 | - name: 💬 Forum
7 | url: https://community.ultralytics.com/
8 | about: Ask on Ultralytics Community Forum
9 | - name: 🎧 Discord
10 | url: https://ultralytics.com/discord
11 | about: Ask on Ultralytics Discord
12 |
--------------------------------------------------------------------------------
/ultralytics/.github/ISSUE_TEMPLATE/question.yml:
--------------------------------------------------------------------------------
1 | name: ❓ Question
2 | description: Ask a YOLOv8 question
3 | # title: " "
4 | labels: [question]
5 | body:
6 | - type: markdown
7 | attributes:
8 | value: |
9 | Thank you for asking a YOLOv8 ❓ Question!
10 |
11 | - type: checkboxes
12 | attributes:
13 | label: Search before asking
14 | description: >
15 | Please search the [issues](https://github.com/ultralytics/ultralytics/issues) and [discussions](https://github.com/ultralytics/ultralytics/discussions) to see if a similar question already exists.
16 | options:
17 | - label: >
18 | I have searched the YOLOv8 [issues](https://github.com/ultralytics/ultralytics/issues) and [discussions](https://github.com/ultralytics/ultralytics/discussions) and found no similar questions.
19 | required: true
20 |
21 | - type: textarea
22 | attributes:
23 | label: Question
24 | description: What is your question?
25 | placeholder: |
26 | 💡 ProTip! Include as much information as possible (screenshots, logs, tracebacks etc.) to receive the most helpful response.
27 | validations:
28 | required: true
29 |
30 | - type: textarea
31 | attributes:
32 | label: Additional
33 | description: Anything else you would like to share?
34 |
--------------------------------------------------------------------------------
/ultralytics/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # Ultralytics YOLO 🚀, AGPL-3.0 license
2 | # Dependabot for package version updates
3 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
4 |
5 | version: 2
6 | updates:
7 | - package-ecosystem: pip
8 | directory: "/"
9 | schedule:
10 | interval: weekly
11 | time: "04:00"
12 | open-pull-requests-limit: 10
13 | reviewers:
14 | - glenn-jocher
15 | labels:
16 | - dependencies
17 |
18 | - package-ecosystem: github-actions
19 | directory: "/"
20 | schedule:
21 | interval: weekly
22 | time: "04:00"
23 | open-pull-requests-limit: 5
24 | reviewers:
25 | - glenn-jocher
26 | labels:
27 | - dependencies
28 |
--------------------------------------------------------------------------------
/ultralytics/.github/translate-readme.yml:
--------------------------------------------------------------------------------
1 | # Ultralytics YOLO 🚀, AGPL-3.0 license
2 | # README translation action to translate README.md to Chinese as README.zh-CN.md on any change to README.md
3 |
4 | name: Translate README
5 |
6 | on:
7 | push:
8 | branches:
9 | - translate_readme # replace with 'main' to enable action
10 | paths:
11 | - README.md
12 |
13 | jobs:
14 | Translate:
15 | runs-on: ubuntu-latest
16 | steps:
17 | - uses: actions/checkout@v3
18 | - name: Setup Node.js
19 | uses: actions/setup-node@v3
20 | with:
21 | node-version: 16
22 | # ISO Language Codes: https://cloud.google.com/translate/docs/languages
23 | - name: Adding README - Chinese Simplified
24 | uses: dephraiim/translate-readme@main
25 | with:
26 | LANG: zh-CN
27 |
--------------------------------------------------------------------------------
/ultralytics/.github/workflows/cla.yml:
--------------------------------------------------------------------------------
1 | # Ultralytics YOLO 🚀, AGPL-3.0 license
2 |
3 | name: CLA Assistant
4 | on:
5 | issue_comment:
6 | types:
7 | - created
8 | pull_request_target:
9 | types:
10 | - reopened
11 | - opened
12 | - synchronize
13 |
14 | jobs:
15 | CLA:
16 | if: github.repository == 'ultralytics/ultralytics'
17 | runs-on: ubuntu-latest
18 | steps:
19 | - name: CLA Assistant
20 | if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I sign the CLA') || github.event_name == 'pull_request_target'
21 | uses: contributor-assistant/github-action@v2.3.1
22 | env:
23 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 | # must be repository secret token
25 | PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
26 | with:
27 | path-to-signatures: 'signatures/version1/cla.json'
28 | path-to-document: 'https://docs.ultralytics.com/help/CLA' # CLA document
29 | # branch should not be protected
30 | branch: 'main'
31 | allowlist: dependabot[bot],github-actions,[pre-commit*,pre-commit*,bot*
32 |
33 | remote-organization-name: ultralytics
34 | remote-repository-name: cla
35 | custom-pr-sign-comment: 'I have read the CLA Document and I sign the CLA'
36 | custom-allsigned-prcomment: All Contributors have signed the CLA. ✅
37 | #custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign'
38 |
--------------------------------------------------------------------------------
/ultralytics/.github/workflows/codeql.yaml:
--------------------------------------------------------------------------------
1 | # Ultralytics YOLO 🚀, AGPL-3.0 license
2 |
3 | name: "CodeQL"
4 |
5 | on:
6 | schedule:
7 | - cron: '0 0 1 * *'
8 | workflow_dispatch:
9 |
10 | jobs:
11 | analyze:
12 | name: Analyze
13 | runs-on: ${{ 'ubuntu-latest' }}
14 | permissions:
15 | actions: read
16 | contents: read
17 | security-events: write
18 |
19 | strategy:
20 | fail-fast: false
21 | matrix:
22 | language: [ 'python' ]
23 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
24 |
25 | steps:
26 | - name: Checkout repository
27 | uses: actions/checkout@v4
28 |
29 | # Initializes the CodeQL tools for scanning.
30 | - name: Initialize CodeQL
31 | uses: github/codeql-action/init@v2
32 | with:
33 | languages: ${{ matrix.language }}
34 | # If you wish to specify custom queries, you can do so here or in a config file.
35 | # By default, queries listed here will override any specified in a config file.
36 | # Prefix the list here with "+" to use these queries and those in the config file.
37 | # queries: security-extended,security-and-quality
38 |
39 | - name: Perform CodeQL Analysis
40 | uses: github/codeql-action/analyze@v2
41 | with:
42 | category: "/language:${{matrix.language}}"
43 |
--------------------------------------------------------------------------------
/ultralytics/CITATION.cff:
--------------------------------------------------------------------------------
1 | cff-version: 1.2.0
2 | preferred-citation:
3 | type: software
4 | message: If you use this software, please cite it as below.
5 | authors:
6 | - family-names: Jocher
7 | given-names: Glenn
8 | orcid: "https://orcid.org/0000-0001-5950-6979"
9 | - family-names: Chaurasia
10 | given-names: Ayush
11 | orcid: "https://orcid.org/0000-0002-7603-6750"
12 | - family-names: Qiu
13 | given-names: Jing
14 | orcid: "https://orcid.org/0000-0003-3783-7069"
15 | title: "YOLO by Ultralytics"
16 | version: 8.0.0
17 | # doi: 10.5281/zenodo.3908559 # TODO
18 | date-released: 2023-1-10
19 | license: AGPL-3.0
20 | url: "https://github.com/ultralytics/ultralytics"
21 |
--------------------------------------------------------------------------------
/ultralytics/MANIFEST.in:
--------------------------------------------------------------------------------
1 | include *.md
2 | include requirements.txt
3 | include LICENSE
4 | include setup.py
5 | include ultralytics/assets/bus.jpg
6 | include ultralytics/assets/zidane.jpg
7 | include tests/*.py
8 | recursive-include ultralytics *.yaml
9 |
--------------------------------------------------------------------------------
/ultralytics/README.md:
--------------------------------------------------------------------------------
1 | # YOLOv8: You Only Look Once (v8.1)
2 |
3 | This is the modified yolov8 version for the CVPR 2024 paper [SEVD: Synthetic Event-based Vision Dataset for Ego and Fixed Traffic Perception](https://arxiv.org/abs/2404.10540).
4 |
5 | ## Whats Different?
6 |
7 | The ultralytics library was updated to consider only 2 channels from the image as the events and discard the 3rd channel. Similarly a zero last channel is added before visualization.
8 |
9 | The updated configs and training script utilizing this library can be found in `./yolo/`.
10 |
11 | ## Installation
12 |
13 | Pip install modified ultralytics in a Python>=3.8 environment with PyTorch>=1.8.
14 |
15 | ```Bash
16 | pip install -e .
17 | ```
18 |
19 | ## Required Data
20 |
21 | To evaluate or train RVT on SEVD you will need to download the SEVD dataset from [Link to Dataset](https://docs.google.com/forms/d/e/1FAIpQLSdOhlegSlpzW78DsPSqNCDdfg7IVXsbcKD-BgBnbj_YdjojQg/viewform).
22 |
23 |
24 |
25 |
26 |
27 |
28 | ## Training
29 |
30 | ```bash
31 | python main.py --data data.yaml --batch_size 128 --max_epoch 20
32 | ```
33 |
34 | ## Code Acknowledgments
35 |
36 | This project has used code from the following projects:
37 |
38 | - [ultralytics](https://github.com/ultralytics/ultralytics) for the official YOLOv8 implementation in Pytorch
39 |
--------------------------------------------------------------------------------
/ultralytics/docker/Dockerfile-conda:
--------------------------------------------------------------------------------
1 | # Ultralytics YOLO 🚀, AGPL-3.0 license
2 | # Builds ultralytics/ultralytics:latest-conda image on DockerHub https://hub.docker.com/r/ultralytics/ultralytics
3 | # Image is optimized for Ultralytics Anaconda (https://anaconda.org/conda-forge/ultralytics) installation and usage
4 |
5 | # Start FROM miniconda3 image https://hub.docker.com/r/continuumio/miniconda3
6 | FROM continuumio/miniconda3:latest
7 |
8 | # Downloads to user config dir
9 | ADD https://ultralytics.com/assets/Arial.ttf https://ultralytics.com/assets/Arial.Unicode.ttf /root/.config/Ultralytics/
10 |
11 | # Install linux packages
12 | RUN apt update \
13 | && apt install --no-install-recommends -y libgl1-mesa-glx
14 |
15 | # Copy contents
16 | ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt .
17 |
18 | # Install conda packages
19 | # mkl required to fix 'OSError: libmkl_intel_lp64.so.2: cannot open shared object file: No such file or directory'
20 | RUN conda config --set solver libmamba && \
21 | conda install pytorch torchvision pytorch-cuda=11.8 -c pytorch -c nvidia && \
22 | conda install -c conda-forge ultralytics mkl
23 | # conda install -c pytorch -c nvidia -c conda-forge pytorch torchvision pytorch-cuda=11.8 ultralytics mkl
24 |
25 |
26 | # Usage Examples -------------------------------------------------------------------------------------------------------
27 |
28 | # Build and Push
29 | # t=ultralytics/ultralytics:latest-conda && sudo docker build -f docker/Dockerfile-cpu -t $t . && sudo docker push $t
30 |
31 | # Run
32 | # t=ultralytics/ultralytics:latest-conda && sudo docker run -it --ipc=host $t
33 |
34 | # Pull and Run
35 | # t=ultralytics/ultralytics:latest-conda && sudo docker pull $t && sudo docker run -it --ipc=host $t
36 |
37 | # Pull and Run with local volume mounted
38 | # t=ultralytics/ultralytics:latest-conda && sudo docker pull $t && sudo docker run -it --ipc=host -v "$(pwd)"/datasets:/usr/src/datasets $t
39 |
--------------------------------------------------------------------------------
/ultralytics/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 |
--------------------------------------------------------------------------------
/ultralytics/docs/CNAME:
--------------------------------------------------------------------------------
1 | docs.ultralytics.com
2 |
--------------------------------------------------------------------------------
/ultralytics/docs/assets/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eventbasedvision/SEVD/5a187503f04092b7eb34683bbcb37933dde73d61/ultralytics/docs/assets/favicon.ico
--------------------------------------------------------------------------------
/ultralytics/docs/overrides/partials/comments.html:
--------------------------------------------------------------------------------
1 | {% if page.meta.comments %}
2 |
3 |
4 |
5 |
20 |
21 |
22 |
50 | {% endif %}
51 |
--------------------------------------------------------------------------------
/ultralytics/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 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.cfg.cfg2dict
14 |
15 |
16 | ---
17 | ## ::: ultralytics.cfg.get_cfg
18 |
19 |
20 | ---
21 | ## ::: ultralytics.cfg.get_save_dir
22 |
23 |
24 | ---
25 | ## ::: ultralytics.cfg._handle_deprecation
26 |
27 |
28 | ---
29 | ## ::: ultralytics.cfg.check_dict_alignment
30 |
31 |
32 | ---
33 | ## ::: ultralytics.cfg.merge_equals_args
34 |
35 |
36 | ---
37 | ## ::: ultralytics.cfg.handle_yolo_hub
38 |
39 |
40 | ---
41 | ## ::: ultralytics.cfg.handle_yolo_settings
42 |
43 |
44 | ---
45 | ## ::: ultralytics.cfg.parse_key_value_pair
46 |
47 |
48 | ---
49 | ## ::: ultralytics.cfg.smart_value
50 |
51 |
52 | ---
53 | ## ::: ultralytics.cfg.entrypoint
54 |
55 |
56 | ---
57 | ## ::: ultralytics.cfg.copy_default_cfg
58 |
59 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.data.annotator.auto_annotate
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.data.base.BaseDataset
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.data.build.InfiniteDataLoader
14 |
15 |
16 | ---
17 | ## ::: ultralytics.data.build._RepeatSampler
18 |
19 |
20 | ---
21 | ## ::: ultralytics.data.build.seed_worker
22 |
23 |
24 | ---
25 | ## ::: ultralytics.data.build.build_yolo_dataset
26 |
27 |
28 | ---
29 | ## ::: ultralytics.data.build.build_dataloader
30 |
31 |
32 | ---
33 | ## ::: ultralytics.data.build.check_source
34 |
35 |
36 | ---
37 | ## ::: ultralytics.data.build.load_inference_source
38 |
39 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.data.converter.coco91_to_coco80_class
14 |
15 |
16 | ---
17 | ## ::: ultralytics.data.converter.coco80_to_coco91_class
18 |
19 |
20 | ---
21 | ## ::: ultralytics.data.converter.convert_coco
22 |
23 |
24 | ---
25 | ## ::: ultralytics.data.converter.convert_dota_to_yolo_obb
26 |
27 |
28 | ---
29 | ## ::: ultralytics.data.converter.min_index
30 |
31 |
32 | ---
33 | ## ::: ultralytics.data.converter.merge_multi_segment
34 |
35 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.data.dataset.YOLODataset
14 |
15 |
16 | ---
17 | ## ::: ultralytics.data.dataset.ClassificationDataset
18 |
19 |
20 | ---
21 | ## ::: ultralytics.data.dataset.SemanticDataset
22 |
23 |
24 | ---
25 | ## ::: ultralytics.data.dataset.load_dataset_cache_file
26 |
27 |
28 | ---
29 | ## ::: ultralytics.data.dataset.save_dataset_cache_file
30 |
31 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.data.loaders.SourceTypes
14 |
15 |
16 | ---
17 | ## ::: ultralytics.data.loaders.LoadStreams
18 |
19 |
20 | ---
21 | ## ::: ultralytics.data.loaders.LoadScreenshots
22 |
23 |
24 | ---
25 | ## ::: ultralytics.data.loaders.LoadImages
26 |
27 |
28 | ---
29 | ## ::: ultralytics.data.loaders.LoadPilAndNumpy
30 |
31 |
32 | ---
33 | ## ::: ultralytics.data.loaders.LoadTensor
34 |
35 |
36 | ---
37 | ## ::: ultralytics.data.loaders.autocast_list
38 |
39 |
40 | ---
41 | ## ::: ultralytics.data.loaders.get_best_youtube_url
42 |
43 |
--------------------------------------------------------------------------------
/ultralytics/docs/reference/data/utils.md:
--------------------------------------------------------------------------------
1 | ---
2 | description: Uncover a detailed guide to Ultralytics data utilities. Learn functions from img2label_paths to autosplit, all boosting your YOLO model’s efficiency.
3 | keywords: Ultralytics, data utils, YOLO, img2label_paths, exif_size, polygon2mask, polygons2masks_overlap, check_cls_dataset, delete_dsstore, autosplit
4 | ---
5 |
6 | # Reference for `ultralytics/data/utils.py`
7 |
8 | !!! note
9 |
10 | Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/utils.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/data/utils.py). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.data.utils.HUBDatasetStats
14 |
15 |
16 | ---
17 | ## ::: ultralytics.data.utils.img2label_paths
18 |
19 |
20 | ---
21 | ## ::: ultralytics.data.utils.get_hash
22 |
23 |
24 | ---
25 | ## ::: ultralytics.data.utils.exif_size
26 |
27 |
28 | ---
29 | ## ::: ultralytics.data.utils.verify_image
30 |
31 |
32 | ---
33 | ## ::: ultralytics.data.utils.verify_image_label
34 |
35 |
36 | ---
37 | ## ::: ultralytics.data.utils.polygon2mask
38 |
39 |
40 | ---
41 | ## ::: ultralytics.data.utils.polygons2masks
42 |
43 |
44 | ---
45 | ## ::: ultralytics.data.utils.polygons2masks_overlap
46 |
47 |
48 | ---
49 | ## ::: ultralytics.data.utils.find_dataset_yaml
50 |
51 |
52 | ---
53 | ## ::: ultralytics.data.utils.check_det_dataset
54 |
55 |
56 | ---
57 | ## ::: ultralytics.data.utils.check_cls_dataset
58 |
59 |
60 | ---
61 | ## ::: ultralytics.data.utils.compress_one_image
62 |
63 |
64 | ---
65 | ## ::: ultralytics.data.utils.autosplit
66 |
67 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.engine.exporter.Exporter
14 |
15 |
16 | ---
17 | ## ::: ultralytics.engine.exporter.IOSDetectModel
18 |
19 |
20 | ---
21 | ## ::: ultralytics.engine.exporter.export_formats
22 |
23 |
24 | ---
25 | ## ::: ultralytics.engine.exporter.gd_outputs
26 |
27 |
28 | ---
29 | ## ::: ultralytics.engine.exporter.try_export
30 |
31 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.engine.model.Model
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.engine.predictor.BasePredictor
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.engine.results.BaseTensor
14 |
15 |
16 | ---
17 | ## ::: ultralytics.engine.results.Results
18 |
19 |
20 | ---
21 | ## ::: ultralytics.engine.results.Boxes
22 |
23 |
24 | ---
25 | ## ::: ultralytics.engine.results.Masks
26 |
27 |
28 | ---
29 | ## ::: ultralytics.engine.results.Keypoints
30 |
31 |
32 | ---
33 | ## ::: ultralytics.engine.results.Probs
34 |
35 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.engine.trainer.BaseTrainer
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.engine.tuner.Tuner
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.engine.validator.BaseValidator
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.hub.login
14 |
15 |
16 | ---
17 | ## ::: ultralytics.hub.logout
18 |
19 |
20 | ---
21 | ## ::: ultralytics.hub.reset_model
22 |
23 |
24 | ---
25 | ## ::: ultralytics.hub.export_fmts_hub
26 |
27 |
28 | ---
29 | ## ::: ultralytics.hub.export_model
30 |
31 |
32 | ---
33 | ## ::: ultralytics.hub.get_export
34 |
35 |
36 | ---
37 | ## ::: ultralytics.hub.check_dataset
38 |
39 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.hub.auth.Auth
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.hub.session.HUBTrainingSession
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.hub.utils.Events
14 |
15 |
16 | ---
17 | ## ::: ultralytics.hub.utils.request_with_credentials
18 |
19 |
20 | ---
21 | ## ::: ultralytics.hub.utils.requests_with_progress
22 |
23 |
24 | ---
25 | ## ::: ultralytics.hub.utils.smart_request
26 |
27 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.fastsam.model.FastSAM
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.fastsam.predict.FastSAMPredictor
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.fastsam.prompt.FastSAMPrompt
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.fastsam.utils.adjust_bboxes_to_image_border
14 |
15 |
16 | ---
17 | ## ::: ultralytics.models.fastsam.utils.bbox_iou
18 |
19 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.fastsam.val.FastSAMValidator
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.nas.model.NAS
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.nas.predict.NASPredictor
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.nas.val.NASValidator
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.rtdetr.model.RTDETR
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.rtdetr.predict.RTDETRPredictor
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.rtdetr.train.RTDETRTrainer
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.rtdetr.val.RTDETRDataset
14 |
15 |
16 | ---
17 | ## ::: ultralytics.models.rtdetr.val.RTDETRValidator
18 |
19 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.sam.amg.is_box_near_crop_edge
14 |
15 |
16 | ---
17 | ## ::: ultralytics.models.sam.amg.batch_iterator
18 |
19 |
20 | ---
21 | ## ::: ultralytics.models.sam.amg.calculate_stability_score
22 |
23 |
24 | ---
25 | ## ::: ultralytics.models.sam.amg.build_point_grid
26 |
27 |
28 | ---
29 | ## ::: ultralytics.models.sam.amg.build_all_layer_point_grids
30 |
31 |
32 | ---
33 | ## ::: ultralytics.models.sam.amg.generate_crop_boxes
34 |
35 |
36 | ---
37 | ## ::: ultralytics.models.sam.amg.uncrop_boxes_xyxy
38 |
39 |
40 | ---
41 | ## ::: ultralytics.models.sam.amg.uncrop_points
42 |
43 |
44 | ---
45 | ## ::: ultralytics.models.sam.amg.uncrop_masks
46 |
47 |
48 | ---
49 | ## ::: ultralytics.models.sam.amg.remove_small_regions
50 |
51 |
52 | ---
53 | ## ::: ultralytics.models.sam.amg.batched_mask_to_box
54 |
55 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.sam.build.build_sam_vit_h
14 |
15 |
16 | ---
17 | ## ::: ultralytics.models.sam.build.build_sam_vit_l
18 |
19 |
20 | ---
21 | ## ::: ultralytics.models.sam.build.build_sam_vit_b
22 |
23 |
24 | ---
25 | ## ::: ultralytics.models.sam.build.build_mobile_sam
26 |
27 |
28 | ---
29 | ## ::: ultralytics.models.sam.build._build_sam
30 |
31 |
32 | ---
33 | ## ::: ultralytics.models.sam.build.build_sam
34 |
35 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.sam.model.SAM
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.sam.modules.decoders.MaskDecoder
14 |
15 |
16 | ---
17 | ## ::: ultralytics.models.sam.modules.decoders.MLP
18 |
19 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.sam.modules.encoders.ImageEncoderViT
14 |
15 |
16 | ---
17 | ## ::: ultralytics.models.sam.modules.encoders.PromptEncoder
18 |
19 |
20 | ---
21 | ## ::: ultralytics.models.sam.modules.encoders.PositionEmbeddingRandom
22 |
23 |
24 | ---
25 | ## ::: ultralytics.models.sam.modules.encoders.Block
26 |
27 |
28 | ---
29 | ## ::: ultralytics.models.sam.modules.encoders.Attention
30 |
31 |
32 | ---
33 | ## ::: ultralytics.models.sam.modules.encoders.PatchEmbed
34 |
35 |
36 | ---
37 | ## ::: ultralytics.models.sam.modules.encoders.window_partition
38 |
39 |
40 | ---
41 | ## ::: ultralytics.models.sam.modules.encoders.window_unpartition
42 |
43 |
44 | ---
45 | ## ::: ultralytics.models.sam.modules.encoders.get_rel_pos
46 |
47 |
48 | ---
49 | ## ::: ultralytics.models.sam.modules.encoders.add_decomposed_rel_pos
50 |
51 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.sam.modules.sam.Sam
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/reference/models/sam/modules/tiny_encoder.md:
--------------------------------------------------------------------------------
1 | ---
2 | description: Get in-depth insights about Ultralytics Tiny Encoder Modules such as Conv2d_BN, MBConv, ConvLayer, Attention, BasicLayer, and TinyViT. Improve your understanding of machine learning model components.
3 | keywords: Ultralytics, Tiny Encoder, Conv2d_BN, MBConv, ConvLayer, Attention, BasicLayer, TinyViT, Machine learning modules, Ultralytics models
4 | ---
5 |
6 | # Reference for `ultralytics/models/sam/modules/tiny_encoder.py`
7 |
8 | !!! note
9 |
10 | Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/tiny_encoder.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/sam/modules/tiny_encoder.py). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.sam.modules.tiny_encoder.Conv2d_BN
14 |
15 |
16 | ---
17 | ## ::: ultralytics.models.sam.modules.tiny_encoder.PatchEmbed
18 |
19 |
20 | ---
21 | ## ::: ultralytics.models.sam.modules.tiny_encoder.MBConv
22 |
23 |
24 | ---
25 | ## ::: ultralytics.models.sam.modules.tiny_encoder.PatchMerging
26 |
27 |
28 | ---
29 | ## ::: ultralytics.models.sam.modules.tiny_encoder.ConvLayer
30 |
31 |
32 | ---
33 | ## ::: ultralytics.models.sam.modules.tiny_encoder.Mlp
34 |
35 |
36 | ---
37 | ## ::: ultralytics.models.sam.modules.tiny_encoder.Attention
38 |
39 |
40 | ---
41 | ## ::: ultralytics.models.sam.modules.tiny_encoder.TinyViTBlock
42 |
43 |
44 | ---
45 | ## ::: ultralytics.models.sam.modules.tiny_encoder.BasicLayer
46 |
47 |
48 | ---
49 | ## ::: ultralytics.models.sam.modules.tiny_encoder.LayerNorm2d
50 |
51 |
52 | ---
53 | ## ::: ultralytics.models.sam.modules.tiny_encoder.TinyViT
54 |
55 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.sam.modules.transformer.TwoWayTransformer
14 |
15 |
16 | ---
17 | ## ::: ultralytics.models.sam.modules.transformer.TwoWayAttentionBlock
18 |
19 |
20 | ---
21 | ## ::: ultralytics.models.sam.modules.transformer.Attention
22 |
23 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.sam.predict.Predictor
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.utils.loss.DETRLoss
14 |
15 |
16 | ---
17 | ## ::: ultralytics.models.utils.loss.RTDETRDetectionLoss
18 |
19 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.utils.ops.HungarianMatcher
14 |
15 |
16 | ---
17 | ## ::: ultralytics.models.utils.ops.get_cdn_group
18 |
19 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.yolo.classify.predict.ClassificationPredictor
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.yolo.classify.train.ClassificationTrainer
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.yolo.classify.val.ClassificationValidator
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.yolo.detect.predict.DetectionPredictor
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.yolo.detect.train.DetectionTrainer
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.yolo.detect.val.DetectionValidator
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.yolo.model.YOLO
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.yolo.pose.predict.PosePredictor
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.yolo.pose.train.PoseTrainer
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.yolo.pose.val.PoseValidator
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.yolo.segment.predict.SegmentationPredictor
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.yolo.segment.train.SegmentationTrainer
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.models.yolo.segment.val.SegmentationValidator
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.nn.autobackend.AutoBackend
14 |
15 |
16 | ---
17 | ## ::: ultralytics.nn.autobackend.check_class_names
18 |
19 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.nn.modules.conv.Conv
14 |
15 |
16 | ---
17 | ## ::: ultralytics.nn.modules.conv.Conv2
18 |
19 |
20 | ---
21 | ## ::: ultralytics.nn.modules.conv.LightConv
22 |
23 |
24 | ---
25 | ## ::: ultralytics.nn.modules.conv.DWConv
26 |
27 |
28 | ---
29 | ## ::: ultralytics.nn.modules.conv.DWConvTranspose2d
30 |
31 |
32 | ---
33 | ## ::: ultralytics.nn.modules.conv.ConvTranspose
34 |
35 |
36 | ---
37 | ## ::: ultralytics.nn.modules.conv.Focus
38 |
39 |
40 | ---
41 | ## ::: ultralytics.nn.modules.conv.GhostConv
42 |
43 |
44 | ---
45 | ## ::: ultralytics.nn.modules.conv.RepConv
46 |
47 |
48 | ---
49 | ## ::: ultralytics.nn.modules.conv.ChannelAttention
50 |
51 |
52 | ---
53 | ## ::: ultralytics.nn.modules.conv.SpatialAttention
54 |
55 |
56 | ---
57 | ## ::: ultralytics.nn.modules.conv.CBAM
58 |
59 |
60 | ---
61 | ## ::: ultralytics.nn.modules.conv.Concat
62 |
63 |
64 | ---
65 | ## ::: ultralytics.nn.modules.conv.autopad
66 |
67 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.nn.modules.head.Detect
14 |
15 |
16 | ---
17 | ## ::: ultralytics.nn.modules.head.Segment
18 |
19 |
20 | ---
21 | ## ::: ultralytics.nn.modules.head.Pose
22 |
23 |
24 | ---
25 | ## ::: ultralytics.nn.modules.head.Classify
26 |
27 |
28 | ---
29 | ## ::: ultralytics.nn.modules.head.RTDETRDecoder
30 |
31 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.nn.modules.transformer.TransformerEncoderLayer
14 |
15 |
16 | ---
17 | ## ::: ultralytics.nn.modules.transformer.AIFI
18 |
19 |
20 | ---
21 | ## ::: ultralytics.nn.modules.transformer.TransformerLayer
22 |
23 |
24 | ---
25 | ## ::: ultralytics.nn.modules.transformer.TransformerBlock
26 |
27 |
28 | ---
29 | ## ::: ultralytics.nn.modules.transformer.MLPBlock
30 |
31 |
32 | ---
33 | ## ::: ultralytics.nn.modules.transformer.MLP
34 |
35 |
36 | ---
37 | ## ::: ultralytics.nn.modules.transformer.LayerNorm2d
38 |
39 |
40 | ---
41 | ## ::: ultralytics.nn.modules.transformer.MSDeformAttn
42 |
43 |
44 | ---
45 | ## ::: ultralytics.nn.modules.transformer.DeformableTransformerDecoderLayer
46 |
47 |
48 | ---
49 | ## ::: ultralytics.nn.modules.transformer.DeformableTransformerDecoder
50 |
51 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.nn.modules.utils._get_clones
14 |
15 |
16 | ---
17 | ## ::: ultralytics.nn.modules.utils.bias_init_with_prob
18 |
19 |
20 | ---
21 | ## ::: ultralytics.nn.modules.utils.linear_init_
22 |
23 |
24 | ---
25 | ## ::: ultralytics.nn.modules.utils.inverse_sigmoid
26 |
27 |
28 | ---
29 | ## ::: ultralytics.nn.modules.utils.multi_scale_deformable_attn_pytorch
30 |
31 |
--------------------------------------------------------------------------------
/ultralytics/docs/reference/nn/tasks.md:
--------------------------------------------------------------------------------
1 | # Reference for `ultralytics/nn/tasks.py`
2 |
3 | !!! note
4 |
5 | Full source code for this file is available at [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/tasks.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/nn/tasks.py). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
6 |
7 | ---
8 | ## ::: ultralytics.nn.tasks.BaseModel
9 |
10 |
11 | ---
12 | ## ::: ultralytics.nn.tasks.DetectionModel
13 |
14 |
15 | ---
16 | ## ::: ultralytics.nn.tasks.SegmentationModel
17 |
18 |
19 | ---
20 | ## ::: ultralytics.nn.tasks.PoseModel
21 |
22 |
23 | ---
24 | ## ::: ultralytics.nn.tasks.ClassificationModel
25 |
26 |
27 | ---
28 | ## ::: ultralytics.nn.tasks.RTDETRDetectionModel
29 |
30 |
31 | ---
32 | ## ::: ultralytics.nn.tasks.Ensemble
33 |
34 |
35 | ---
36 | ## ::: ultralytics.nn.tasks.temporary_modules
37 |
38 |
39 | ---
40 | ## ::: ultralytics.nn.tasks.torch_safe_load
41 |
42 |
43 | ---
44 | ## ::: ultralytics.nn.tasks.attempt_load_weights
45 |
46 |
47 | ---
48 | ## ::: ultralytics.nn.tasks.attempt_load_one_weight
49 |
50 |
51 | ---
52 | ## ::: ultralytics.nn.tasks.parse_model
53 |
54 |
55 | ---
56 | ## ::: ultralytics.nn.tasks.yaml_model_load
57 |
58 |
59 | ---
60 | ## ::: ultralytics.nn.tasks.guess_model_scale
61 |
62 |
63 | ---
64 | ## ::: ultralytics.nn.tasks.guess_model_task
65 |
66 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.trackers.basetrack.TrackState
14 |
15 |
16 | ---
17 | ## ::: ultralytics.trackers.basetrack.BaseTrack
18 |
19 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.trackers.bot_sort.BOTrack
14 |
15 |
16 | ---
17 | ## ::: ultralytics.trackers.bot_sort.BOTSORT
18 |
19 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.trackers.byte_tracker.STrack
14 |
15 |
16 | ---
17 | ## ::: ultralytics.trackers.byte_tracker.BYTETracker
18 |
19 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.trackers.track.on_predict_start
14 |
15 |
16 | ---
17 | ## ::: ultralytics.trackers.track.on_predict_postprocess_end
18 |
19 |
20 | ---
21 | ## ::: ultralytics.trackers.track.register_tracker
22 |
23 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.trackers.utils.gmc.GMC
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.trackers.utils.kalman_filter.KalmanFilterXYAH
14 |
15 |
16 | ---
17 | ## ::: ultralytics.trackers.utils.kalman_filter.KalmanFilterXYWH
18 |
19 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.trackers.utils.matching.linear_assignment
14 |
15 |
16 | ---
17 | ## ::: ultralytics.trackers.utils.matching.iou_distance
18 |
19 |
20 | ---
21 | ## ::: ultralytics.trackers.utils.matching.embedding_distance
22 |
23 |
24 | ---
25 | ## ::: ultralytics.trackers.utils.matching.fuse_score
26 |
27 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.autobatch.check_train_batch_size
14 |
15 |
16 | ---
17 | ## ::: ultralytics.utils.autobatch.autobatch
18 |
19 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.benchmarks.ProfileModels
14 |
15 |
16 | ---
17 | ## ::: ultralytics.utils.benchmarks.benchmark
18 |
19 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.callbacks.clearml._log_debug_samples
14 |
15 |
16 | ---
17 | ## ::: ultralytics.utils.callbacks.clearml._log_plot
18 |
19 |
20 | ---
21 | ## ::: ultralytics.utils.callbacks.clearml.on_pretrain_routine_start
22 |
23 |
24 | ---
25 | ## ::: ultralytics.utils.callbacks.clearml.on_train_epoch_end
26 |
27 |
28 | ---
29 | ## ::: ultralytics.utils.callbacks.clearml.on_fit_epoch_end
30 |
31 |
32 | ---
33 | ## ::: ultralytics.utils.callbacks.clearml.on_val_end
34 |
35 |
36 | ---
37 | ## ::: ultralytics.utils.callbacks.clearml.on_train_end
38 |
39 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.callbacks.dvc._log_images
14 |
15 |
16 | ---
17 | ## ::: ultralytics.utils.callbacks.dvc._log_plots
18 |
19 |
20 | ---
21 | ## ::: ultralytics.utils.callbacks.dvc._log_confusion_matrix
22 |
23 |
24 | ---
25 | ## ::: ultralytics.utils.callbacks.dvc.on_pretrain_routine_start
26 |
27 |
28 | ---
29 | ## ::: ultralytics.utils.callbacks.dvc.on_pretrain_routine_end
30 |
31 |
32 | ---
33 | ## ::: ultralytics.utils.callbacks.dvc.on_train_start
34 |
35 |
36 | ---
37 | ## ::: ultralytics.utils.callbacks.dvc.on_train_epoch_start
38 |
39 |
40 | ---
41 | ## ::: ultralytics.utils.callbacks.dvc.on_fit_epoch_end
42 |
43 |
44 | ---
45 | ## ::: ultralytics.utils.callbacks.dvc.on_train_end
46 |
47 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.callbacks.hub.on_pretrain_routine_end
14 |
15 |
16 | ---
17 | ## ::: ultralytics.utils.callbacks.hub.on_fit_epoch_end
18 |
19 |
20 | ---
21 | ## ::: ultralytics.utils.callbacks.hub.on_model_save
22 |
23 |
24 | ---
25 | ## ::: ultralytics.utils.callbacks.hub.on_train_end
26 |
27 |
28 | ---
29 | ## ::: ultralytics.utils.callbacks.hub.on_train_start
30 |
31 |
32 | ---
33 | ## ::: ultralytics.utils.callbacks.hub.on_val_start
34 |
35 |
36 | ---
37 | ## ::: ultralytics.utils.callbacks.hub.on_predict_start
38 |
39 |
40 | ---
41 | ## ::: ultralytics.utils.callbacks.hub.on_export_start
42 |
43 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.callbacks.mlflow.on_pretrain_routine_end
14 |
15 |
16 | ---
17 | ## ::: ultralytics.utils.callbacks.mlflow.on_fit_epoch_end
18 |
19 |
20 | ---
21 | ## ::: ultralytics.utils.callbacks.mlflow.on_train_end
22 |
23 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.callbacks.neptune._log_scalars
14 |
15 |
16 | ---
17 | ## ::: ultralytics.utils.callbacks.neptune._log_images
18 |
19 |
20 | ---
21 | ## ::: ultralytics.utils.callbacks.neptune._log_plot
22 |
23 |
24 | ---
25 | ## ::: ultralytics.utils.callbacks.neptune.on_pretrain_routine_start
26 |
27 |
28 | ---
29 | ## ::: ultralytics.utils.callbacks.neptune.on_train_epoch_end
30 |
31 |
32 | ---
33 | ## ::: ultralytics.utils.callbacks.neptune.on_fit_epoch_end
34 |
35 |
36 | ---
37 | ## ::: ultralytics.utils.callbacks.neptune.on_val_end
38 |
39 |
40 | ---
41 | ## ::: ultralytics.utils.callbacks.neptune.on_train_end
42 |
43 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.callbacks.raytune.on_fit_epoch_end
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.callbacks.tensorboard._log_scalars
14 |
15 |
16 | ---
17 | ## ::: ultralytics.utils.callbacks.tensorboard._log_tensorboard_graph
18 |
19 |
20 | ---
21 | ## ::: ultralytics.utils.callbacks.tensorboard.on_pretrain_routine_start
22 |
23 |
24 | ---
25 | ## ::: ultralytics.utils.callbacks.tensorboard.on_train_start
26 |
27 |
28 | ---
29 | ## ::: ultralytics.utils.callbacks.tensorboard.on_batch_end
30 |
31 |
32 | ---
33 | ## ::: ultralytics.utils.callbacks.tensorboard.on_fit_epoch_end
34 |
35 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.callbacks.wb._custom_table
14 |
15 |
16 | ---
17 | ## ::: ultralytics.utils.callbacks.wb._plot_curve
18 |
19 |
20 | ---
21 | ## ::: ultralytics.utils.callbacks.wb._log_plots
22 |
23 |
24 | ---
25 | ## ::: ultralytics.utils.callbacks.wb.on_pretrain_routine_start
26 |
27 |
28 | ---
29 | ## ::: ultralytics.utils.callbacks.wb.on_fit_epoch_end
30 |
31 |
32 | ---
33 | ## ::: ultralytics.utils.callbacks.wb.on_train_epoch_end
34 |
35 |
36 | ---
37 | ## ::: ultralytics.utils.callbacks.wb.on_train_end
38 |
39 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.dist.find_free_network_port
14 |
15 |
16 | ---
17 | ## ::: ultralytics.utils.dist.generate_ddp_file
18 |
19 |
20 | ---
21 | ## ::: ultralytics.utils.dist.generate_ddp_command
22 |
23 |
24 | ---
25 | ## ::: ultralytics.utils.dist.ddp_cleanup
26 |
27 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.downloads.is_url
14 |
15 |
16 | ---
17 | ## ::: ultralytics.utils.downloads.delete_dsstore
18 |
19 |
20 | ---
21 | ## ::: ultralytics.utils.downloads.zip_directory
22 |
23 |
24 | ---
25 | ## ::: ultralytics.utils.downloads.unzip_file
26 |
27 |
28 | ---
29 | ## ::: ultralytics.utils.downloads.check_disk_space
30 |
31 |
32 | ---
33 | ## ::: ultralytics.utils.downloads.get_google_drive_file_info
34 |
35 |
36 | ---
37 | ## ::: ultralytics.utils.downloads.safe_download
38 |
39 |
40 | ---
41 | ## ::: ultralytics.utils.downloads.get_github_assets
42 |
43 |
44 | ---
45 | ## ::: ultralytics.utils.downloads.attempt_download_asset
46 |
47 |
48 | ---
49 | ## ::: ultralytics.utils.downloads.download
50 |
51 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.errors.HUBModelError
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.files.WorkingDirectory
14 |
15 |
16 | ---
17 | ## ::: ultralytics.utils.files.spaces_in_path
18 |
19 |
20 | ---
21 | ## ::: ultralytics.utils.files.increment_path
22 |
23 |
24 | ---
25 | ## ::: ultralytics.utils.files.file_age
26 |
27 |
28 | ---
29 | ## ::: ultralytics.utils.files.file_date
30 |
31 |
32 | ---
33 | ## ::: ultralytics.utils.files.file_size
34 |
35 |
36 | ---
37 | ## ::: ultralytics.utils.files.get_latest_run
38 |
39 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.instance.Bboxes
14 |
15 |
16 | ---
17 | ## ::: ultralytics.utils.instance.Instances
18 |
19 |
20 | ---
21 | ## ::: ultralytics.utils.instance._ntuple
22 |
23 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.loss.VarifocalLoss
14 |
15 |
16 | ---
17 | ## ::: ultralytics.utils.loss.FocalLoss
18 |
19 |
20 | ---
21 | ## ::: ultralytics.utils.loss.BboxLoss
22 |
23 |
24 | ---
25 | ## ::: ultralytics.utils.loss.KeypointLoss
26 |
27 |
28 | ---
29 | ## ::: ultralytics.utils.loss.v8DetectionLoss
30 |
31 |
32 | ---
33 | ## ::: ultralytics.utils.loss.v8SegmentationLoss
34 |
35 |
36 | ---
37 | ## ::: ultralytics.utils.loss.v8PoseLoss
38 |
39 |
40 | ---
41 | ## ::: ultralytics.utils.loss.v8ClassificationLoss
42 |
43 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.patches.imread
14 |
15 |
16 | ---
17 | ## ::: ultralytics.utils.patches.imwrite
18 |
19 |
20 | ---
21 | ## ::: ultralytics.utils.patches.imshow
22 |
23 |
24 | ---
25 | ## ::: ultralytics.utils.patches.torch_save
26 |
27 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.plotting.Colors
14 |
15 |
16 | ---
17 | ## ::: ultralytics.utils.plotting.Annotator
18 |
19 |
20 | ---
21 | ## ::: ultralytics.utils.plotting.plot_labels
22 |
23 |
24 | ---
25 | ## ::: ultralytics.utils.plotting.save_one_box
26 |
27 |
28 | ---
29 | ## ::: ultralytics.utils.plotting.plot_images
30 |
31 |
32 | ---
33 | ## ::: ultralytics.utils.plotting.plot_results
34 |
35 |
36 | ---
37 | ## ::: ultralytics.utils.plotting.plt_color_scatter
38 |
39 |
40 | ---
41 | ## ::: ultralytics.utils.plotting.plot_tune_results
42 |
43 |
44 | ---
45 | ## ::: ultralytics.utils.plotting.output_to_target
46 |
47 |
48 | ---
49 | ## ::: ultralytics.utils.plotting.feature_visualization
50 |
51 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.tal.TaskAlignedAssigner
14 |
15 |
16 | ---
17 | ## ::: ultralytics.utils.tal.select_candidates_in_gts
18 |
19 |
20 | ---
21 | ## ::: ultralytics.utils.tal.select_highest_overlaps
22 |
23 |
24 | ---
25 | ## ::: ultralytics.utils.tal.make_anchors
26 |
27 |
28 | ---
29 | ## ::: ultralytics.utils.tal.dist2bbox
30 |
31 |
32 | ---
33 | ## ::: ultralytics.utils.tal.bbox2dist
34 |
35 |
--------------------------------------------------------------------------------
/ultralytics/docs/reference/utils/triton.md:
--------------------------------------------------------------------------------
1 | # Reference for `ultralytics/utils/triton.py`
2 |
3 | !!! note
4 |
5 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
6 |
7 | ---
8 | ## ::: ultralytics.utils.triton.TritonRemoteModel
9 |
10 |
--------------------------------------------------------------------------------
/ultralytics/docs/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 | Full source code for 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). Help us fix any issues you see by submitting a [Pull Request](https://docs.ultralytics.com/help/contributing/) 🛠️. Thank you 🙏!
11 |
12 | ---
13 | ## ::: ultralytics.utils.tuner.run_ray_tune
14 |
15 |
--------------------------------------------------------------------------------
/ultralytics/docs/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 |
--------------------------------------------------------------------------------
/ultralytics/docs/stylesheets/style.css:
--------------------------------------------------------------------------------
1 | /* Table format like GitHub ----------------------------------------------------------------------------------------- */
2 | th, td {
3 | border: 1px solid var(--md-typeset-table-color);
4 | border-spacing: 0;
5 | border-bottom: none;
6 | border-left: none;
7 | border-top: none;
8 | }
9 |
10 | .md-typeset__table {
11 | line-height: 1;
12 | }
13 |
14 | .md-typeset__table table:not([class]) {
15 | font-size: .74rem;
16 | border-right: none;
17 | }
18 |
19 | .md-typeset__table table:not([class]) td,
20 | .md-typeset__table table:not([class]) th {
21 | padding: 9px;
22 | }
23 |
24 | /* light mode alternating table bg colors */
25 | .md-typeset__table tr:nth-child(2n) {
26 | background-color: #f8f8f8;
27 | }
28 |
29 | /* dark mode alternating table bg colors */
30 | [data-md-color-scheme="slate"] .md-typeset__table tr:nth-child(2n) {
31 | background-color: hsla(var(--md-hue),25%,25%,1)
32 | }
33 | /* Table format like GitHub ----------------------------------------------------------------------------------------- */
34 |
35 | /* Code block vertical scroll */
36 | div.highlight {
37 | max-height: 20rem;
38 | overflow-y: auto; /* for adding a scrollbar when needed */
39 | }
40 |
41 | /* Set content width */
42 | .md-grid {
43 | max-width: 1440px;
44 | }
45 |
--------------------------------------------------------------------------------
/ultralytics/examples/YOLOv8-CPP-Inference/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.5)
2 |
3 | project(Yolov8CPPInference VERSION 0.1)
4 |
5 | set(CMAKE_INCLUDE_CURRENT_DIR ON)
6 |
7 | # CUDA
8 | set(CUDA_TOOLKIT_ROOT_DIR "/usr/local/cuda")
9 | find_package(CUDA 11 REQUIRED)
10 |
11 | set(CMAKE_CUDA_STANDARD 11)
12 | set(CMAKE_CUDA_STANDARD_REQUIRED ON)
13 | # !CUDA
14 |
15 | # OpenCV
16 | find_package(OpenCV REQUIRED)
17 | include_directories(${OpenCV_INCLUDE_DIRS})
18 | # !OpenCV
19 |
20 | set(PROJECT_SOURCES
21 | main.cpp
22 |
23 | inference.h
24 | inference.cpp
25 | )
26 |
27 | add_executable(Yolov8CPPInference ${PROJECT_SOURCES})
28 | target_link_libraries(Yolov8CPPInference ${OpenCV_LIBS})
29 |
--------------------------------------------------------------------------------
/ultralytics/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 |
--------------------------------------------------------------------------------
/ultralytics/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/examples/zidane.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/eventbasedvision/SEVD/5a187503f04092b7eb34683bbcb37933dde73d61/ultralytics/examples/zidane.jpg
--------------------------------------------------------------------------------
/ultralytics/requirements.txt:
--------------------------------------------------------------------------------
1 | # Ultralytics requirements
2 | # Example: pip install -r requirements.txt
3 |
4 | # Base ----------------------------------------
5 | matplotlib>=3.3.0
6 | numpy>=1.22.2 # pinned by Snyk to avoid a vulnerability
7 | opencv-python>=4.6.0
8 | pillow>=7.1.2
9 | pyyaml>=5.3.1
10 | requests>=2.23.0
11 | scipy>=1.4.1
12 | torch>=1.8.0
13 | torchvision>=0.9.0
14 | tqdm>=4.64.0
15 |
16 | # Logging -------------------------------------
17 | # tensorboard>=2.13.0
18 | # dvclive>=2.12.0
19 | # clearml
20 | # comet
21 |
22 | # Plotting ------------------------------------
23 | pandas>=1.1.4
24 | seaborn>=0.11.0
25 |
26 | # Export --------------------------------------
27 | # coremltools>=7.0 # CoreML export
28 | # onnx>=1.12.0 # ONNX export
29 | # onnxsim>=0.4.1 # ONNX simplifier
30 | # nvidia-pyindex # TensorRT export
31 | # nvidia-tensorrt # TensorRT export
32 | # scikit-learn==0.19.2 # CoreML quantization
33 | # tensorflow>=2.4.1 # TF exports (-cpu, -aarch64, -macos)
34 | # tflite-support
35 | # tensorflowjs>=3.9.0 # TF.js export
36 | # openvino-dev>=2023.0 # OpenVINO export
37 |
38 | # Extras --------------------------------------
39 | psutil # system utilization
40 | py-cpuinfo # display CPU info
41 | thop>=0.1.1 # FLOPs computation
42 | # ipython # interactive notebook
43 | # albumentations>=1.0.3 # training augmentations
44 | # pycocotools>=2.0.6 # COCO mAP
45 | # roboflow
46 |
--------------------------------------------------------------------------------
/ultralytics/ultralytics/__init__.py:
--------------------------------------------------------------------------------
1 | # Ultralytics YOLO 🚀, AGPL-3.0 license
2 |
3 | __version__ = '8.0.200'
4 |
5 | from ultralytics.models import RTDETR, SAM, YOLO
6 | from ultralytics.models.fastsam import FastSAM
7 | from ultralytics.models.nas import NAS
8 | from ultralytics.utils import SETTINGS as settings
9 | from ultralytics.utils.checks import check_yolo as checks
10 | from ultralytics.utils.downloads import download
11 |
12 | __all__ = '__version__', 'YOLO', 'NAS', 'SAM', 'FastSAM', 'RTDETR', 'checks', 'download', 'settings'
13 |
--------------------------------------------------------------------------------
/ultralytics/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 |
25 | # YOLOv3-SPP head
26 | head:
27 | [[-1, 1, Bottleneck, [1024, False]],
28 | [-1, 1, SPP, [512, [5, 9, 13]]],
29 | [-1, 1, Conv, [1024, 3, 1]],
30 | [-1, 1, Conv, [512, 1, 1]],
31 | [-1, 1, Conv, [1024, 3, 1]], # 15 (P5/32-large)
32 |
33 | [-2, 1, Conv, [256, 1, 1]],
34 | [-1, 1, nn.Upsample, [None, 2, 'nearest']],
35 | [[-1, 8], 1, Concat, [1]], # cat backbone P4
36 | [-1, 1, Bottleneck, [512, False]],
37 | [-1, 1, Bottleneck, [512, False]],
38 | [-1, 1, Conv, [256, 1, 1]],
39 | [-1, 1, Conv, [512, 3, 1]], # 22 (P4/16-medium)
40 |
41 | [-2, 1, Conv, [128, 1, 1]],
42 | [-1, 1, nn.Upsample, [None, 2, 'nearest']],
43 | [[-1, 6], 1, Concat, [1]], # cat backbone P3
44 | [-1, 1, Bottleneck, [256, False]],
45 | [-1, 2, Bottleneck, [256, False]], # 27 (P3/8-small)
46 |
47 | [[27, 22, 15], 1, Detect, [nc]], # Detect(P3, P4, P5)
48 | ]
49 |
--------------------------------------------------------------------------------
/ultralytics/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 |
27 | # YOLOv3-tiny head
28 | head:
29 | [[-1, 1, Conv, [1024, 3, 1]],
30 | [-1, 1, Conv, [256, 1, 1]],
31 | [-1, 1, Conv, [512, 3, 1]], # 15 (P5/32-large)
32 |
33 | [-2, 1, Conv, [128, 1, 1]],
34 | [-1, 1, nn.Upsample, [None, 2, 'nearest']],
35 | [[-1, 8], 1, Concat, [1]], # cat backbone P4
36 | [-1, 1, Conv, [256, 3, 1]], # 19 (P4/16-medium)
37 |
38 | [[19, 15], 1, Detect, [nc]], # Detect(P4, P5)
39 | ]
40 |
--------------------------------------------------------------------------------
/ultralytics/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 |
25 | # YOLOv3 head
26 | head:
27 | [[-1, 1, Bottleneck, [1024, False]],
28 | [-1, 1, Conv, [512, 1, 1]],
29 | [-1, 1, Conv, [1024, 3, 1]],
30 | [-1, 1, Conv, [512, 1, 1]],
31 | [-1, 1, Conv, [1024, 3, 1]], # 15 (P5/32-large)
32 |
33 | [-2, 1, Conv, [256, 1, 1]],
34 | [-1, 1, nn.Upsample, [None, 2, 'nearest']],
35 | [[-1, 8], 1, Concat, [1]], # cat backbone P4
36 | [-1, 1, Bottleneck, [512, False]],
37 | [-1, 1, Bottleneck, [512, False]],
38 | [-1, 1, Conv, [256, 1, 1]],
39 | [-1, 1, Conv, [512, 3, 1]], # 22 (P4/16-medium)
40 |
41 | [-2, 1, Conv, [128, 1, 1]],
42 | [-1, 1, nn.Upsample, [None, 2, 'nearest']],
43 | [[-1, 6], 1, Concat, [1]], # cat backbone P3
44 | [-1, 1, Bottleneck, [256, False]],
45 | [-1, 2, Bottleneck, [256, False]], # 27 (P3/8-small)
46 |
47 | [[27, 22, 15], 1, Detect, [nc]], # Detect(P3, P4, P5)
48 | ]
49 |
--------------------------------------------------------------------------------
/ultralytics/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 |
29 | # YOLOv5 v6.0 head
30 | head:
31 | [[-1, 1, Conv, [512, 1, 1]],
32 | [-1, 1, nn.Upsample, [None, 2, 'nearest']],
33 | [[-1, 6], 1, Concat, [1]], # cat backbone P4
34 | [-1, 3, C3, [512, False]], # 13
35 |
36 | [-1, 1, Conv, [256, 1, 1]],
37 | [-1, 1, nn.Upsample, [None, 2, 'nearest']],
38 | [[-1, 4], 1, Concat, [1]], # cat backbone P3
39 | [-1, 3, C3, [256, False]], # 17 (P3/8-small)
40 |
41 | [-1, 1, Conv, [256, 3, 2]],
42 | [[-1, 14], 1, Concat, [1]], # cat head P4
43 | [-1, 3, C3, [512, False]], # 20 (P4/16-medium)
44 |
45 | [-1, 1, Conv, [512, 3, 2]],
46 | [[-1, 10], 1, Concat, [1]], # cat head P5
47 | [-1, 3, C3, [1024, False]], # 23 (P5/32-large)
48 |
49 | [[17, 20, 23], 1, Detect, [nc]], # Detect(P3, P4, P5)
50 | ]
51 |
--------------------------------------------------------------------------------
/ultralytics/ultralytics/cfg/models/v6/yolov6.yaml:
--------------------------------------------------------------------------------
1 | # Ultralytics YOLO 🚀, AGPL-3.0 license
2 | # YOLOv6 object detection model with P3-P5 outputs. For Usage examples see https://docs.ultralytics.com/models/yolov6
3 |
4 | # Parameters
5 | nc: 80 # number of classes
6 | activation: nn.ReLU() # (optional) model default activation function
7 | scales: # model compound scaling constants, i.e. 'model=yolov6n.yaml' will call yolov8.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 | # YOLOv6-3.0s 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, 6, Conv, [128, 3, 1]]
21 | - [-1, 1, Conv, [256, 3, 2]] # 3-P3/8
22 | - [-1, 12, Conv, [256, 3, 1]]
23 | - [-1, 1, Conv, [512, 3, 2]] # 5-P4/16
24 | - [-1, 18, Conv, [512, 3, 1]]
25 | - [-1, 1, Conv, [1024, 3, 2]] # 7-P5/32
26 | - [-1, 6, Conv, [1024, 3, 1]]
27 | - [-1, 1, SPPF, [1024, 5]] # 9
28 |
29 | # YOLOv6-3.0s head
30 | head:
31 | - [-1, 1, Conv, [256, 1, 1]]
32 | - [-1, 1, nn.ConvTranspose2d, [256, 2, 2, 0]]
33 | - [[-1, 6], 1, Concat, [1]] # cat backbone P4
34 | - [-1, 1, Conv, [256, 3, 1]]
35 | - [-1, 9, Conv, [256, 3, 1]] # 14
36 |
37 | - [-1, 1, Conv, [128, 1, 1]]
38 | - [-1, 1, nn.ConvTranspose2d, [128, 2, 2, 0]]
39 | - [[-1, 4], 1, Concat, [1]] # cat backbone P3
40 | - [-1, 1, Conv, [128, 3, 1]]
41 | - [-1, 9, Conv, [128, 3, 1]] # 19
42 |
43 | - [-1, 1, Conv, [128, 3, 2]]
44 | - [[-1, 15], 1, Concat, [1]] # cat head P4
45 | - [-1, 1, Conv, [256, 3, 1]]
46 | - [-1, 9, Conv, [256, 3, 1]] # 23
47 |
48 | - [-1, 1, Conv, [256, 3, 2]]
49 | - [[-1, 10], 1, Concat, [1]] # cat head P5
50 | - [-1, 1, Conv, [512, 3, 1]]
51 | - [-1, 9, Conv, [512, 3, 1]] # 27
52 |
53 | - [[19, 23, 27], 1, Detect, [nc]] # Detect(P3, P4, P5)
54 |
--------------------------------------------------------------------------------
/ultralytics/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 |
--------------------------------------------------------------------------------
/ultralytics/ultralytics/cfg/models/v8/yolov8-p2.yaml:
--------------------------------------------------------------------------------
1 | # Ultralytics YOLO 🚀, AGPL-3.0 license
2 | # YOLOv8 object detection model with P2-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 | 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.0 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.0-p2 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, nn.Upsample, [None, 2, 'nearest']]
39 | - [[-1, 2], 1, Concat, [1]] # cat backbone P2
40 | - [-1, 3, C2f, [128]] # 18 (P2/4-xsmall)
41 |
42 | - [-1, 1, Conv, [128, 3, 2]]
43 | - [[-1, 15], 1, Concat, [1]] # cat head P3
44 | - [-1, 3, C2f, [256]] # 21 (P3/8-small)
45 |
46 | - [-1, 1, Conv, [256, 3, 2]]
47 | - [[-1, 12], 1, Concat, [1]] # cat head P4
48 | - [-1, 3, C2f, [512]] # 24 (P4/16-medium)
49 |
50 | - [-1, 1, Conv, [512, 3, 2]]
51 | - [[-1, 9], 1, Concat, [1]] # cat head P5
52 | - [-1, 3, C2f, [1024]] # 27 (P5/32-large)
53 |
54 | - [[18, 21, 24, 27], 1, Detect, [nc]] # Detect(P2, P3, P4, P5)
55 |
--------------------------------------------------------------------------------
/ultralytics/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 |
--------------------------------------------------------------------------------
/ultralytics/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 |
--------------------------------------------------------------------------------
/ultralytics/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/ultralytics/cfg/trackers/bytetrack.yaml:
--------------------------------------------------------------------------------
1 | # Ultralytics YOLO 🚀, AGPL-3.0 license
2 | # Default YOLO tracker settings for ByteTrack tracker https://github.com/ifzhang/ByteTrack
3 |
4 | tracker_type: bytetrack # 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 |
--------------------------------------------------------------------------------
/ultralytics/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__ = ('BaseDataset', 'ClassificationDataset', 'SemanticDataset', 'YOLODataset', 'build_yolo_dataset',
8 | 'build_dataloader', 'load_inference_source')
9 |
--------------------------------------------------------------------------------
/ultralytics/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 - <