ultralytics 8.3.56__tar.gz → 8.3.57__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ultralytics-8.3.56/ultralytics.egg-info → ultralytics-8.3.57}/PKG-INFO +1 -1
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/__init__.py +1 -1
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/data/augment.py +7 -7
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/data/converter.py +1 -1
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/data/split_dota.py +1 -1
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/data/utils.py +49 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/engine/exporter.py +3 -1
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/sam/amg.py +1 -1
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/sam/modules/blocks.py +11 -11
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/sam/modules/sam.py +2 -2
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/sam/predict.py +29 -30
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/trackers/utils/gmc.py +12 -12
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/__init__.py +5 -9
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/metrics.py +1 -1
- {ultralytics-8.3.56 → ultralytics-8.3.57/ultralytics.egg-info}/PKG-INFO +1 -1
- {ultralytics-8.3.56 → ultralytics-8.3.57}/LICENSE +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/README.md +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/pyproject.toml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/setup.cfg +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/tests/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/tests/conftest.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/tests/test_cli.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/tests/test_cuda.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/tests/test_engine.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/tests/test_exports.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/tests/test_integrations.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/tests/test_python.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/tests/test_solutions.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/assets/bus.jpg +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/assets/zidane.jpg +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/Argoverse.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/DOTAv1.5.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/DOTAv1.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/GlobalWheat2020.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/ImageNet.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/Objects365.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/SKU-110K.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/VOC.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/VisDrone.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/african-wildlife.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/brain-tumor.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/carparts-seg.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/coco-pose.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/coco.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/coco128-seg.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/coco128.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/coco8-pose.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/coco8-seg.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/coco8.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/crack-seg.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/dog-pose.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/dota8.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/hand-keypoints.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/lvis.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/medical-pills.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/open-images-v7.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/package-seg.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/signature.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/tiger-pose.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/datasets/xView.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/default.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/11/yolo11-cls.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/11/yolo11-obb.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/11/yolo11-pose.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/11/yolo11-seg.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/11/yolo11.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/rt-detr/rtdetr-l.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/rt-detr/rtdetr-resnet101.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/rt-detr/rtdetr-resnet50.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/rt-detr/rtdetr-x.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v10/yolov10b.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v10/yolov10l.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v10/yolov10m.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v10/yolov10n.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v10/yolov10s.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v10/yolov10x.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v3/yolov3-spp.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v3/yolov3-tiny.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v3/yolov3.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v5/yolov5-p6.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v5/yolov5.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v6/yolov6.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v8/yolov8-cls-resnet101.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v8/yolov8-cls-resnet50.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v8/yolov8-cls.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v8/yolov8-ghost-p2.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v8/yolov8-ghost-p6.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v8/yolov8-ghost.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v8/yolov8-obb.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v8/yolov8-p2.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v8/yolov8-p6.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v8/yolov8-pose-p6.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v8/yolov8-pose.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v8/yolov8-rtdetr.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v8/yolov8-seg-p6.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v8/yolov8-seg.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v8/yolov8-world.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v8/yolov8-worldv2.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v8/yolov8.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v9/yolov9c-seg.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v9/yolov9c.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v9/yolov9e-seg.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v9/yolov9e.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v9/yolov9m.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v9/yolov9s.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/models/v9/yolov9t.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/solutions/default.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/trackers/botsort.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/cfg/trackers/bytetrack.yaml +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/data/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/data/annotator.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/data/base.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/data/build.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/data/dataset.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/data/loaders.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/engine/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/engine/model.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/engine/predictor.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/engine/results.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/engine/trainer.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/engine/tuner.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/engine/validator.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/hub/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/hub/auth.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/hub/google/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/hub/session.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/hub/utils.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/fastsam/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/fastsam/model.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/fastsam/predict.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/fastsam/utils.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/fastsam/val.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/nas/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/nas/model.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/nas/predict.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/nas/val.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/rtdetr/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/rtdetr/model.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/rtdetr/predict.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/rtdetr/train.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/rtdetr/val.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/sam/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/sam/build.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/sam/model.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/sam/modules/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/sam/modules/decoders.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/sam/modules/encoders.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/sam/modules/memory_attention.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/sam/modules/tiny_encoder.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/sam/modules/transformer.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/sam/modules/utils.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/utils/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/utils/loss.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/utils/ops.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/classify/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/classify/predict.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/classify/train.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/classify/val.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/detect/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/detect/predict.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/detect/train.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/detect/val.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/model.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/obb/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/obb/predict.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/obb/train.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/obb/val.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/pose/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/pose/predict.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/pose/train.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/pose/val.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/segment/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/segment/predict.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/segment/train.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/segment/val.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/world/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/world/train.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/models/yolo/world/train_world.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/nn/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/nn/autobackend.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/nn/modules/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/nn/modules/activation.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/nn/modules/block.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/nn/modules/conv.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/nn/modules/head.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/nn/modules/transformer.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/nn/modules/utils.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/nn/tasks.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/solutions/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/solutions/ai_gym.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/solutions/analytics.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/solutions/distance_calculation.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/solutions/heatmap.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/solutions/object_counter.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/solutions/parking_management.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/solutions/queue_management.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/solutions/region_counter.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/solutions/security_alarm.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/solutions/solutions.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/solutions/speed_estimation.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/solutions/streamlit_inference.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/solutions/trackzone.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/trackers/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/trackers/basetrack.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/trackers/bot_sort.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/trackers/byte_tracker.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/trackers/track.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/trackers/utils/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/trackers/utils/kalman_filter.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/trackers/utils/matching.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/autobatch.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/benchmarks.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/callbacks/__init__.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/callbacks/base.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/callbacks/clearml.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/callbacks/comet.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/callbacks/dvc.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/callbacks/hub.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/callbacks/mlflow.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/callbacks/neptune.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/callbacks/raytune.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/callbacks/tensorboard.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/callbacks/wb.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/checks.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/dist.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/downloads.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/errors.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/files.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/instance.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/loss.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/ops.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/patches.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/plotting.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/tal.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/torch_utils.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/triton.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics/utils/tuner.py +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics.egg-info/SOURCES.txt +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics.egg-info/dependency_links.txt +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics.egg-info/entry_points.txt +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics.egg-info/requires.txt +0 -0
- {ultralytics-8.3.56 → ultralytics-8.3.57}/ultralytics.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ultralytics
|
3
|
-
Version: 8.3.
|
3
|
+
Version: 8.3.57
|
4
4
|
Summary: Ultralytics YOLO 🚀 for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification.
|
5
5
|
Author-email: Glenn Jocher <glenn.jocher@ultralytics.com>, Jing Qiu <jing.qiu@ultralytics.com>
|
6
6
|
Maintainer-email: Ultralytics <hello@ultralytics.com>
|
@@ -642,7 +642,7 @@ class Mosaic(BaseMixTransform):
|
|
642
642
|
c = s - w, s + h0 - h, s, s + h0
|
643
643
|
|
644
644
|
padw, padh = c[:2]
|
645
|
-
x1, y1, x2, y2 = (max(x, 0) for x in c) # allocate
|
645
|
+
x1, y1, x2, y2 = (max(x, 0) for x in c) # allocate coordinates
|
646
646
|
|
647
647
|
img3[y1:y2, x1:x2] = img[y1 - padh :, x1 - padw :] # img3[ymin:ymax, xmin:xmax]
|
648
648
|
# hp, wp = h, w # height, width previous for next iteration
|
@@ -771,7 +771,7 @@ class Mosaic(BaseMixTransform):
|
|
771
771
|
c = s - w, s + h0 - hp - h, s, s + h0 - hp
|
772
772
|
|
773
773
|
padw, padh = c[:2]
|
774
|
-
x1, y1, x2, y2 = (max(x, 0) for x in c) # allocate
|
774
|
+
x1, y1, x2, y2 = (max(x, 0) for x in c) # allocate coordinates
|
775
775
|
|
776
776
|
# Image
|
777
777
|
img9[y1:y2, x1:x2] = img[y1 - padh :, x1 - padw :] # img9[ymin:ymax, xmin:xmax]
|
@@ -1283,7 +1283,7 @@ class RandomPerspective:
|
|
1283
1283
|
eps (float): Small epsilon value to prevent division by zero.
|
1284
1284
|
|
1285
1285
|
Returns:
|
1286
|
-
(numpy.ndarray): Boolean array of shape (n
|
1286
|
+
(numpy.ndarray): Boolean array of shape (n) indicating which boxes are candidates.
|
1287
1287
|
True values correspond to boxes that meet all criteria.
|
1288
1288
|
|
1289
1289
|
Examples:
|
@@ -1320,7 +1320,7 @@ class RandomHSV:
|
|
1320
1320
|
>>> augmenter = RandomHSV(hgain=0.5, sgain=0.5, vgain=0.5)
|
1321
1321
|
>>> image = np.random.randint(0, 255, (100, 100, 3), dtype=np.uint8)
|
1322
1322
|
>>> labels = {"img": image}
|
1323
|
-
>>>
|
1323
|
+
>>> augmenter(labels)
|
1324
1324
|
>>> augmented_image = augmented_labels["img"]
|
1325
1325
|
"""
|
1326
1326
|
|
@@ -1337,7 +1337,7 @@ class RandomHSV:
|
|
1337
1337
|
|
1338
1338
|
Examples:
|
1339
1339
|
>>> hsv_aug = RandomHSV(hgain=0.5, sgain=0.5, vgain=0.5)
|
1340
|
-
>>>
|
1340
|
+
>>> hsv_aug(image)
|
1341
1341
|
"""
|
1342
1342
|
self.hgain = hgain
|
1343
1343
|
self.sgain = sgain
|
@@ -1419,7 +1419,7 @@ class RandomFlip:
|
|
1419
1419
|
|
1420
1420
|
Examples:
|
1421
1421
|
>>> flip = RandomFlip(p=0.5, direction="horizontal")
|
1422
|
-
>>>
|
1422
|
+
>>> flip_with_idx = RandomFlip(p=0.7, direction="vertical", flip_idx=[1, 0, 3, 2, 5, 4])
|
1423
1423
|
"""
|
1424
1424
|
assert direction in {"horizontal", "vertical"}, f"Support direction `horizontal` or `vertical`, got {direction}"
|
1425
1425
|
assert 0 <= p <= 1.0, f"The probability should be in range [0, 1], but got {p}."
|
@@ -2022,7 +2022,7 @@ class Format:
|
|
2022
2022
|
Returns:
|
2023
2023
|
(Dict): A dictionary with formatted data, including:
|
2024
2024
|
- 'img': Formatted image tensor.
|
2025
|
-
- 'cls': Class
|
2025
|
+
- 'cls': Class label's tensor.
|
2026
2026
|
- 'bboxes': Bounding boxes tensor in the specified format.
|
2027
2027
|
- 'masks': Instance masks tensor (if return_mask is True).
|
2028
2028
|
- 'keypoints': Keypoints tensor (if return_keypoint is True).
|
@@ -241,7 +241,7 @@ def convert_coco(
|
|
241
241
|
```python
|
242
242
|
from ultralytics.data.converter import convert_coco
|
243
243
|
|
244
|
-
convert_coco("../datasets/coco/annotations/", use_segments=True, use_keypoints=False, cls91to80=
|
244
|
+
convert_coco("../datasets/coco/annotations/", use_segments=True, use_keypoints=False, cls91to80=False)
|
245
245
|
convert_coco("../datasets/lvis/annotations/", use_segments=True, use_keypoints=False, cls91to80=False, lvis=True)
|
246
246
|
```
|
247
247
|
|
@@ -67,7 +67,7 @@ def load_yolo_dota(data_root, split="train"):
|
|
67
67
|
|
68
68
|
Args:
|
69
69
|
data_root (str): Data root.
|
70
|
-
split (str): The split data set, could be train or val
|
70
|
+
split (str): The split data set, could be `train` or `val`.
|
71
71
|
|
72
72
|
Notes:
|
73
73
|
The directory structure assumed for the DOTA dataset:
|
@@ -167,6 +167,55 @@ def verify_image_label(args):
|
|
167
167
|
return [None, None, None, None, None, nm, nf, ne, nc, msg]
|
168
168
|
|
169
169
|
|
170
|
+
def visualize_image_annotations(image_path, txt_path, label_map):
|
171
|
+
"""
|
172
|
+
Visualizes YOLO annotations (bounding boxes and class labels) on an image.
|
173
|
+
|
174
|
+
This function reads an image and its corresponding annotation file in YOLO format, then
|
175
|
+
draws bounding boxes around detected objects and labels them with their respective class names.
|
176
|
+
The bounding box colors are assigned based on the class ID, and the text color is dynamically
|
177
|
+
adjusted for readability, depending on the background color's luminance.
|
178
|
+
|
179
|
+
Args:
|
180
|
+
image_path (str): The path to the image file to annotate, and it can be in formats supported by PIL (e.g., .jpg, .png).
|
181
|
+
txt_path (str): The path to the annotation file in YOLO format, that should contain one line per object with:
|
182
|
+
- class_id (int): The class index.
|
183
|
+
- x_center (float): The X center of the bounding box (relative to image width).
|
184
|
+
- y_center (float): The Y center of the bounding box (relative to image height).
|
185
|
+
- width (float): The width of the bounding box (relative to image width).
|
186
|
+
- height (float): The height of the bounding box (relative to image height).
|
187
|
+
label_map (dict): A dictionary that maps class IDs (integers) to class labels (strings).
|
188
|
+
|
189
|
+
Example:
|
190
|
+
>>> label_map = {0: "cat", 1: "dog", 2: "bird"} # It should include all annotated classes details
|
191
|
+
>>> visualize_image_annotations("path/to/image.jpg", "path/to/annotations.txt", label_map)
|
192
|
+
"""
|
193
|
+
import matplotlib.pyplot as plt
|
194
|
+
|
195
|
+
from ultralytics.utils.plotting import colors
|
196
|
+
|
197
|
+
img = np.array(Image.open(image_path))
|
198
|
+
img_height, img_width = img.shape[:2]
|
199
|
+
annotations = []
|
200
|
+
with open(txt_path) as file:
|
201
|
+
for line in file:
|
202
|
+
class_id, x_center, y_center, width, height = map(float, line.split())
|
203
|
+
x = (x_center - width / 2) * img_width
|
204
|
+
y = (y_center - height / 2) * img_height
|
205
|
+
w = width * img_width
|
206
|
+
h = height * img_height
|
207
|
+
annotations.append((x, y, w, h, int(class_id)))
|
208
|
+
fig, ax = plt.subplots(1) # Plot the image and annotations
|
209
|
+
for x, y, w, h, label in annotations:
|
210
|
+
color = tuple(c / 255 for c in colors(label, True)) # Get and normalize the RGB color
|
211
|
+
rect = plt.Rectangle((x, y), w, h, linewidth=2, edgecolor=color, facecolor="none") # Create a rectangle
|
212
|
+
ax.add_patch(rect)
|
213
|
+
luminance = 0.2126 * color[0] + 0.7152 * color[1] + 0.0722 * color[2] # Formula for luminance
|
214
|
+
ax.text(x, y - 5, label_map[label], color="white" if luminance < 0.5 else "black", backgroundcolor=color)
|
215
|
+
ax.imshow(img)
|
216
|
+
plt.show()
|
217
|
+
|
218
|
+
|
170
219
|
def polygon2mask(imgsz, polygons, color=1, downsample_ratio=1):
|
171
220
|
"""
|
172
221
|
Convert a list of polygons to a binary mask of the specified image size.
|
@@ -250,7 +250,8 @@ class Exporter:
|
|
250
250
|
self.device = select_device("cpu" if self.args.device is None else self.args.device)
|
251
251
|
|
252
252
|
# Argument compatibility checks
|
253
|
-
|
253
|
+
fmt_keys = fmts_dict["Arguments"][flags.index(True) + 1]
|
254
|
+
validate_args(fmt, self.args, fmt_keys)
|
254
255
|
if imx and not self.args.int8:
|
255
256
|
LOGGER.warning("WARNING ⚠️ IMX only supports int8 export, setting int8=True.")
|
256
257
|
self.args.int8 = True
|
@@ -369,6 +370,7 @@ class Exporter:
|
|
369
370
|
"batch": self.args.batch,
|
370
371
|
"imgsz": self.imgsz,
|
371
372
|
"names": model.names,
|
373
|
+
"args": {k: v for k, v in self.args if k in fmt_keys},
|
372
374
|
} # model metadata
|
373
375
|
if model.task == "pose":
|
374
376
|
self.metadata["kpt_shape"] = model.model[-1].kpt_shape
|
@@ -76,7 +76,7 @@ def build_all_layer_point_grids(n_per_side: int, n_layers: int, scale_per_layer:
|
|
76
76
|
def generate_crop_boxes(
|
77
77
|
im_size: Tuple[int, ...], n_layers: int, overlap_ratio: float
|
78
78
|
) -> Tuple[List[List[int]], List[int]]:
|
79
|
-
"""Generates crop boxes of varying sizes for
|
79
|
+
"""Generates crop boxes of varying sizes for multiscale image processing, with layered overlapping regions."""
|
80
80
|
crop_boxes, layer_idxs = [], []
|
81
81
|
im_h, im_w = im_size
|
82
82
|
short_side = min(im_h, im_w)
|
@@ -502,11 +502,11 @@ def do_pool(x: torch.Tensor, pool: nn.Module, norm: nn.Module = None) -> torch.T
|
|
502
502
|
|
503
503
|
class MultiScaleAttention(nn.Module):
|
504
504
|
"""
|
505
|
-
Implements
|
505
|
+
Implements multiscale self-attention with optional query pooling for efficient feature extraction.
|
506
506
|
|
507
|
-
This class provides a flexible implementation of
|
507
|
+
This class provides a flexible implementation of multiscale attention, allowing for optional
|
508
508
|
downsampling of query features through pooling. It's designed to enhance the model's ability to
|
509
|
-
capture
|
509
|
+
capture multiscale information in visual tasks.
|
510
510
|
|
511
511
|
Attributes:
|
512
512
|
dim (int): Input dimension of the feature map.
|
@@ -518,7 +518,7 @@ class MultiScaleAttention(nn.Module):
|
|
518
518
|
proj (nn.Linear): Output projection.
|
519
519
|
|
520
520
|
Methods:
|
521
|
-
forward: Applies
|
521
|
+
forward: Applies multiscale attention to the input tensor.
|
522
522
|
|
523
523
|
Examples:
|
524
524
|
>>> import torch
|
@@ -537,7 +537,7 @@ class MultiScaleAttention(nn.Module):
|
|
537
537
|
num_heads: int,
|
538
538
|
q_pool: nn.Module = None,
|
539
539
|
):
|
540
|
-
"""Initializes
|
540
|
+
"""Initializes multiscale attention with optional query pooling for efficient feature extraction."""
|
541
541
|
super().__init__()
|
542
542
|
|
543
543
|
self.dim = dim
|
@@ -552,7 +552,7 @@ class MultiScaleAttention(nn.Module):
|
|
552
552
|
self.proj = nn.Linear(dim_out, dim_out)
|
553
553
|
|
554
554
|
def forward(self, x: torch.Tensor) -> torch.Tensor:
|
555
|
-
"""Applies
|
555
|
+
"""Applies multiscale attention with optional query pooling to extract multiscale features."""
|
556
556
|
B, H, W, _ = x.shape
|
557
557
|
# qkv with shape (B, H * W, 3, nHead, C)
|
558
558
|
qkv = self.qkv(x).reshape(B, H * W, 3, self.num_heads, -1)
|
@@ -582,9 +582,9 @@ class MultiScaleAttention(nn.Module):
|
|
582
582
|
|
583
583
|
class MultiScaleBlock(nn.Module):
|
584
584
|
"""
|
585
|
-
A
|
585
|
+
A multiscale attention block with window partitioning and query pooling for efficient vision transformers.
|
586
586
|
|
587
|
-
This class implements a
|
587
|
+
This class implements a multiscale attention mechanism with optional window partitioning and downsampling,
|
588
588
|
designed for use in vision transformer architectures.
|
589
589
|
|
590
590
|
Attributes:
|
@@ -601,7 +601,7 @@ class MultiScaleBlock(nn.Module):
|
|
601
601
|
proj (nn.Linear | None): Projection layer for dimension mismatch.
|
602
602
|
|
603
603
|
Methods:
|
604
|
-
forward: Processes input tensor through the
|
604
|
+
forward: Processes input tensor through the multiscale block.
|
605
605
|
|
606
606
|
Examples:
|
607
607
|
>>> block = MultiScaleBlock(dim=256, dim_out=512, num_heads=8, window_size=7)
|
@@ -623,7 +623,7 @@ class MultiScaleBlock(nn.Module):
|
|
623
623
|
act_layer: nn.Module = nn.GELU,
|
624
624
|
window_size: int = 0,
|
625
625
|
):
|
626
|
-
"""Initializes a
|
626
|
+
"""Initializes a multiscale attention block with window partitioning and optional query pooling."""
|
627
627
|
super().__init__()
|
628
628
|
|
629
629
|
if isinstance(norm_layer, str):
|
@@ -660,7 +660,7 @@ class MultiScaleBlock(nn.Module):
|
|
660
660
|
self.proj = nn.Linear(dim, dim_out)
|
661
661
|
|
662
662
|
def forward(self, x: torch.Tensor) -> torch.Tensor:
|
663
|
-
"""Processes input through
|
663
|
+
"""Processes input through multiscale attention and MLP, with optional windowing and downsampling."""
|
664
664
|
shortcut = x # B, H, W, C
|
665
665
|
x = self.norm1(x)
|
666
666
|
|
@@ -425,7 +425,7 @@ class SAM2Model(torch.nn.Module):
|
|
425
425
|
low_res_masks: Tensor of shape (B, 1, H*4, W*4) with the best low-resolution mask.
|
426
426
|
high_res_masks: Tensor of shape (B, 1, H*16, W*16) with the best high-resolution mask.
|
427
427
|
obj_ptr: Tensor of shape (B, C) with object pointer vector for the output mask.
|
428
|
-
object_score_logits: Tensor of shape (B
|
428
|
+
object_score_logits: Tensor of shape (B) with object score logits.
|
429
429
|
|
430
430
|
Where M is 3 if multimask_output=True, and 1 if multimask_output=False.
|
431
431
|
|
@@ -643,7 +643,7 @@ class SAM2Model(torch.nn.Module):
|
|
643
643
|
if not is_init_cond_frame:
|
644
644
|
# Retrieve the memories encoded with the maskmem backbone
|
645
645
|
to_cat_memory, to_cat_memory_pos_embed = [], []
|
646
|
-
# Add conditioning
|
646
|
+
# Add conditioning frame's output first (all cond frames have t_pos=0 for
|
647
647
|
# when getting temporal positional embedding below)
|
648
648
|
assert len(output_dict["cond_frame_outputs"]) > 0
|
649
649
|
# Select a maximum number of temporally closest cond frames for cross attention
|
@@ -1096,7 +1096,7 @@ class SAM2VideoPredictor(SAM2Predictor):
|
|
1096
1096
|
# to `propagate_in_video_preflight`).
|
1097
1097
|
consolidated_frame_inds = self.inference_state["consolidated_frame_inds"]
|
1098
1098
|
for is_cond in {False, True}:
|
1099
|
-
# Separately consolidate conditioning and non-conditioning temp
|
1099
|
+
# Separately consolidate conditioning and non-conditioning temp outputs
|
1100
1100
|
storage_key = "cond_frame_outputs" if is_cond else "non_cond_frame_outputs"
|
1101
1101
|
# Find all the frames that contain temporary outputs for any objects
|
1102
1102
|
# (these should be the frames that have just received clicks for mask inputs
|
@@ -1161,36 +1161,35 @@ class SAM2VideoPredictor(SAM2Predictor):
|
|
1161
1161
|
assert predictor.dataset is not None
|
1162
1162
|
assert predictor.dataset.mode == "video"
|
1163
1163
|
|
1164
|
-
inference_state = {
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1164
|
+
inference_state = {
|
1165
|
+
"num_frames": predictor.dataset.frames,
|
1166
|
+
"point_inputs_per_obj": {}, # inputs points on each frame
|
1167
|
+
"mask_inputs_per_obj": {}, # inputs mask on each frame
|
1168
|
+
"constants": {}, # values that don't change across frames (so we only need to hold one copy of them)
|
1169
|
+
# mapping between client-side object id and model-side object index
|
1170
|
+
"obj_id_to_idx": OrderedDict(),
|
1171
|
+
"obj_idx_to_id": OrderedDict(),
|
1172
|
+
"obj_ids": [],
|
1173
|
+
# A storage to hold the model's tracking results and states on each frame
|
1174
|
+
"output_dict": {
|
1175
|
+
"cond_frame_outputs": {}, # dict containing {frame_idx: <out>}
|
1176
|
+
"non_cond_frame_outputs": {}, # dict containing {frame_idx: <out>}
|
1177
|
+
},
|
1178
|
+
# Slice (view) of each object tracking results, sharing the same memory with "output_dict"
|
1179
|
+
"output_dict_per_obj": {},
|
1180
|
+
# A temporary storage to hold new outputs when user interact with a frame
|
1181
|
+
# to add clicks or mask (it's merged into "output_dict" before propagation starts)
|
1182
|
+
"temp_output_dict_per_obj": {},
|
1183
|
+
# Frames that already holds consolidated outputs from click or mask inputs
|
1184
|
+
# (we directly use their consolidated outputs during tracking)
|
1185
|
+
"consolidated_frame_inds": {
|
1186
|
+
"cond_frame_outputs": set(), # set containing frame indices
|
1187
|
+
"non_cond_frame_outputs": set(), # set containing frame indices
|
1188
|
+
},
|
1189
|
+
# metadata for each tracking frame (e.g. which direction it's tracked)
|
1190
|
+
"tracking_has_started": False,
|
1191
|
+
"frames_already_tracked": [],
|
1190
1192
|
}
|
1191
|
-
# metadata for each tracking frame (e.g. which direction it's tracked)
|
1192
|
-
inference_state["tracking_has_started"] = False
|
1193
|
-
inference_state["frames_already_tracked"] = []
|
1194
1193
|
predictor.inference_state = inference_state
|
1195
1194
|
|
1196
1195
|
def get_im_features(self, im, batch=1):
|
@@ -26,9 +26,9 @@ class GMC:
|
|
26
26
|
Methods:
|
27
27
|
__init__: Initializes a GMC object with the specified method and downscale factor.
|
28
28
|
apply: Applies the chosen method to a raw frame and optionally uses provided detections.
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
apply_ecc: Applies the ECC algorithm to a raw frame.
|
30
|
+
apply_features: Applies feature-based methods like ORB or SIFT to a raw frame.
|
31
|
+
apply_sparseoptflow: Applies the Sparse Optical Flow method to a raw frame.
|
32
32
|
reset_params: Resets the internal parameters of the GMC object.
|
33
33
|
|
34
34
|
Examples:
|
@@ -108,15 +108,15 @@ class GMC:
|
|
108
108
|
(480, 640, 3)
|
109
109
|
"""
|
110
110
|
if self.method in {"orb", "sift"}:
|
111
|
-
return self.
|
111
|
+
return self.apply_features(raw_frame, detections)
|
112
112
|
elif self.method == "ecc":
|
113
|
-
return self.
|
113
|
+
return self.apply_ecc(raw_frame)
|
114
114
|
elif self.method == "sparseOptFlow":
|
115
|
-
return self.
|
115
|
+
return self.apply_sparseoptflow(raw_frame)
|
116
116
|
else:
|
117
117
|
return np.eye(2, 3)
|
118
118
|
|
119
|
-
def
|
119
|
+
def apply_ecc(self, raw_frame: np.array) -> np.array:
|
120
120
|
"""
|
121
121
|
Apply the ECC (Enhanced Correlation Coefficient) algorithm to a raw frame for motion compensation.
|
122
122
|
|
@@ -128,7 +128,7 @@ class GMC:
|
|
128
128
|
|
129
129
|
Examples:
|
130
130
|
>>> gmc = GMC(method="ecc")
|
131
|
-
>>> processed_frame = gmc.
|
131
|
+
>>> processed_frame = gmc.apply_ecc(np.array([[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]]))
|
132
132
|
>>> print(processed_frame)
|
133
133
|
[[1. 0. 0.]
|
134
134
|
[0. 1. 0.]]
|
@@ -161,7 +161,7 @@ class GMC:
|
|
161
161
|
|
162
162
|
return H
|
163
163
|
|
164
|
-
def
|
164
|
+
def apply_features(self, raw_frame: np.array, detections: list = None) -> np.array:
|
165
165
|
"""
|
166
166
|
Apply feature-based methods like ORB or SIFT to a raw frame.
|
167
167
|
|
@@ -175,7 +175,7 @@ class GMC:
|
|
175
175
|
Examples:
|
176
176
|
>>> gmc = GMC(method="orb")
|
177
177
|
>>> raw_frame = np.random.randint(0, 255, (480, 640, 3), dtype=np.uint8)
|
178
|
-
>>> processed_frame = gmc.
|
178
|
+
>>> processed_frame = gmc.apply_features(raw_frame)
|
179
179
|
>>> print(processed_frame.shape)
|
180
180
|
(2, 3)
|
181
181
|
"""
|
@@ -304,7 +304,7 @@ class GMC:
|
|
304
304
|
|
305
305
|
return H
|
306
306
|
|
307
|
-
def
|
307
|
+
def apply_sparseoptflow(self, raw_frame: np.array) -> np.array:
|
308
308
|
"""
|
309
309
|
Apply Sparse Optical Flow method to a raw frame.
|
310
310
|
|
@@ -316,7 +316,7 @@ class GMC:
|
|
316
316
|
|
317
317
|
Examples:
|
318
318
|
>>> gmc = GMC()
|
319
|
-
>>> result = gmc.
|
319
|
+
>>> result = gmc.apply_sparseoptflow(np.array([[[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]]))
|
320
320
|
>>> print(result)
|
321
321
|
[[1. 0. 0.]
|
322
322
|
[0. 1. 0.]]
|
@@ -524,13 +524,9 @@ def read_device_model() -> str:
|
|
524
524
|
is_raspberrypi().
|
525
525
|
|
526
526
|
Returns:
|
527
|
-
(str):
|
527
|
+
(str): Kernel release information.
|
528
528
|
"""
|
529
|
-
|
530
|
-
with open("/proc/device-tree/model") as f:
|
531
|
-
return f.read()
|
532
|
-
except Exception:
|
533
|
-
return ""
|
529
|
+
return platform.release().lower()
|
534
530
|
|
535
531
|
|
536
532
|
def is_ubuntu() -> bool:
|
@@ -602,7 +598,7 @@ def is_raspberrypi() -> bool:
|
|
602
598
|
Returns:
|
603
599
|
(bool): True if running on a Raspberry Pi, False otherwise.
|
604
600
|
"""
|
605
|
-
return "
|
601
|
+
return "rpi" in DEVICE_MODEL
|
606
602
|
|
607
603
|
|
608
604
|
def is_jetson() -> bool:
|
@@ -612,7 +608,7 @@ def is_jetson() -> bool:
|
|
612
608
|
Returns:
|
613
609
|
(bool): True if running on an NVIDIA Jetson device, False otherwise.
|
614
610
|
"""
|
615
|
-
return
|
611
|
+
return "tegra" in DEVICE_MODEL
|
616
612
|
|
617
613
|
|
618
614
|
def is_online() -> bool:
|
@@ -802,7 +798,7 @@ def get_user_config_dir(sub_dir="Ultralytics"):
|
|
802
798
|
|
803
799
|
|
804
800
|
# Define constants (required below)
|
805
|
-
|
801
|
+
DEVICE_MODEL = read_device_model() # is_jetson() and is_raspberrypi() depend on this constant
|
806
802
|
ONLINE = is_online()
|
807
803
|
IS_COLAB = is_colab()
|
808
804
|
IS_KAGGLE = is_kaggle()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ultralytics
|
3
|
-
Version: 8.3.
|
3
|
+
Version: 8.3.57
|
4
4
|
Summary: Ultralytics YOLO 🚀 for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification.
|
5
5
|
Author-email: Glenn Jocher <glenn.jocher@ultralytics.com>, Jing Qiu <jing.qiu@ultralytics.com>
|
6
6
|
Maintainer-email: Ultralytics <hello@ultralytics.com>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|