ultralytics 8.3.5__tar.gz → 8.3.7__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.
Potentially problematic release.
This version of ultralytics might be problematic. Click here for more details.
- {ultralytics-8.3.5/ultralytics.egg-info → ultralytics-8.3.7}/PKG-INFO +8 -9
- {ultralytics-8.3.5 → ultralytics-8.3.7}/README.md +7 -7
- {ultralytics-8.3.5 → ultralytics-8.3.7}/pyproject.toml +1 -2
- {ultralytics-8.3.5 → ultralytics-8.3.7}/tests/test_solutions.py +6 -8
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/__init__.py +1 -1
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/solutions/default.yaml +4 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/data/converter.py +64 -6
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/data/explorer/gui/dash.py +4 -17
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/engine/exporter.py +3 -4
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/engine/model.py +2 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/engine/trainer.py +4 -4
- ultralytics-8.3.7/ultralytics/solutions/ai_gym.py +79 -0
- ultralytics-8.3.7/ultralytics/solutions/heatmap.py +93 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/solutions/object_counter.py +19 -17
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/solutions/solutions.py +9 -4
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/__init__.py +47 -46
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/autobatch.py +3 -1
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/checks.py +36 -20
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/plotting.py +50 -70
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/torch_utils.py +12 -5
- {ultralytics-8.3.5 → ultralytics-8.3.7/ultralytics.egg-info}/PKG-INFO +8 -9
- ultralytics-8.3.5/ultralytics/solutions/ai_gym.py +0 -127
- ultralytics-8.3.5/ultralytics/solutions/heatmap.py +0 -249
- {ultralytics-8.3.5 → ultralytics-8.3.7}/LICENSE +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/setup.cfg +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/tests/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/tests/conftest.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/tests/test_cli.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/tests/test_cuda.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/tests/test_engine.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/tests/test_explorer.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/tests/test_exports.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/tests/test_integrations.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/tests/test_python.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/assets/bus.jpg +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/assets/zidane.jpg +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/Argoverse.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/DOTAv1.5.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/DOTAv1.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/GlobalWheat2020.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/ImageNet.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/Objects365.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/SKU-110K.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/VOC.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/VisDrone.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/african-wildlife.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/brain-tumor.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/carparts-seg.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/coco-pose.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/coco.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/coco128-seg.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/coco128.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/coco8-pose.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/coco8-seg.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/coco8.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/crack-seg.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/dota8.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/hand-keypoints.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/lvis.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/open-images-v7.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/package-seg.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/signature.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/tiger-pose.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/datasets/xView.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/default.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/11/yolo11-cls.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/11/yolo11-obb.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/11/yolo11-pose.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/11/yolo11-seg.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/11/yolo11.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/rt-detr/rtdetr-l.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/rt-detr/rtdetr-resnet101.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/rt-detr/rtdetr-resnet50.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/rt-detr/rtdetr-x.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v10/yolov10b.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v10/yolov10l.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v10/yolov10m.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v10/yolov10n.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v10/yolov10s.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v10/yolov10x.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v3/yolov3-spp.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v3/yolov3-tiny.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v3/yolov3.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v5/yolov5-p6.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v5/yolov5.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v6/yolov6.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v8/yolov8-cls-resnet101.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v8/yolov8-cls-resnet50.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v8/yolov8-cls.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v8/yolov8-ghost-p2.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v8/yolov8-ghost-p6.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v8/yolov8-ghost.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v8/yolov8-obb.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v8/yolov8-p2.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v8/yolov8-p6.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v8/yolov8-pose-p6.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v8/yolov8-pose.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v8/yolov8-rtdetr.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v8/yolov8-seg-p6.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v8/yolov8-seg.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v8/yolov8-world.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v8/yolov8-worldv2.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v8/yolov8.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v9/yolov9c-seg.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v9/yolov9c.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v9/yolov9e-seg.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v9/yolov9e.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v9/yolov9m.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v9/yolov9s.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/models/v9/yolov9t.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/trackers/botsort.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/cfg/trackers/bytetrack.yaml +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/data/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/data/annotator.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/data/augment.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/data/base.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/data/build.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/data/dataset.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/data/explorer/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/data/explorer/explorer.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/data/explorer/gui/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/data/explorer/utils.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/data/loaders.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/data/split_dota.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/data/utils.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/engine/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/engine/predictor.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/engine/results.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/engine/tuner.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/engine/validator.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/hub/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/hub/auth.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/hub/google/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/hub/session.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/hub/utils.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/fastsam/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/fastsam/model.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/fastsam/predict.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/fastsam/utils.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/fastsam/val.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/nas/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/nas/model.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/nas/predict.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/nas/val.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/rtdetr/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/rtdetr/model.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/rtdetr/predict.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/rtdetr/train.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/rtdetr/val.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/sam/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/sam/amg.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/sam/build.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/sam/model.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/sam/modules/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/sam/modules/blocks.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/sam/modules/decoders.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/sam/modules/encoders.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/sam/modules/memory_attention.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/sam/modules/sam.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/sam/modules/tiny_encoder.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/sam/modules/transformer.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/sam/modules/utils.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/sam/predict.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/utils/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/utils/loss.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/utils/ops.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/classify/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/classify/predict.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/classify/train.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/classify/val.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/detect/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/detect/predict.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/detect/train.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/detect/val.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/model.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/obb/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/obb/predict.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/obb/train.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/obb/val.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/pose/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/pose/predict.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/pose/train.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/pose/val.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/segment/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/segment/predict.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/segment/train.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/segment/val.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/world/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/world/train.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/models/yolo/world/train_world.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/nn/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/nn/autobackend.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/nn/modules/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/nn/modules/activation.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/nn/modules/block.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/nn/modules/conv.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/nn/modules/head.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/nn/modules/transformer.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/nn/modules/utils.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/nn/tasks.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/solutions/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/solutions/analytics.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/solutions/distance_calculation.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/solutions/parking_management.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/solutions/queue_management.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/solutions/speed_estimation.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/solutions/streamlit_inference.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/trackers/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/trackers/basetrack.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/trackers/bot_sort.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/trackers/byte_tracker.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/trackers/track.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/trackers/utils/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/trackers/utils/gmc.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/trackers/utils/kalman_filter.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/trackers/utils/matching.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/benchmarks.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/callbacks/__init__.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/callbacks/base.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/callbacks/clearml.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/callbacks/comet.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/callbacks/dvc.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/callbacks/hub.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/callbacks/mlflow.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/callbacks/neptune.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/callbacks/raytune.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/callbacks/tensorboard.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/callbacks/wb.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/dist.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/downloads.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/errors.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/files.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/instance.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/loss.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/metrics.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/ops.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/patches.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/tal.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/triton.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics/utils/tuner.py +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics.egg-info/SOURCES.txt +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics.egg-info/dependency_links.txt +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics.egg-info/entry_points.txt +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics.egg-info/requires.txt +0 -0
- {ultralytics-8.3.5 → ultralytics-8.3.7}/ultralytics.egg-info/top_level.txt +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ultralytics
|
|
3
|
-
Version: 8.3.
|
|
3
|
+
Version: 8.3.7
|
|
4
4
|
Summary: Ultralytics YOLO for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification.
|
|
5
|
-
Author: Ayush Chaurasia
|
|
6
5
|
Author-email: Glenn Jocher <glenn.jocher@ultralytics.com>, Jing Qiu <jing.qiu@ultralytics.com>
|
|
7
6
|
Maintainer-email: Ultralytics <hello@ultralytics.com>
|
|
8
7
|
License: AGPL-3.0
|
|
@@ -99,8 +98,8 @@ Requires-Dist: pycocotools>=2.0.7; extra == "extra"
|
|
|
99
98
|
<a href="https://github.com/ultralytics/ultralytics/actions/workflows/ci.yaml"><img src="https://github.com/ultralytics/ultralytics/actions/workflows/ci.yaml/badge.svg" alt="Ultralytics CI"></a>
|
|
100
99
|
<a href="https://zenodo.org/badge/latestdoi/264818686"><img src="https://zenodo.org/badge/264818686.svg" alt="Ultralytics YOLO Citation"></a>
|
|
101
100
|
<a href="https://hub.docker.com/r/ultralytics/ultralytics"><img src="https://img.shields.io/docker/pulls/ultralytics/ultralytics?logo=docker" alt="Ultralytics Docker Pulls"></a>
|
|
102
|
-
<a href="https://
|
|
103
|
-
<a href="https://community.ultralytics.com"><img alt="Ultralytics Forums" src="https://img.shields.io/discourse/users?server=https%3A%2F%2Fcommunity.ultralytics.com&logo=discourse&label=Forums&color=blue"></a>
|
|
101
|
+
<a href="https://discord.com/invite/ultralytics"><img alt="Ultralytics Discord" src="https://img.shields.io/discord/1089800235347353640?logo=discord&logoColor=white&label=Discord&color=blue"></a>
|
|
102
|
+
<a href="https://community.ultralytics.com/"><img alt="Ultralytics Forums" src="https://img.shields.io/discourse/users?server=https%3A%2F%2Fcommunity.ultralytics.com&logo=discourse&label=Forums&color=blue"></a>
|
|
104
103
|
<a href="https://reddit.com/r/ultralytics"><img alt="Ultralytics Reddit" src="https://img.shields.io/reddit/subreddit-subscribers/ultralytics?style=flat&logo=reddit&logoColor=white&label=Reddit&color=blue"></a>
|
|
105
104
|
<br>
|
|
106
105
|
<a href="https://console.paperspace.com/github/ultralytics/ultralytics"><img src="https://assets.paperspace.io/img/gradient-badge.svg" alt="Run Ultralytics on Gradient"></a>
|
|
@@ -111,7 +110,7 @@ Requires-Dist: pycocotools>=2.0.7; extra == "extra"
|
|
|
111
110
|
|
|
112
111
|
[Ultralytics](https://www.ultralytics.com/) [YOLO11](https://github.com/ultralytics/ultralytics) is a cutting-edge, state-of-the-art (SOTA) model that builds upon the success of previous YOLO versions and introduces new features and improvements to further boost performance and flexibility. YOLO11 is designed to be fast, accurate, and easy to use, making it an excellent choice for a wide range of object detection and tracking, instance segmentation, image classification and pose estimation tasks.
|
|
113
112
|
|
|
114
|
-
We hope that the resources here will help you get the most out of YOLO. Please browse the Ultralytics <a href="https://docs.ultralytics.com/">Docs</a> for details, raise an issue on <a href="https://github.com/ultralytics/ultralytics/issues/new/choose">GitHub</a> for support, questions, or discussions, become a member of the Ultralytics <a href="https://
|
|
113
|
+
We hope that the resources here will help you get the most out of YOLO. Please browse the Ultralytics <a href="https://docs.ultralytics.com/">Docs</a> for details, raise an issue on <a href="https://github.com/ultralytics/ultralytics/issues/new/choose">GitHub</a> for support, questions, or discussions, become a member of the Ultralytics <a href="https://discord.com/invite/ultralytics">Discord</a>, <a href="https://reddit.com/r/ultralytics">Reddit</a> and <a href="https://community.ultralytics.com/">Forums</a>!
|
|
115
114
|
|
|
116
115
|
To request an Enterprise License please complete the form at [Ultralytics Licensing](https://www.ultralytics.com/license).
|
|
117
116
|
|
|
@@ -130,7 +129,7 @@ To request an Enterprise License please complete the form at [Ultralytics Licens
|
|
|
130
129
|
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%" alt="space">
|
|
131
130
|
<a href="https://ultralytics.com/bilibili"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-bilibili.png" width="2%" alt="Ultralytics BiliBili"></a>
|
|
132
131
|
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%" alt="space">
|
|
133
|
-
<a href="https://
|
|
132
|
+
<a href="https://discord.com/invite/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-discord.png" width="2%" alt="Ultralytics Discord"></a>
|
|
134
133
|
</div>
|
|
135
134
|
</div>
|
|
136
135
|
|
|
@@ -299,7 +298,7 @@ See [OBB Docs](https://docs.ultralytics.com/tasks/obb/) for usage examples with
|
|
|
299
298
|
Our key integrations with leading AI platforms extend the functionality of Ultralytics' offerings, enhancing tasks like dataset labeling, training, visualization, and model management. Discover how Ultralytics, in collaboration with [Roboflow](https://roboflow.com/?ref=ultralytics), ClearML, [Comet](https://bit.ly/yolov8-readme-comet), Neural Magic and [OpenVINO](https://docs.ultralytics.com/integrations/openvino/), can optimize your AI workflow.
|
|
300
299
|
|
|
301
300
|
<br>
|
|
302
|
-
<a href="https://ultralytics.com/hub" target="_blank">
|
|
301
|
+
<a href="https://www.ultralytics.com/hub" target="_blank">
|
|
303
302
|
<img width="100%" src="https://github.com/ultralytics/assets/raw/main/yolov8/banner-integrations.png" alt="Ultralytics active learning integrations"></a>
|
|
304
303
|
<br>
|
|
305
304
|
<br>
|
|
@@ -326,7 +325,7 @@ Our key integrations with leading AI platforms extend the functionality of Ultra
|
|
|
326
325
|
|
|
327
326
|
Experience seamless AI with [Ultralytics HUB](https://www.ultralytics.com/hub) ⭐, the all-in-one solution for data visualization, YOLO11 🚀 model training and deployment, without any coding. Transform images into actionable insights and bring your AI visions to life with ease using our cutting-edge platform and user-friendly [Ultralytics App](https://www.ultralytics.com/app-install). Start your journey for **Free** now!
|
|
328
327
|
|
|
329
|
-
<a href="https://ultralytics.com/hub" target="_blank">
|
|
328
|
+
<a href="https://www.ultralytics.com/hub" target="_blank">
|
|
330
329
|
<img width="100%" src="https://github.com/ultralytics/assets/raw/main/im/ultralytics-hub.png" alt="Ultralytics HUB preview image"></a>
|
|
331
330
|
|
|
332
331
|
## <div align="center">Contribute</div>
|
|
@@ -363,5 +362,5 @@ For Ultralytics bug reports and feature requests please visit [GitHub Issues](ht
|
|
|
363
362
|
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%" alt="space">
|
|
364
363
|
<a href="https://ultralytics.com/bilibili"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-bilibili.png" width="3%" alt="Ultralytics BiliBili"></a>
|
|
365
364
|
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%" alt="space">
|
|
366
|
-
<a href="https://
|
|
365
|
+
<a href="https://discord.com/invite/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-discord.png" width="3%" alt="Ultralytics Discord"></a>
|
|
367
366
|
</div>
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
<a href="https://github.com/ultralytics/ultralytics/actions/workflows/ci.yaml"><img src="https://github.com/ultralytics/ultralytics/actions/workflows/ci.yaml/badge.svg" alt="Ultralytics CI"></a>
|
|
11
11
|
<a href="https://zenodo.org/badge/latestdoi/264818686"><img src="https://zenodo.org/badge/264818686.svg" alt="Ultralytics YOLO Citation"></a>
|
|
12
12
|
<a href="https://hub.docker.com/r/ultralytics/ultralytics"><img src="https://img.shields.io/docker/pulls/ultralytics/ultralytics?logo=docker" alt="Ultralytics Docker Pulls"></a>
|
|
13
|
-
<a href="https://
|
|
14
|
-
<a href="https://community.ultralytics.com"><img alt="Ultralytics Forums" src="https://img.shields.io/discourse/users?server=https%3A%2F%2Fcommunity.ultralytics.com&logo=discourse&label=Forums&color=blue"></a>
|
|
13
|
+
<a href="https://discord.com/invite/ultralytics"><img alt="Ultralytics Discord" src="https://img.shields.io/discord/1089800235347353640?logo=discord&logoColor=white&label=Discord&color=blue"></a>
|
|
14
|
+
<a href="https://community.ultralytics.com/"><img alt="Ultralytics Forums" src="https://img.shields.io/discourse/users?server=https%3A%2F%2Fcommunity.ultralytics.com&logo=discourse&label=Forums&color=blue"></a>
|
|
15
15
|
<a href="https://reddit.com/r/ultralytics"><img alt="Ultralytics Reddit" src="https://img.shields.io/reddit/subreddit-subscribers/ultralytics?style=flat&logo=reddit&logoColor=white&label=Reddit&color=blue"></a>
|
|
16
16
|
<br>
|
|
17
17
|
<a href="https://console.paperspace.com/github/ultralytics/ultralytics"><img src="https://assets.paperspace.io/img/gradient-badge.svg" alt="Run Ultralytics on Gradient"></a>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
[Ultralytics](https://www.ultralytics.com/) [YOLO11](https://github.com/ultralytics/ultralytics) is a cutting-edge, state-of-the-art (SOTA) model that builds upon the success of previous YOLO versions and introduces new features and improvements to further boost performance and flexibility. YOLO11 is designed to be fast, accurate, and easy to use, making it an excellent choice for a wide range of object detection and tracking, instance segmentation, image classification and pose estimation tasks.
|
|
24
24
|
|
|
25
|
-
We hope that the resources here will help you get the most out of YOLO. Please browse the Ultralytics <a href="https://docs.ultralytics.com/">Docs</a> for details, raise an issue on <a href="https://github.com/ultralytics/ultralytics/issues/new/choose">GitHub</a> for support, questions, or discussions, become a member of the Ultralytics <a href="https://
|
|
25
|
+
We hope that the resources here will help you get the most out of YOLO. Please browse the Ultralytics <a href="https://docs.ultralytics.com/">Docs</a> for details, raise an issue on <a href="https://github.com/ultralytics/ultralytics/issues/new/choose">GitHub</a> for support, questions, or discussions, become a member of the Ultralytics <a href="https://discord.com/invite/ultralytics">Discord</a>, <a href="https://reddit.com/r/ultralytics">Reddit</a> and <a href="https://community.ultralytics.com/">Forums</a>!
|
|
26
26
|
|
|
27
27
|
To request an Enterprise License please complete the form at [Ultralytics Licensing](https://www.ultralytics.com/license).
|
|
28
28
|
|
|
@@ -41,7 +41,7 @@ To request an Enterprise License please complete the form at [Ultralytics Licens
|
|
|
41
41
|
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%" alt="space">
|
|
42
42
|
<a href="https://ultralytics.com/bilibili"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-bilibili.png" width="2%" alt="Ultralytics BiliBili"></a>
|
|
43
43
|
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="2%" alt="space">
|
|
44
|
-
<a href="https://
|
|
44
|
+
<a href="https://discord.com/invite/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-discord.png" width="2%" alt="Ultralytics Discord"></a>
|
|
45
45
|
</div>
|
|
46
46
|
</div>
|
|
47
47
|
|
|
@@ -210,7 +210,7 @@ See [OBB Docs](https://docs.ultralytics.com/tasks/obb/) for usage examples with
|
|
|
210
210
|
Our key integrations with leading AI platforms extend the functionality of Ultralytics' offerings, enhancing tasks like dataset labeling, training, visualization, and model management. Discover how Ultralytics, in collaboration with [Roboflow](https://roboflow.com/?ref=ultralytics), ClearML, [Comet](https://bit.ly/yolov8-readme-comet), Neural Magic and [OpenVINO](https://docs.ultralytics.com/integrations/openvino/), can optimize your AI workflow.
|
|
211
211
|
|
|
212
212
|
<br>
|
|
213
|
-
<a href="https://ultralytics.com/hub" target="_blank">
|
|
213
|
+
<a href="https://www.ultralytics.com/hub" target="_blank">
|
|
214
214
|
<img width="100%" src="https://github.com/ultralytics/assets/raw/main/yolov8/banner-integrations.png" alt="Ultralytics active learning integrations"></a>
|
|
215
215
|
<br>
|
|
216
216
|
<br>
|
|
@@ -237,7 +237,7 @@ Our key integrations with leading AI platforms extend the functionality of Ultra
|
|
|
237
237
|
|
|
238
238
|
Experience seamless AI with [Ultralytics HUB](https://www.ultralytics.com/hub) ⭐, the all-in-one solution for data visualization, YOLO11 🚀 model training and deployment, without any coding. Transform images into actionable insights and bring your AI visions to life with ease using our cutting-edge platform and user-friendly [Ultralytics App](https://www.ultralytics.com/app-install). Start your journey for **Free** now!
|
|
239
239
|
|
|
240
|
-
<a href="https://ultralytics.com/hub" target="_blank">
|
|
240
|
+
<a href="https://www.ultralytics.com/hub" target="_blank">
|
|
241
241
|
<img width="100%" src="https://github.com/ultralytics/assets/raw/main/im/ultralytics-hub.png" alt="Ultralytics HUB preview image"></a>
|
|
242
242
|
|
|
243
243
|
## <div align="center">Contribute</div>
|
|
@@ -274,5 +274,5 @@ For Ultralytics bug reports and feature requests please visit [GitHub Issues](ht
|
|
|
274
274
|
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%" alt="space">
|
|
275
275
|
<a href="https://ultralytics.com/bilibili"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-bilibili.png" width="3%" alt="Ultralytics BiliBili"></a>
|
|
276
276
|
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%" alt="space">
|
|
277
|
-
<a href="https://
|
|
277
|
+
<a href="https://discord.com/invite/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-discord.png" width="3%" alt="Ultralytics Discord"></a>
|
|
278
278
|
</div>
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
# For comprehensive documentation and usage instructions, visit: https://docs.ultralytics.com
|
|
20
20
|
|
|
21
21
|
[build-system]
|
|
22
|
-
requires = ["setuptools>=
|
|
22
|
+
requires = ["setuptools>=70.0.0", "wheel"]
|
|
23
23
|
build-backend = "setuptools.build_meta"
|
|
24
24
|
|
|
25
25
|
# Project settings -----------------------------------------------------------------------------------------------------
|
|
@@ -34,7 +34,6 @@ keywords = ["machine-learning", "deep-learning", "computer-vision", "ML", "DL",
|
|
|
34
34
|
authors = [
|
|
35
35
|
{ name = "Glenn Jocher", email = "glenn.jocher@ultralytics.com" },
|
|
36
36
|
{ name = "Jing Qiu", email = "jing.qiu@ultralytics.com" },
|
|
37
|
-
{ name = "Ayush Chaurasia" },
|
|
38
37
|
]
|
|
39
38
|
maintainers = [
|
|
40
39
|
{ name = "Ultralytics", email = "hello@ultralytics.com" },
|
|
@@ -19,8 +19,8 @@ def test_major_solutions():
|
|
|
19
19
|
cap = cv2.VideoCapture("solutions_ci_demo.mp4")
|
|
20
20
|
assert cap.isOpened(), "Error reading video file"
|
|
21
21
|
region_points = [(20, 400), (1080, 404), (1080, 360), (20, 360)]
|
|
22
|
-
|
|
23
|
-
heatmap = solutions.Heatmap(colormap=cv2.COLORMAP_PARULA,
|
|
22
|
+
counter = solutions.ObjectCounter(region=region_points, model="yolo11n.pt", show=False)
|
|
23
|
+
heatmap = solutions.Heatmap(colormap=cv2.COLORMAP_PARULA, model="yolo11n.pt", show=False)
|
|
24
24
|
speed = solutions.SpeedEstimator(reg_pts=region_points, names=names, view_img=False)
|
|
25
25
|
queue = solutions.QueueManager(names=names, reg_pts=region_points, view_img=False)
|
|
26
26
|
while cap.isOpened():
|
|
@@ -29,8 +29,8 @@ def test_major_solutions():
|
|
|
29
29
|
break
|
|
30
30
|
original_im0 = im0.copy()
|
|
31
31
|
tracks = model.track(im0, persist=True, show=False)
|
|
32
|
-
|
|
33
|
-
_ = heatmap.generate_heatmap(original_im0.copy()
|
|
32
|
+
_ = counter.count(original_im0.copy())
|
|
33
|
+
_ = heatmap.generate_heatmap(original_im0.copy())
|
|
34
34
|
_ = speed.estimate_speed(original_im0.copy(), tracks)
|
|
35
35
|
_ = queue.process_queue(original_im0.copy(), tracks)
|
|
36
36
|
cap.release()
|
|
@@ -41,16 +41,14 @@ def test_major_solutions():
|
|
|
41
41
|
def test_aigym():
|
|
42
42
|
"""Test the workouts monitoring solution."""
|
|
43
43
|
safe_download(url=WORKOUTS_SOLUTION_DEMO)
|
|
44
|
-
model = YOLO("yolo11n-pose.pt")
|
|
45
44
|
cap = cv2.VideoCapture("solution_ci_pose_demo.mp4")
|
|
46
45
|
assert cap.isOpened(), "Error reading video file"
|
|
47
|
-
|
|
46
|
+
gym = solutions.AIGym(line_width=2, kpts=[5, 11, 13])
|
|
48
47
|
while cap.isOpened():
|
|
49
48
|
success, im0 = cap.read()
|
|
50
49
|
if not success:
|
|
51
50
|
break
|
|
52
|
-
|
|
53
|
-
_ = gym_object.start_counting(im0, results)
|
|
51
|
+
_ = gym.monitor(im0)
|
|
54
52
|
cap.release()
|
|
55
53
|
cv2.destroyAllWindows()
|
|
56
54
|
|
|
@@ -10,3 +10,7 @@ show: True # Flag to control whether to display output image or not
|
|
|
10
10
|
show_in: True # Flag to display objects moving *into* the defined region
|
|
11
11
|
show_out: True # Flag to display objects moving *out of* the defined region
|
|
12
12
|
classes: # To count specific classes
|
|
13
|
+
up_angle: 145.0 # Workouts up_angle for counts, 145.0 is default value
|
|
14
|
+
down_angle: 90 # Workouts down_angle for counts, 90 is default value
|
|
15
|
+
kpts: [6, 8, 10] # Keypoints for workouts monitoring
|
|
16
|
+
colormap: # Colormap for heatmap
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
|
+
import random
|
|
5
|
+
import shutil
|
|
4
6
|
from collections import defaultdict
|
|
7
|
+
from concurrent.futures import ThreadPoolExecutor, as_completed
|
|
5
8
|
from pathlib import Path
|
|
6
9
|
|
|
7
10
|
import cv2
|
|
8
11
|
import numpy as np
|
|
12
|
+
from PIL import Image
|
|
9
13
|
|
|
10
|
-
from ultralytics.utils import LOGGER, TQDM
|
|
14
|
+
from ultralytics.utils import DATASETS_DIR, LOGGER, NUM_THREADS, TQDM
|
|
15
|
+
from ultralytics.utils.downloads import download
|
|
11
16
|
from ultralytics.utils.files import increment_path
|
|
12
17
|
|
|
13
18
|
|
|
@@ -588,15 +593,13 @@ def yolo_bbox2segment(im_dir, save_dir=None, sam_model="sam_b.pt"):
|
|
|
588
593
|
|
|
589
594
|
- im_dir
|
|
590
595
|
├─ 001.jpg
|
|
591
|
-
├─
|
|
596
|
+
├─ ...
|
|
592
597
|
└─ NNN.jpg
|
|
593
598
|
- labels
|
|
594
599
|
├─ 001.txt
|
|
595
|
-
├─
|
|
600
|
+
├─ ...
|
|
596
601
|
└─ NNN.txt
|
|
597
602
|
"""
|
|
598
|
-
from tqdm import tqdm
|
|
599
|
-
|
|
600
603
|
from ultralytics import SAM
|
|
601
604
|
from ultralytics.data import YOLODataset
|
|
602
605
|
from ultralytics.utils import LOGGER
|
|
@@ -610,7 +613,7 @@ def yolo_bbox2segment(im_dir, save_dir=None, sam_model="sam_b.pt"):
|
|
|
610
613
|
|
|
611
614
|
LOGGER.info("Detection labels detected, generating segment labels by SAM model!")
|
|
612
615
|
sam_model = SAM(sam_model)
|
|
613
|
-
for label in
|
|
616
|
+
for label in TQDM(dataset.labels, total=len(dataset.labels), desc="Generating segment labels"):
|
|
614
617
|
h, w = label["shape"]
|
|
615
618
|
boxes = label["bboxes"]
|
|
616
619
|
if len(boxes) == 0: # skip empty labels
|
|
@@ -635,3 +638,58 @@ def yolo_bbox2segment(im_dir, save_dir=None, sam_model="sam_b.pt"):
|
|
|
635
638
|
with open(txt_file, "a") as f:
|
|
636
639
|
f.writelines(text + "\n" for text in texts)
|
|
637
640
|
LOGGER.info(f"Generated segment labels saved in {save_dir}")
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
def create_synthetic_coco_dataset():
|
|
644
|
+
"""
|
|
645
|
+
Creates a synthetic COCO dataset with random images and existing labels.
|
|
646
|
+
|
|
647
|
+
This function downloads COCO labels, creates synthetic images for train2017 and val2017 subsets, and organizes
|
|
648
|
+
them in the COCO dataset structure. It uses multithreading to generate images efficiently.
|
|
649
|
+
|
|
650
|
+
Examples:
|
|
651
|
+
>>> create_synthetic_coco_dataset()
|
|
652
|
+
|
|
653
|
+
Notes:
|
|
654
|
+
- Requires internet connection to download label files.
|
|
655
|
+
- Generates random RGB images of varying sizes (480x480 to 640x640 pixels).
|
|
656
|
+
- Existing test2017 directory is removed as it's not needed.
|
|
657
|
+
- If label directories don't exist, image creation for that subset is skipped.
|
|
658
|
+
"""
|
|
659
|
+
|
|
660
|
+
def create_synthetic_image(image_file):
|
|
661
|
+
"""Generates synthetic images with random sizes and colors for dataset augmentation or testing purposes."""
|
|
662
|
+
if not image_file.exists():
|
|
663
|
+
size = (random.randint(480, 640), random.randint(480, 640))
|
|
664
|
+
Image.new(
|
|
665
|
+
"RGB",
|
|
666
|
+
size=size,
|
|
667
|
+
color=(random.randint(0, 255), random.randint(0, 255), random.randint(0, 255)),
|
|
668
|
+
).save(image_file)
|
|
669
|
+
|
|
670
|
+
# Download labels
|
|
671
|
+
dir = DATASETS_DIR / "coco"
|
|
672
|
+
url = "https://github.com/ultralytics/assets/releases/download/v0.0.0/"
|
|
673
|
+
label_zip = "coco2017labels-segments.zip"
|
|
674
|
+
download([url + label_zip], dir=dir.parent)
|
|
675
|
+
|
|
676
|
+
# Create synthetic images
|
|
677
|
+
shutil.rmtree(dir / "labels" / "test2017", ignore_errors=True) # Remove test2017 directory as not needed
|
|
678
|
+
with ThreadPoolExecutor(max_workers=NUM_THREADS) as executor:
|
|
679
|
+
for subset in ["train2017", "val2017"]:
|
|
680
|
+
subset_dir = dir / "images" / subset
|
|
681
|
+
subset_dir.mkdir(parents=True, exist_ok=True)
|
|
682
|
+
|
|
683
|
+
label_dir = dir / "labels" / subset
|
|
684
|
+
if label_dir.exists():
|
|
685
|
+
label_files = list(label_dir.glob("*.txt"))
|
|
686
|
+
image_files = [subset_dir / f"{label_file.stem}.jpg" for label_file in label_files]
|
|
687
|
+
|
|
688
|
+
# Submit all tasks
|
|
689
|
+
futures = [executor.submit(create_synthetic_image, image_file) for image_file in image_files]
|
|
690
|
+
for _ in TQDM(as_completed(futures), total=len(futures), desc=f"Generating images for {subset}"):
|
|
691
|
+
pass # The actual work is done in the background
|
|
692
|
+
else:
|
|
693
|
+
print(f"Warning: Label directory {label_dir} does not exist. Skipping image creation for {subset}.")
|
|
694
|
+
|
|
695
|
+
print("Synthetic COCO dataset created successfully.")
|
|
@@ -39,24 +39,11 @@ def init_explorer_form(data=None, model=None):
|
|
|
39
39
|
else:
|
|
40
40
|
ds = [data]
|
|
41
41
|
|
|
42
|
+
prefixes = ["yolov8", "yolo11"]
|
|
43
|
+
sizes = ["n", "s", "m", "l", "x"]
|
|
44
|
+
tasks = ["", "-seg", "-pose"]
|
|
42
45
|
if model is None:
|
|
43
|
-
models = [
|
|
44
|
-
"yolov8n.pt",
|
|
45
|
-
"yolov8s.pt",
|
|
46
|
-
"yolov8m.pt",
|
|
47
|
-
"yolov8l.pt",
|
|
48
|
-
"yolov8x.pt",
|
|
49
|
-
"yolov8n-seg.pt",
|
|
50
|
-
"yolov8s-seg.pt",
|
|
51
|
-
"yolov8m-seg.pt",
|
|
52
|
-
"yolov8l-seg.pt",
|
|
53
|
-
"yolov8x-seg.pt",
|
|
54
|
-
"yolov8n-pose.pt",
|
|
55
|
-
"yolov8s-pose.pt",
|
|
56
|
-
"yolov8m-pose.pt",
|
|
57
|
-
"yolov8l-pose.pt",
|
|
58
|
-
"yolov8x-pose.pt",
|
|
59
|
-
]
|
|
46
|
+
models = [f"{p}{s}{t}" for p in prefixes for s in sizes for t in tasks]
|
|
60
47
|
else:
|
|
61
48
|
models = [model]
|
|
62
49
|
|
|
@@ -183,11 +183,10 @@ class Exporter:
|
|
|
183
183
|
|
|
184
184
|
# Get the closest match if format is invalid
|
|
185
185
|
matches = difflib.get_close_matches(fmt, fmts, n=1, cutoff=0.6) # 60% similarity required to match
|
|
186
|
-
if matches:
|
|
187
|
-
LOGGER.warning(f"WARNING ⚠️ Invalid export format='{fmt}', updating to format='{matches[0]}'")
|
|
188
|
-
fmt = matches[0]
|
|
189
|
-
else:
|
|
186
|
+
if not matches:
|
|
190
187
|
raise ValueError(f"Invalid export format='{fmt}'. Valid formats are {fmts}")
|
|
188
|
+
LOGGER.warning(f"WARNING ⚠️ Invalid export format='{fmt}', updating to format='{matches[0]}'")
|
|
189
|
+
fmt = matches[0]
|
|
191
190
|
flags = [x == fmt for x in fmts]
|
|
192
191
|
if sum(flags) != 1:
|
|
193
192
|
raise ValueError(f"Invalid export format='{fmt}'. Valid formats are {fmts}")
|
|
@@ -544,6 +544,8 @@ class Model(nn.Module):
|
|
|
544
544
|
|
|
545
545
|
if not self.predictor:
|
|
546
546
|
self.predictor = predictor or self._smart_load("predictor")(overrides=args, _callbacks=self.callbacks)
|
|
547
|
+
if predictor:
|
|
548
|
+
self.predictor.args = get_cfg(self.predictor.args, args)
|
|
547
549
|
self.predictor.setup_model(model=self.model, verbose=is_cli)
|
|
548
550
|
else: # only update args if predictor is already setup
|
|
549
551
|
self.predictor.args = get_cfg(self.predictor.args, args)
|
|
@@ -469,11 +469,11 @@ class BaseTrainer:
|
|
|
469
469
|
|
|
470
470
|
if RANK in {-1, 0}:
|
|
471
471
|
# Do final val with best.pt
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
)
|
|
472
|
+
epochs = epoch - self.start_epoch + 1 # total training epochs
|
|
473
|
+
seconds = time.time() - self.train_time_start # total training seconds
|
|
474
|
+
LOGGER.info(f"\n{epochs} epochs completed in {seconds / 3600:.3f} hours.")
|
|
476
475
|
self.final_eval()
|
|
476
|
+
self.validator.metrics.training = {"epochs": epochs, "seconds": seconds} # add training speed
|
|
477
477
|
if self.args.plots:
|
|
478
478
|
self.plot_metrics()
|
|
479
479
|
self.run_callbacks("on_train_end")
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
|
2
|
+
|
|
3
|
+
from ultralytics.solutions.solutions import BaseSolution # Import a parent class
|
|
4
|
+
from ultralytics.utils.plotting import Annotator
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class AIGym(BaseSolution):
|
|
8
|
+
"""A class to manage the gym steps of people in a real-time video stream based on their poses."""
|
|
9
|
+
|
|
10
|
+
def __init__(self, **kwargs):
|
|
11
|
+
"""Initialization function for AiGYM class, a child class of BaseSolution class, can be used for workouts
|
|
12
|
+
monitoring.
|
|
13
|
+
"""
|
|
14
|
+
# Check if the model name ends with '-pose'
|
|
15
|
+
if "model" in kwargs and "-pose" not in kwargs["model"]:
|
|
16
|
+
kwargs["model"] = "yolo11n-pose.pt"
|
|
17
|
+
elif "model" not in kwargs:
|
|
18
|
+
kwargs["model"] = "yolo11n-pose.pt"
|
|
19
|
+
|
|
20
|
+
super().__init__(**kwargs)
|
|
21
|
+
self.count = [] # List for counts, necessary where there are multiple objects in frame
|
|
22
|
+
self.angle = [] # List for angle, necessary where there are multiple objects in frame
|
|
23
|
+
self.stage = [] # List for stage, necessary where there are multiple objects in frame
|
|
24
|
+
|
|
25
|
+
# Extract details from CFG single time for usage later
|
|
26
|
+
self.initial_stage = None
|
|
27
|
+
self.up_angle = float(self.CFG["up_angle"]) # Pose up predefined angle to consider up pose
|
|
28
|
+
self.down_angle = float(self.CFG["down_angle"]) # Pose down predefined angle to consider down pose
|
|
29
|
+
self.kpts = self.CFG["kpts"] # User selected kpts of workouts storage for further usage
|
|
30
|
+
self.lw = self.CFG["line_width"] # Store line_width for usage
|
|
31
|
+
|
|
32
|
+
def monitor(self, im0):
|
|
33
|
+
"""
|
|
34
|
+
Monitor the workouts using Ultralytics YOLOv8 Pose Model: https://docs.ultralytics.com/tasks/pose/.
|
|
35
|
+
|
|
36
|
+
Args:
|
|
37
|
+
im0 (ndarray): The input image that will be used for processing
|
|
38
|
+
Returns
|
|
39
|
+
im0 (ndarray): The processed image for more usage
|
|
40
|
+
"""
|
|
41
|
+
# Extract tracks
|
|
42
|
+
tracks = self.model.track(source=im0, persist=True, classes=self.CFG["classes"])[0]
|
|
43
|
+
|
|
44
|
+
if tracks.boxes.id is not None:
|
|
45
|
+
# Extract and check keypoints
|
|
46
|
+
if len(tracks) > len(self.count):
|
|
47
|
+
new_human = len(tracks) - len(self.count)
|
|
48
|
+
self.angle += [0] * new_human
|
|
49
|
+
self.count += [0] * new_human
|
|
50
|
+
self.stage += ["-"] * new_human
|
|
51
|
+
|
|
52
|
+
# Initialize annotator
|
|
53
|
+
self.annotator = Annotator(im0, line_width=self.lw)
|
|
54
|
+
|
|
55
|
+
# Enumerate over keypoints
|
|
56
|
+
for ind, k in enumerate(reversed(tracks.keypoints.data)):
|
|
57
|
+
# Get keypoints and estimate the angle
|
|
58
|
+
kpts = [k[int(self.kpts[i])].cpu() for i in range(3)]
|
|
59
|
+
self.angle[ind] = self.annotator.estimate_pose_angle(*kpts)
|
|
60
|
+
im0 = self.annotator.draw_specific_points(k, self.kpts, radius=self.lw * 3)
|
|
61
|
+
|
|
62
|
+
# Determine stage and count logic based on angle thresholds
|
|
63
|
+
if self.angle[ind] < self.down_angle:
|
|
64
|
+
if self.stage[ind] == "up":
|
|
65
|
+
self.count[ind] += 1
|
|
66
|
+
self.stage[ind] = "down"
|
|
67
|
+
elif self.angle[ind] > self.up_angle:
|
|
68
|
+
self.stage[ind] = "up"
|
|
69
|
+
|
|
70
|
+
# Display angle, count, and stage text
|
|
71
|
+
self.annotator.plot_angle_and_count_and_stage(
|
|
72
|
+
angle_text=self.angle[ind], # angle text for display
|
|
73
|
+
count_text=self.count[ind], # count text for workouts
|
|
74
|
+
stage_text=self.stage[ind], # stage position text
|
|
75
|
+
center_kpt=k[int(self.kpts[1])], # center keypoint for display
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
self.display_output(im0) # Display output image, if environment support display
|
|
79
|
+
return im0 # return an image for writing or further usage
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
|
2
|
+
|
|
3
|
+
import cv2
|
|
4
|
+
import numpy as np
|
|
5
|
+
|
|
6
|
+
from ultralytics.solutions.object_counter import ObjectCounter # Import object counter class
|
|
7
|
+
from ultralytics.utils.plotting import Annotator
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Heatmap(ObjectCounter):
|
|
11
|
+
"""A class to draw heatmaps in real-time video stream based on their tracks."""
|
|
12
|
+
|
|
13
|
+
def __init__(self, **kwargs):
|
|
14
|
+
"""Initializes function for heatmap class with default values."""
|
|
15
|
+
super().__init__(**kwargs)
|
|
16
|
+
|
|
17
|
+
self.initialized = False # bool variable for heatmap initialization
|
|
18
|
+
if self.region is not None: # check if user provided the region coordinates
|
|
19
|
+
self.initialize_region()
|
|
20
|
+
|
|
21
|
+
# store colormap
|
|
22
|
+
self.colormap = cv2.COLORMAP_PARULA if self.CFG["colormap"] is None else self.CFG["colormap"]
|
|
23
|
+
|
|
24
|
+
def heatmap_effect(self, box):
|
|
25
|
+
"""
|
|
26
|
+
Efficient calculation of heatmap area and effect location for applying colormap.
|
|
27
|
+
|
|
28
|
+
Args:
|
|
29
|
+
box (list): Bounding Box coordinates data [x0, y0, x1, y1]
|
|
30
|
+
"""
|
|
31
|
+
x0, y0, x1, y1 = map(int, box)
|
|
32
|
+
radius_squared = (min(x1 - x0, y1 - y0) // 2) ** 2
|
|
33
|
+
|
|
34
|
+
# Create a meshgrid with region of interest (ROI) for vectorized distance calculations
|
|
35
|
+
xv, yv = np.meshgrid(np.arange(x0, x1), np.arange(y0, y1))
|
|
36
|
+
|
|
37
|
+
# Calculate squared distances from the center
|
|
38
|
+
dist_squared = (xv - ((x0 + x1) // 2)) ** 2 + (yv - ((y0 + y1) // 2)) ** 2
|
|
39
|
+
|
|
40
|
+
# Create a mask of points within the radius
|
|
41
|
+
within_radius = dist_squared <= radius_squared
|
|
42
|
+
|
|
43
|
+
# Update only the values within the bounding box in a single vectorized operation
|
|
44
|
+
self.heatmap[y0:y1, x0:x1][within_radius] += 2
|
|
45
|
+
|
|
46
|
+
def generate_heatmap(self, im0):
|
|
47
|
+
"""
|
|
48
|
+
Generate heatmap for each frame using Ultralytics.
|
|
49
|
+
|
|
50
|
+
Args:
|
|
51
|
+
im0 (ndarray): Input image array for processing
|
|
52
|
+
Returns:
|
|
53
|
+
im0 (ndarray): Processed image for further usage
|
|
54
|
+
"""
|
|
55
|
+
self.heatmap = np.zeros_like(im0, dtype=np.float32) * 0.99 if not self.initialized else self.heatmap
|
|
56
|
+
self.initialized = True # Initialize heatmap only once
|
|
57
|
+
|
|
58
|
+
self.annotator = Annotator(im0, line_width=self.line_width) # Initialize annotator
|
|
59
|
+
self.extract_tracks(im0) # Extract tracks
|
|
60
|
+
|
|
61
|
+
# Iterate over bounding boxes, track ids and classes index
|
|
62
|
+
for box, track_id, cls in zip(self.boxes, self.track_ids, self.clss):
|
|
63
|
+
# Draw bounding box and counting region
|
|
64
|
+
self.heatmap_effect(box)
|
|
65
|
+
|
|
66
|
+
if self.region is not None:
|
|
67
|
+
self.annotator.draw_region(reg_pts=self.region, color=(104, 0, 123), thickness=self.line_width * 2)
|
|
68
|
+
self.store_tracking_history(track_id, box) # Store track history
|
|
69
|
+
self.store_classwise_counts(cls) # store classwise counts in dict
|
|
70
|
+
|
|
71
|
+
# Store tracking previous position and perform object counting
|
|
72
|
+
prev_position = self.track_history[track_id][-2] if len(self.track_history[track_id]) > 1 else None
|
|
73
|
+
self.count_objects(self.track_line, box, track_id, prev_position, cls) # Perform object counting
|
|
74
|
+
|
|
75
|
+
self.display_counts(im0) if self.region is not None else None # Display the counts on the frame
|
|
76
|
+
|
|
77
|
+
# Normalize, apply colormap to heatmap and combine with original image
|
|
78
|
+
im0 = (
|
|
79
|
+
im0
|
|
80
|
+
if self.track_data.id is None
|
|
81
|
+
else cv2.addWeighted(
|
|
82
|
+
im0,
|
|
83
|
+
0.5,
|
|
84
|
+
cv2.applyColorMap(
|
|
85
|
+
cv2.normalize(self.heatmap, None, 0, 255, cv2.NORM_MINMAX).astype(np.uint8), self.colormap
|
|
86
|
+
),
|
|
87
|
+
0.5,
|
|
88
|
+
0,
|
|
89
|
+
)
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
self.display_output(im0) # display output with base class function
|
|
93
|
+
return im0 # return output image for more usage
|
|
@@ -19,8 +19,7 @@ class ObjectCounter(BaseSolution):
|
|
|
19
19
|
self.out_count = 0 # Counter for objects moving outward
|
|
20
20
|
self.counted_ids = [] # List of IDs of objects that have been counted
|
|
21
21
|
self.classwise_counts = {} # Dictionary for counts, categorized by object class
|
|
22
|
-
|
|
23
|
-
self.initialize_region() # Setup region and counting areas
|
|
22
|
+
self.region_initialized = False # Bool variable for region initialization
|
|
24
23
|
|
|
25
24
|
self.show_in = self.CFG["show_in"]
|
|
26
25
|
self.show_out = self.CFG["show_out"]
|
|
@@ -99,6 +98,10 @@ class ObjectCounter(BaseSolution):
|
|
|
99
98
|
Returns
|
|
100
99
|
im0 (ndarray): The processed image for more usage
|
|
101
100
|
"""
|
|
101
|
+
if not self.region_initialized:
|
|
102
|
+
self.initialize_region()
|
|
103
|
+
self.region_initialized = True
|
|
104
|
+
|
|
102
105
|
self.annotator = Annotator(im0, line_width=self.line_width) # Initialize annotator
|
|
103
106
|
self.extract_tracks(im0) # Extract tracks
|
|
104
107
|
|
|
@@ -107,21 +110,20 @@ class ObjectCounter(BaseSolution):
|
|
|
107
110
|
) # Draw region
|
|
108
111
|
|
|
109
112
|
# Iterate over bounding boxes, track ids and classes index
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
self.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
self.count_objects(self.track_line, box, track_id, prev_position, cls) # Perform object counting
|
|
113
|
+
for box, track_id, cls in zip(self.boxes, self.track_ids, self.clss):
|
|
114
|
+
# Draw bounding box and counting region
|
|
115
|
+
self.annotator.box_label(box, label=self.names[cls], color=colors(track_id, True))
|
|
116
|
+
self.store_tracking_history(track_id, box) # Store track history
|
|
117
|
+
self.store_classwise_counts(cls) # store classwise counts in dict
|
|
118
|
+
|
|
119
|
+
# Draw centroid of objects
|
|
120
|
+
self.annotator.draw_centroid_and_tracks(
|
|
121
|
+
self.track_line, color=colors(int(track_id), True), track_thickness=self.line_width
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
# store previous position of track for object counting
|
|
125
|
+
prev_position = self.track_history[track_id][-2] if len(self.track_history[track_id]) > 1 else None
|
|
126
|
+
self.count_objects(self.track_line, box, track_id, prev_position, cls) # Perform object counting
|
|
125
127
|
|
|
126
128
|
self.display_counts(im0) # Display the counts on the frame
|
|
127
129
|
self.display_output(im0) # display output with base class function
|