OTVision 0.5.3__tar.gz → 0.5.4__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.
- {otvision-0.5.3 → otvision-0.5.4}/.editorconfig +1 -1
- {otvision-0.5.3 → otvision-0.5.4}/.github/workflows/release-pypi.yml +1 -1
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/dataformat.py +3 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/detect/cli.py +6 -6
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/detect/detect.py +39 -27
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/detect/otdet.py +4 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/helpers/log.py +17 -3
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/version.py +2 -2
- {otvision-0.5.3 → otvision-0.5.4}/PKG-INFO +1 -1
- {otvision-0.5.3 → otvision-0.5.4}/convert.py +6 -6
- {otvision-0.5.3 → otvision-0.5.4}/install.cmd +5 -4
- {otvision-0.5.3 → otvision-0.5.4}/install.sh +4 -2
- {otvision-0.5.3 → otvision-0.5.4}/install_dev.cmd +2 -2
- {otvision-0.5.3 → otvision-0.5.4}/install_dev.sh +3 -3
- {otvision-0.5.3 → otvision-0.5.4}/reference_points_picker.py +3 -3
- {otvision-0.5.3 → otvision-0.5.4}/tests/cli/test_convert_cli.py +12 -12
- {otvision-0.5.3 → otvision-0.5.4}/tests/cli/test_detect_cli.py +10 -10
- {otvision-0.5.3 → otvision-0.5.4}/tests/cli/test_track_cli.py +26 -26
- otvision-0.5.4/tests/data/detect/default/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.otdet +0 -0
- otvision-0.5.4/tests/data/detect/default/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/detect/detect_test.py +53 -11
- {otvision-0.5.3 → otvision-0.5.4}/tests/detect/test_odet.py +4 -0
- otvision-0.5.4/tests/helpers/test_log.py +175 -0
- {otvision-0.5.3 → otvision-0.5.4}/track.py +13 -13
- {otvision-0.5.3 → otvision-0.5.4}/transform.py +4 -4
- otvision-0.5.3/tests/data/detect/default/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.otdet +0 -0
- otvision-0.5.3/tests/data/detect/default/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/.flake8 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/.github/dependabot.yml +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/.github/workflows/build-nightly.yml +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/.github/workflows/build-release.yml +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/.github/workflows/linter.yml +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/.github/workflows/release-testpypi.yml +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/.github/workflows/test.yml +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/.gitignore +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/.pre-commit-config.yaml +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/.vscode/launch.json +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/.vscode/scripts/build_debug_env.cmd +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/.vscode/scripts/build_debug_env.sh +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/.vscode/scripts/teardown_debug_env.cmd +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/.vscode/scripts/teardown_debug_env.sh +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/.vscode/settings.json +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/.vscode/tasks.json +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/.yamllint.yaml +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/LICENSE +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/application/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/application/configure_logger.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/application/detect/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/application/detect/get_detect_cli_args.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/application/detect/update_detect_config_with_cli_args.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/application/get_config.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/config.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/convert/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/convert/convert.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/detect/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/detect/builder.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/detect/plugin_av/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/detect/plugin_av/rotate_frame.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/detect/yolo.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/domain/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/domain/cli.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/helpers/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/helpers/date.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/helpers/files.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/helpers/formats.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/helpers/machine.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/helpers/video.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/track/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/track/iou.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/track/iou_util.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/track/preprocess.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/track/track.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/transform/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/transform/get_homography.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/transform/reference_points_picker.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/transform/transform.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/view/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/view/helpers/OTC.ico +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/view/view.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/view/view_convert.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/view/view_detect.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/view/view_helpers.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/view/view_track.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision/view/view_transform.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/OTVision.bat +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/README.md +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/clean-up-repository.sh +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/config.yml +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/detect.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/export_models.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/pyproject.toml +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/requirements-dev.txt +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/requirements.txt +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/application/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/application/detect/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/application/detect/test_get_detect_cli_args.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/application/detect/test_update_detect_config_with_cli_args.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/application/test_get_config.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/cli/custom_cli_test_config.yaml +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/conftest.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/convert/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/convert/test_convert.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/Testvideo_CamView.png +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/Testvideo_CamView_Cars-Cyclist.png +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/Testvideo_CamView_Cars-Truck.png +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/Testvideo_CamView_refpts.png +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.gpkg +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.mp4 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.otrfpts +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.gpkg +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.mp4 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.otrfpts +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/Testvideo_FR20.otrfpts +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/Testvideo_Satellite.jpg +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/Testvideo_Satellite_far.jpg +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/default/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/default/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.mp4 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/default/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/default/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.mp4 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/fail_fps_from_filename/Testvideo_Cars-Cyclist_F20_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/fail_fps_from_filename/Testvideo_Cars-Truck_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/fps_from_filename/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/fps_from_filename/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.mp4 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/fps_from_filename/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/fps_from_filename/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.mp4 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/input_fps_20/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/input_fps_20/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.mp4 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/input_fps_20/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/input_fps_20/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.mp4 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/input_fps_40/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/input_fps_40/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.mp4 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/input_fps_40/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/input_fps_40/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.mp4 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/output_filetype_avi/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.avi +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/output_filetype_avi/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/output_filetype_avi/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.avi +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/output_filetype_avi/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/output_filetype_mkv/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/output_filetype_mkv/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.mkv +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/output_filetype_mkv/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/output_filetype_mkv/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.mkv +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/output_filetype_mov/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/output_filetype_mov/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.mov +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/output_filetype_mov/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/output_filetype_mov/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.mov +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/output_filetype_mp4/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/output_filetype_mp4/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.mp4 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/output_filetype_mp4/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/output_filetype_mp4/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.mp4 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/rotation/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00_rotate.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/rotation/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00_rotate.mov +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/rotation/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00_rotate.mp4 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/rotation/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00_rotate.h264 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/rotation/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00_rotate.mov +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/convert/rotation/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00_rotate.mp4 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/detect/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.mp4 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/detect/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.mp4 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/detect/rotated-Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.mp4 +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/log/_otvision_logs/test.log +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/default/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/default/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/default/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/default/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_h_0_2/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_h_0_2/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_h_0_2/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_h_0_2/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_h_0_6/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_h_0_6/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_h_0_6/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_h_0_6/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_iou_0_2/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_iou_0_2/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_iou_0_2/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_iou_0_2/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_iou_0_6/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_iou_0_6/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_iou_0_6/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_iou_0_6/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_l_0_1/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_l_0_1/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_l_0_1/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_l_0_1/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_l_0_5/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_l_0_5/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_l_0_5/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/sigma_l_0_5/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/t_min_10/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/t_min_10/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/t_min_10/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/t_min_10/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/t_min_3/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/t_min_3/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/t_min_3/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/t_min_3/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/t_miss_max_25/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/t_miss_max_25/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/t_miss_max_25/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/t_miss_max_25/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/t_miss_max_75/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/t_miss_max_75/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/t_miss_max_75/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.otdet +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/track/t_miss_max_75/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/transform/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.gpkg +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/transform/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.otrfpts +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/transform/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/transform/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.gpkg +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/transform/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.otrfpts +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/transform/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.ottrk +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/transform/Testvideo_FR20.otrfpts +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/yolov8m.mlpackage/Data/com.apple.CoreML/model.mlmodel +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/yolov8m.mlpackage/Data/com.apple.CoreML/weights/weight.bin +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/data/yolov8m.mlpackage/Manifest.json +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/detect/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/detect/plugin_av/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/detect/plugin_av/test_rotate_frame.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/detect/yolo_test.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/helpers/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/helpers/files_test.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/helpers/formats_test.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/log/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/log/log_maker.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/log/test_log.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/test_config.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/track/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/track/test_preprocess.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/track/test_track.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/transform/__init__.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/tests/transform/test_transform.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/update_precommit.py +0 -0
- {otvision-0.5.3 → otvision-0.5.4}/view.py +0 -0
|
@@ -38,6 +38,9 @@ INTERPOLATED_DETECTION: str = "interpolated-detection"
|
|
|
38
38
|
MODEL: str = "model"
|
|
39
39
|
CHUNKSIZE: str = "chunksize"
|
|
40
40
|
NORMALIZED_BBOX: str = "normalized_bbox"
|
|
41
|
+
DETECT_START = "detect_start"
|
|
42
|
+
DETECT_END = "detect_end"
|
|
43
|
+
|
|
41
44
|
# Detektor model config
|
|
42
45
|
NAME: str = "name"
|
|
43
46
|
WEIGHTS: str = "weights"
|
|
@@ -67,7 +67,7 @@ class ArgparseDetectCliParser(DetectCliParser):
|
|
|
67
67
|
help="Use half precision for detection.",
|
|
68
68
|
)
|
|
69
69
|
self._parser.add_argument(
|
|
70
|
-
"--
|
|
70
|
+
"--expected-duration",
|
|
71
71
|
type=int,
|
|
72
72
|
help="Expected duration of a single video in seconds.",
|
|
73
73
|
required=False,
|
|
@@ -79,14 +79,14 @@ class ArgparseDetectCliParser(DetectCliParser):
|
|
|
79
79
|
help="Overwrite existing output files",
|
|
80
80
|
)
|
|
81
81
|
self._parser.add_argument(
|
|
82
|
-
"--
|
|
82
|
+
"--log-level-console",
|
|
83
83
|
type=str,
|
|
84
84
|
choices=VALID_LOG_LEVELS,
|
|
85
85
|
help="Log level for logging to the console",
|
|
86
86
|
required=False,
|
|
87
87
|
)
|
|
88
88
|
self._parser.add_argument(
|
|
89
|
-
"--
|
|
89
|
+
"--log-level-file",
|
|
90
90
|
type=str,
|
|
91
91
|
choices=VALID_LOG_LEVELS,
|
|
92
92
|
help="Log level for logging to a log file",
|
|
@@ -100,20 +100,20 @@ class ArgparseDetectCliParser(DetectCliParser):
|
|
|
100
100
|
required=False,
|
|
101
101
|
)
|
|
102
102
|
self._parser.add_argument(
|
|
103
|
-
"--
|
|
103
|
+
"--logfile-overwrite",
|
|
104
104
|
action="store_true",
|
|
105
105
|
help="Overwrite log file if it already exists.",
|
|
106
106
|
required=False,
|
|
107
107
|
)
|
|
108
108
|
self._parser.add_argument(
|
|
109
|
-
"--
|
|
109
|
+
"--detect-start",
|
|
110
110
|
default=None,
|
|
111
111
|
type=int,
|
|
112
112
|
help="Specify start of detection in seconds.",
|
|
113
113
|
required=False,
|
|
114
114
|
)
|
|
115
115
|
self._parser.add_argument(
|
|
116
|
-
"--
|
|
116
|
+
"--detect-end",
|
|
117
117
|
default=None,
|
|
118
118
|
type=int,
|
|
119
119
|
help="Specify end of detection in seconds.",
|
|
@@ -43,6 +43,7 @@ from OTVision.helpers.video import get_duration, get_fps, get_video_dimensions
|
|
|
43
43
|
from OTVision.track.preprocess import OCCURRENCE
|
|
44
44
|
|
|
45
45
|
log = logging.getLogger(LOGGER_NAME)
|
|
46
|
+
DATETIME_FORMAT = "%Y-%m-%d_%H-%M-%S"
|
|
46
47
|
|
|
47
48
|
|
|
48
49
|
class OTVisionDetect:
|
|
@@ -92,6 +93,15 @@ class OTVisionDetect:
|
|
|
92
93
|
detect_suffix=self.config.filetypes.detect,
|
|
93
94
|
)
|
|
94
95
|
|
|
96
|
+
try:
|
|
97
|
+
parse_start_time_from(video_file)
|
|
98
|
+
except InproperFormattedFilename:
|
|
99
|
+
log.warning(
|
|
100
|
+
f"Video file name of '{video_file}' must include date "
|
|
101
|
+
f"and time in format: {DATETIME_FORMAT}"
|
|
102
|
+
)
|
|
103
|
+
continue
|
|
104
|
+
|
|
95
105
|
if not self.config.detect.overwrite and detections_file.is_file():
|
|
96
106
|
log.warning(
|
|
97
107
|
f"{detections_file} already exists. To overwrite, set overwrite "
|
|
@@ -138,6 +148,8 @@ class OTVisionDetect:
|
|
|
138
148
|
half_precision=model.half_precision,
|
|
139
149
|
chunksize=1,
|
|
140
150
|
classifications=model.classifications,
|
|
151
|
+
detect_start=self.config.detect.detect_start,
|
|
152
|
+
detect_end=self.config.detect.detect_end,
|
|
141
153
|
)
|
|
142
154
|
).build(detections)
|
|
143
155
|
|
|
@@ -218,7 +230,7 @@ class Timestamper:
|
|
|
218
230
|
Returns:
|
|
219
231
|
dict: input dictionary with additional occurrence per frame
|
|
220
232
|
"""
|
|
221
|
-
start_time =
|
|
233
|
+
start_time = parse_start_time_from(video_file)
|
|
222
234
|
actual_duration = get_duration(video_file)
|
|
223
235
|
if expected_duration:
|
|
224
236
|
time_per_frame = self._get_time_per_frame(detections, expected_duration)
|
|
@@ -227,32 +239,6 @@ class Timestamper:
|
|
|
227
239
|
self._update_metadata(detections, start_time, actual_duration)
|
|
228
240
|
return self._stamp(detections, start_time, time_per_frame)
|
|
229
241
|
|
|
230
|
-
@staticmethod
|
|
231
|
-
def _get_start_time_from(video_file: Path) -> datetime:
|
|
232
|
-
"""Parse the given filename and retrieve the start date of the video.
|
|
233
|
-
|
|
234
|
-
Args:
|
|
235
|
-
video_file (Path): path to video file
|
|
236
|
-
|
|
237
|
-
Raises:
|
|
238
|
-
InproperFormattedFilename: if the filename is not formatted as expected, an
|
|
239
|
-
exception will be raised
|
|
240
|
-
|
|
241
|
-
Returns:
|
|
242
|
-
datetime: start date of the video
|
|
243
|
-
"""
|
|
244
|
-
match = re.search(
|
|
245
|
-
FILE_NAME_PATTERN,
|
|
246
|
-
video_file.name,
|
|
247
|
-
)
|
|
248
|
-
if match:
|
|
249
|
-
start_date: str = match.group(START_DATE)
|
|
250
|
-
return parse_date_string_to_utc_datime(
|
|
251
|
-
start_date, "%Y-%m-%d_%H-%M-%S"
|
|
252
|
-
).replace(tzinfo=timezone.utc)
|
|
253
|
-
|
|
254
|
-
raise InproperFormattedFilename(f"Could not parse {video_file.name}.")
|
|
255
|
-
|
|
256
242
|
@staticmethod
|
|
257
243
|
def _get_time_per_frame(detections: dict, duration: timedelta) -> timedelta:
|
|
258
244
|
"""Calculates the duration for each frame. This is done using the total
|
|
@@ -294,3 +280,29 @@ class Timestamper:
|
|
|
294
280
|
occurrence = start_date + (int(key) - 1) * time_per_frame
|
|
295
281
|
value[OCCURRENCE] = occurrence.timestamp()
|
|
296
282
|
return detections
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
def parse_start_time_from(video_file: Path) -> datetime:
|
|
286
|
+
"""Parse the given filename and retrieve the start date of the video.
|
|
287
|
+
|
|
288
|
+
Args:
|
|
289
|
+
video_file (Path): path to video file
|
|
290
|
+
|
|
291
|
+
Raises:
|
|
292
|
+
InproperFormattedFilename: if the filename is not formatted as expected, an
|
|
293
|
+
exception will be raised
|
|
294
|
+
|
|
295
|
+
Returns:
|
|
296
|
+
datetime: start date of the video
|
|
297
|
+
"""
|
|
298
|
+
match = re.search(
|
|
299
|
+
FILE_NAME_PATTERN,
|
|
300
|
+
video_file.name,
|
|
301
|
+
)
|
|
302
|
+
if match:
|
|
303
|
+
start_date: str = match.group(START_DATE)
|
|
304
|
+
return parse_date_string_to_utc_datime(start_date, "%Y-%m-%d_%H-%M-%S").replace(
|
|
305
|
+
tzinfo=timezone.utc
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
raise InproperFormattedFilename(f"Could not parse {video_file.name}.")
|
|
@@ -24,6 +24,8 @@ class OtdetBuilderConfig:
|
|
|
24
24
|
half_precision: bool
|
|
25
25
|
chunksize: int
|
|
26
26
|
classifications: dict[int, str]
|
|
27
|
+
detect_start: int | None
|
|
28
|
+
detect_end: int | None
|
|
27
29
|
|
|
28
30
|
|
|
29
31
|
class OtdetBuilderError(Exception):
|
|
@@ -100,4 +102,6 @@ class OtdetBuilder:
|
|
|
100
102
|
},
|
|
101
103
|
dataformat.CHUNKSIZE: self.config.chunksize,
|
|
102
104
|
dataformat.NORMALIZED_BBOX: self.config.normalized,
|
|
105
|
+
dataformat.DETECT_START: self.config.detect_start,
|
|
106
|
+
dataformat.DETECT_END: self.config.detect_end,
|
|
103
107
|
}
|
|
@@ -24,6 +24,7 @@ import logging
|
|
|
24
24
|
import sys
|
|
25
25
|
from datetime import datetime
|
|
26
26
|
from pathlib import Path
|
|
27
|
+
from typing import Callable
|
|
27
28
|
|
|
28
29
|
LOGGER_NAME = "OTVision Logger"
|
|
29
30
|
|
|
@@ -57,7 +58,12 @@ class _OTVisionLogger:
|
|
|
57
58
|
with LOGGER_NAME from the same module where this class is defined.
|
|
58
59
|
"""
|
|
59
60
|
|
|
60
|
-
def __init__(
|
|
61
|
+
def __init__(
|
|
62
|
+
self,
|
|
63
|
+
name: str = LOGGER_NAME,
|
|
64
|
+
datetime_provider: Callable[[], datetime] = datetime.now,
|
|
65
|
+
) -> None:
|
|
66
|
+
self._provide_datetime = datetime_provider
|
|
61
67
|
self.logger = logging.getLogger(name=name)
|
|
62
68
|
self.logger.setLevel("DEBUG")
|
|
63
69
|
self._set_formatter()
|
|
@@ -92,12 +98,20 @@ class _OTVisionLogger:
|
|
|
92
98
|
log_file and level are not intended to be optional, they have to be provided
|
|
93
99
|
in every case. The default values provided are a safety net.
|
|
94
100
|
"""
|
|
95
|
-
if log_file.
|
|
101
|
+
if log_file.is_file() and not overwrite:
|
|
96
102
|
raise LogFileAlreadyExists(
|
|
97
103
|
f"Log file '{log_file}' already exists. "
|
|
98
104
|
"Please specify option to overwrite the log file when using the CLI."
|
|
99
105
|
)
|
|
100
|
-
log_file.parent
|
|
106
|
+
log_dir = log_file.parent
|
|
107
|
+
if log_file.is_dir() or not log_file.suffix:
|
|
108
|
+
log_dir = log_file / "logs"
|
|
109
|
+
log_file = (
|
|
110
|
+
log_dir
|
|
111
|
+
/ f"{self._provide_datetime().strftime(r'%Y-%m-%d_%H-%M-%S')}.{LOG_EXT}"
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
log_dir.mkdir(parents=True, exist_ok=True)
|
|
101
115
|
log_file.touch()
|
|
102
116
|
file_handler = logging.FileHandler(log_file, mode="w")
|
|
103
117
|
self._add_handler(file_handler, level)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: OTVision
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.4
|
|
4
4
|
Summary: OTVision is a core module of the OpenTrafficCam framework to perform object detection and tracking.
|
|
5
5
|
Project-URL: Homepage, https://opentrafficcam.org/
|
|
6
6
|
Project-URL: Documentation, https://opentrafficcam.org/overview/
|
|
@@ -48,7 +48,7 @@ def parse(argv: list[str] | None) -> argparse.Namespace:
|
|
|
48
48
|
required=False,
|
|
49
49
|
)
|
|
50
50
|
parser.add_argument(
|
|
51
|
-
"--
|
|
51
|
+
"--delete-input",
|
|
52
52
|
action=argparse.BooleanOptionalAction,
|
|
53
53
|
help="Delete input files after convert",
|
|
54
54
|
)
|
|
@@ -59,7 +59,7 @@ def parse(argv: list[str] | None) -> argparse.Namespace:
|
|
|
59
59
|
help="Overwrite existing output files",
|
|
60
60
|
)
|
|
61
61
|
parser.add_argument(
|
|
62
|
-
"--
|
|
62
|
+
"--input-fps",
|
|
63
63
|
type=float,
|
|
64
64
|
help="Frame rate of input h264.",
|
|
65
65
|
required=False,
|
|
@@ -72,19 +72,19 @@ def parse(argv: list[str] | None) -> argparse.Namespace:
|
|
|
72
72
|
required=False,
|
|
73
73
|
)
|
|
74
74
|
parser.add_argument(
|
|
75
|
-
"--
|
|
75
|
+
"--fps-from-filename",
|
|
76
76
|
action=argparse.BooleanOptionalAction,
|
|
77
77
|
help="Whether or not to parse frame rate from file name.",
|
|
78
78
|
)
|
|
79
79
|
parser.add_argument(
|
|
80
|
-
"--
|
|
80
|
+
"--log-level-console",
|
|
81
81
|
type=str,
|
|
82
82
|
choices=VALID_LOG_LEVELS,
|
|
83
83
|
help="Log level for logging to the console",
|
|
84
84
|
required=False,
|
|
85
85
|
)
|
|
86
86
|
parser.add_argument(
|
|
87
|
-
"--
|
|
87
|
+
"--log-level-file",
|
|
88
88
|
type=str,
|
|
89
89
|
choices=VALID_LOG_LEVELS,
|
|
90
90
|
help="Log level for logging to a log file",
|
|
@@ -98,7 +98,7 @@ def parse(argv: list[str] | None) -> argparse.Namespace:
|
|
|
98
98
|
required=False,
|
|
99
99
|
)
|
|
100
100
|
parser.add_argument(
|
|
101
|
-
"--
|
|
101
|
+
"--logfile-overwrite",
|
|
102
102
|
action="store_true",
|
|
103
103
|
help="Overwrite log file if it already exists.",
|
|
104
104
|
required=False,
|
|
@@ -7,9 +7,10 @@ if "x%PYTHON_VERSION:3.12=%"=="x%PYTHON_VERSION%" (
|
|
|
7
7
|
echo "Python Version 3.12 is not installed in environment." & cmd /K & exit
|
|
8
8
|
)
|
|
9
9
|
|
|
10
|
-
python -m venv venv
|
|
11
|
-
call venv\Scripts\activate
|
|
10
|
+
python -m venv .venv
|
|
11
|
+
call .venv\Scripts\activate
|
|
12
12
|
python -m pip install --upgrade pip
|
|
13
|
-
pip install
|
|
14
|
-
pip install -
|
|
13
|
+
pip install uv
|
|
14
|
+
uv pip install --upgrade pip-tools pip wheel
|
|
15
|
+
uv pip install -r requirements.txt%
|
|
15
16
|
deactivate
|
|
@@ -14,11 +14,13 @@ echo "Install OTVision."
|
|
|
14
14
|
echo "$DIR"
|
|
15
15
|
cd "$DIR" || exit
|
|
16
16
|
WORKING_DIR=$(pwd)
|
|
17
|
-
VENV="$WORKING_DIR"
|
|
17
|
+
VENV="$WORKING_DIR"/.venv
|
|
18
18
|
PYTHON="$VENV"/bin/python
|
|
19
19
|
PIP="$VENV"/bin/pip
|
|
20
|
+
UV="$VENV"/bin/uv
|
|
20
21
|
|
|
21
22
|
python3.12 -m venv "$VENV"
|
|
22
23
|
|
|
23
24
|
$PYTHON -m pip install --upgrade pip
|
|
24
|
-
$PIP install
|
|
25
|
+
$PIP install uv
|
|
26
|
+
$UV pip install -r requirements.txt
|
|
@@ -3,11 +3,11 @@ set -e
|
|
|
3
3
|
echo "Install OTVision development environment."
|
|
4
4
|
|
|
5
5
|
WORKING_DIR=$(pwd)
|
|
6
|
-
VENV="$WORKING_DIR"
|
|
7
|
-
PIP="$VENV"/bin/pip
|
|
6
|
+
VENV="$WORKING_DIR"/.venv
|
|
8
7
|
PRE_COMMIT="$VENV"/bin/pre-commit
|
|
8
|
+
UV="$VENV"/bin/uv
|
|
9
9
|
|
|
10
10
|
bash "$WORKING_DIR"/install.sh
|
|
11
11
|
|
|
12
|
-
$
|
|
12
|
+
$UV pip install -r requirements-dev.txt
|
|
13
13
|
$PRE_COMMIT install --install-hooks
|
|
@@ -16,14 +16,14 @@ def parse() -> argparse.Namespace:
|
|
|
16
16
|
help="Path to the video or image in which reference points are to be clicked",
|
|
17
17
|
)
|
|
18
18
|
parser.add_argument(
|
|
19
|
-
"--
|
|
19
|
+
"--log-level-console",
|
|
20
20
|
type=str,
|
|
21
21
|
choices=VALID_LOG_LEVELS,
|
|
22
22
|
help="Log level for logging to the console",
|
|
23
23
|
required=False,
|
|
24
24
|
)
|
|
25
25
|
parser.add_argument(
|
|
26
|
-
"--
|
|
26
|
+
"--log-level-file",
|
|
27
27
|
type=str,
|
|
28
28
|
choices=VALID_LOG_LEVELS,
|
|
29
29
|
help="Log level for logging to a log file",
|
|
@@ -37,7 +37,7 @@ def parse() -> argparse.Namespace:
|
|
|
37
37
|
required=False,
|
|
38
38
|
)
|
|
39
39
|
parser.add_argument(
|
|
40
|
-
"--
|
|
40
|
+
"--logfile-overwrite",
|
|
41
41
|
action="store_true",
|
|
42
42
|
help="Overwrite log file if it already exists.",
|
|
43
43
|
required=False,
|
|
@@ -23,7 +23,7 @@ CWD_CONFIG_FILE = r"user_config.otvision.yaml"
|
|
|
23
23
|
with open(CWD_CONFIG_FILE, "r") as file:
|
|
24
24
|
cwd_config = yaml.safe_load(file)
|
|
25
25
|
|
|
26
|
-
LOGFILE_OVERWRITE_CMD = "--
|
|
26
|
+
LOGFILE_OVERWRITE_CMD = "--logfile-overwrite"
|
|
27
27
|
PASSED: str = "passed"
|
|
28
28
|
EXPECTED: str = "expected"
|
|
29
29
|
|
|
@@ -35,10 +35,10 @@ TEST_DATA_ALL_PARAMS_FROM_CLI_1 = {
|
|
|
35
35
|
Path(f"./{CUSTOM_CONFIG_FILE}"),
|
|
36
36
|
],
|
|
37
37
|
},
|
|
38
|
-
"input_fps": {PASSED: "--
|
|
39
|
-
"fps_from_filename": {PASSED: "--
|
|
38
|
+
"input_fps": {PASSED: "--input-fps 30", EXPECTED: 30},
|
|
39
|
+
"fps_from_filename": {PASSED: "--fps-from-filename", EXPECTED: True},
|
|
40
40
|
"overwrite": {PASSED: "--overwrite", EXPECTED: True},
|
|
41
|
-
"delete_input": {PASSED: "--no-
|
|
41
|
+
"delete_input": {PASSED: "--no-delete-input", EXPECTED: False},
|
|
42
42
|
"config": {PASSED: ""},
|
|
43
43
|
"rotation": {PASSED: "--rotation 2", EXPECTED: 2},
|
|
44
44
|
}
|
|
@@ -51,10 +51,10 @@ TEST_DATA_ALL_PARAMS_FROM_CLI_2 = {
|
|
|
51
51
|
Path(f"./{CUSTOM_CONFIG_FILE}"),
|
|
52
52
|
],
|
|
53
53
|
},
|
|
54
|
-
"input_fps": {PASSED: "--
|
|
55
|
-
"fps_from_filename": {PASSED: "--no-
|
|
54
|
+
"input_fps": {PASSED: "--input-fps 25", EXPECTED: 25},
|
|
55
|
+
"fps_from_filename": {PASSED: "--no-fps-from-filename", EXPECTED: False},
|
|
56
56
|
"overwrite": {PASSED: "--no-overwrite", EXPECTED: False},
|
|
57
|
-
"delete_input": {PASSED: "--
|
|
57
|
+
"delete_input": {PASSED: "--delete-input", EXPECTED: True},
|
|
58
58
|
"config": {PASSED: ""},
|
|
59
59
|
"rotation": {PASSED: "--rotation 3", EXPECTED: 3},
|
|
60
60
|
}
|
|
@@ -95,13 +95,13 @@ TEST_DATA_PARAMS_FROM_CUSTOM_CONFIG = {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
TEST_FAIL_DATA = [
|
|
98
|
-
{PASSED: "--
|
|
99
|
-
{PASSED: "--
|
|
98
|
+
{PASSED: "--input-fps foo", "error_msg_part": "invalid float value: 'foo'"},
|
|
99
|
+
{PASSED: "--fps-from-filename 20", "error_msg_part": "unrecognized arguments"},
|
|
100
100
|
{PASSED: "--overwrite foo", "error_msg_part": "unrecognized arguments"},
|
|
101
|
-
{PASSED: "--
|
|
101
|
+
{PASSED: "--delete-input foo", "error_msg_part": "unrecognized arguments"},
|
|
102
102
|
{
|
|
103
|
-
PASSED: "--no-
|
|
104
|
-
"error_msg_part": "unrecognized arguments: --no-
|
|
103
|
+
PASSED: "--no-input-fps",
|
|
104
|
+
"error_msg_part": "unrecognized arguments: --no-input-fps",
|
|
105
105
|
},
|
|
106
106
|
]
|
|
107
107
|
|
|
@@ -37,7 +37,7 @@ custom_config = read_yaml(CUSTOM_CONFIG_FILE)
|
|
|
37
37
|
CWD_CONFIG_FILE = r"user_config.otvision.yaml"
|
|
38
38
|
cwd_config = read_yaml(CWD_CONFIG_FILE)
|
|
39
39
|
|
|
40
|
-
LOGFILE_OVERWRITE_CMD = "--
|
|
40
|
+
LOGFILE_OVERWRITE_CMD = "--logfile-overwrite"
|
|
41
41
|
PASSED: str = "passed"
|
|
42
42
|
EXPECTED: str = "expected"
|
|
43
43
|
|
|
@@ -55,13 +55,13 @@ TEST_DATA_ALL_PARAMS_FROM_CLI_1 = {
|
|
|
55
55
|
"imagesize": {PASSED: "--imagesize 1240", EXPECTED: 1240},
|
|
56
56
|
"half_precision": {PASSED: "--half", EXPECTED: True},
|
|
57
57
|
"expected_duration": {
|
|
58
|
-
PASSED: f"--
|
|
58
|
+
PASSED: f"--expected-duration {INPUT_EXPECTED_DURATION}",
|
|
59
59
|
EXPECTED: EXPECTED_DURATION,
|
|
60
60
|
},
|
|
61
61
|
"overwrite": {PASSED: "--overwrite", EXPECTED: True},
|
|
62
62
|
"config": {PASSED: ""},
|
|
63
|
-
"detect_start": {PASSED: "--
|
|
64
|
-
"detect_end": {PASSED: "--
|
|
63
|
+
"detect_start": {PASSED: "--detect-start 300", EXPECTED: 300},
|
|
64
|
+
"detect_end": {PASSED: "--detect-end 600", EXPECTED: 600},
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
TEST_DATA_ALL_PARAMS_FROM_CLI_2 = {
|
|
@@ -78,12 +78,12 @@ TEST_DATA_ALL_PARAMS_FROM_CLI_2 = {
|
|
|
78
78
|
"imagesize": {PASSED: "--imagesize 320", EXPECTED: 320},
|
|
79
79
|
"half_precision": {PASSED: "--no-half", EXPECTED: False},
|
|
80
80
|
"expected_duration": {
|
|
81
|
-
PASSED: f"--
|
|
81
|
+
PASSED: f"--expected-duration {INPUT_EXPECTED_DURATION}",
|
|
82
82
|
EXPECTED: EXPECTED_DURATION,
|
|
83
83
|
},
|
|
84
84
|
"overwrite": {PASSED: "--no-overwrite", EXPECTED: False},
|
|
85
|
-
"detect_start": {PASSED: "--
|
|
86
|
-
"detect_end": {PASSED: "--
|
|
85
|
+
"detect_start": {PASSED: "--detect-start 300", EXPECTED: 300},
|
|
86
|
+
"detect_end": {PASSED: "--detect-end 600", EXPECTED: 600},
|
|
87
87
|
"config": {PASSED: ""},
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -98,7 +98,7 @@ TEST_DATA_PARAMS_FROM_DEFAULT_CONFIG = {
|
|
|
98
98
|
EXPECTED: cwd_config[DETECT][HALF_PRECISION],
|
|
99
99
|
},
|
|
100
100
|
"expected_duration": {
|
|
101
|
-
PASSED: f"--
|
|
101
|
+
PASSED: f"--expected-duration {INPUT_EXPECTED_DURATION}",
|
|
102
102
|
EXPECTED: EXPECTED_DURATION,
|
|
103
103
|
},
|
|
104
104
|
"overwrite": {PASSED: "", EXPECTED: cwd_config[DETECT][OVERWRITE]},
|
|
@@ -124,7 +124,7 @@ TEST_DATA_PARAMS_FROM_CUSTOM_CONFIG = {
|
|
|
124
124
|
EXPECTED: custom_config[DETECT][HALF_PRECISION],
|
|
125
125
|
},
|
|
126
126
|
"expected_duration": {
|
|
127
|
-
PASSED: f"--
|
|
127
|
+
PASSED: f"--expected-duration {INPUT_EXPECTED_DURATION}",
|
|
128
128
|
EXPECTED: EXPECTED_DURATION,
|
|
129
129
|
},
|
|
130
130
|
"overwrite": {PASSED: "", EXPECTED: custom_config[DETECT][OVERWRITE]},
|
|
@@ -134,7 +134,7 @@ TEST_DATA_PARAMS_FROM_CUSTOM_CONFIG = {
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
required_arguments = (
|
|
137
|
-
f"--
|
|
137
|
+
f"--expected-duration {INPUT_EXPECTED_DURATION} {LOGFILE_OVERWRITE_CMD}"
|
|
138
138
|
)
|
|
139
139
|
TEST_FAIL_DATA = [
|
|
140
140
|
{
|
|
@@ -26,7 +26,7 @@ CWD_CONFIG_FILE = r"user_config.otvision.yaml"
|
|
|
26
26
|
with open(CWD_CONFIG_FILE, "r") as file:
|
|
27
27
|
cwd_config = yaml.safe_load(file)
|
|
28
28
|
|
|
29
|
-
LOGFILE_OVERWRITE_CMD = "--
|
|
29
|
+
LOGFILE_OVERWRITE_CMD = "--logfile-overwrite"
|
|
30
30
|
PASSED: str = "passed"
|
|
31
31
|
EXPECTED: str = "expected"
|
|
32
32
|
|
|
@@ -38,11 +38,11 @@ TEST_DATA_ALL_PARAMS_FROM_CLI_1 = {
|
|
|
38
38
|
Path(f"./{CUSTOM_CONFIG_FILE}"),
|
|
39
39
|
],
|
|
40
40
|
},
|
|
41
|
-
"sigma_h": {PASSED: "--
|
|
42
|
-
"sigma_l": {PASSED: "--
|
|
43
|
-
"sigma_iou": {PASSED: "--
|
|
44
|
-
"t_min": {PASSED: "--
|
|
45
|
-
"t_miss_max": {PASSED: "--
|
|
41
|
+
"sigma_h": {PASSED: "--sigma-h 0.37", EXPECTED: 0.37},
|
|
42
|
+
"sigma_l": {PASSED: "--sigma-l 0.29", EXPECTED: 0.29},
|
|
43
|
+
"sigma_iou": {PASSED: "--sigma-iou 0.36", EXPECTED: 0.36},
|
|
44
|
+
"t_min": {PASSED: "--t-min 5", EXPECTED: 5},
|
|
45
|
+
"t_miss_max": {PASSED: "--t-miss-max 38", EXPECTED: 38},
|
|
46
46
|
"overwrite": {PASSED: "--overwrite", EXPECTED: True},
|
|
47
47
|
"config": {PASSED: ""},
|
|
48
48
|
}
|
|
@@ -55,11 +55,11 @@ TEST_DATA_ALL_PARAMS_FROM_CLI_2 = {
|
|
|
55
55
|
Path(f"./{CUSTOM_CONFIG_FILE}"),
|
|
56
56
|
],
|
|
57
57
|
},
|
|
58
|
-
"sigma_h": {PASSED: "--
|
|
59
|
-
"sigma_l": {PASSED: "--
|
|
60
|
-
"sigma_iou": {PASSED: "--
|
|
61
|
-
"t_min": {PASSED: "--
|
|
62
|
-
"t_miss_max": {PASSED: "--
|
|
58
|
+
"sigma_h": {PASSED: "--sigma-h 0.42", EXPECTED: 0.42},
|
|
59
|
+
"sigma_l": {PASSED: "--sigma-l 0.34", EXPECTED: 0.34},
|
|
60
|
+
"sigma_iou": {PASSED: "--sigma-iou 0.41", EXPECTED: 0.41},
|
|
61
|
+
"t_min": {PASSED: "--t-min 7", EXPECTED: 7},
|
|
62
|
+
"t_miss_max": {PASSED: "--t-miss-max 43", EXPECTED: 43},
|
|
63
63
|
"overwrite": {PASSED: "--no-overwrite", EXPECTED: False},
|
|
64
64
|
"config": {PASSED: ""},
|
|
65
65
|
}
|
|
@@ -96,31 +96,31 @@ TEST_DATA_PARAMS_FROM_CUSTOM_CONFIG = {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
TEST_FAIL_DATA = [
|
|
99
|
-
{PASSED: "--
|
|
100
|
-
{PASSED: "--
|
|
101
|
-
{PASSED: "--
|
|
102
|
-
{PASSED: "--
|
|
103
|
-
{PASSED: "--
|
|
99
|
+
{PASSED: "--sigma-h foo", "error_msg_part": "invalid float value: 'foo'"},
|
|
100
|
+
{PASSED: "--sigma-l foo", "error_msg_part": "invalid float value: 'foo'"},
|
|
101
|
+
{PASSED: "--sigma-iou foo", "error_msg_part": "invalid float value: 'foo'"},
|
|
102
|
+
{PASSED: "--t-min 2.2", "error_msg_part": "invalid int value: '2.2'"},
|
|
103
|
+
{PASSED: "--t-miss-max 2.2", "error_msg_part": "invalid int value: '2.2'"},
|
|
104
104
|
{PASSED: "--overwrite foo", "error_msg_part": "unrecognized arguments"},
|
|
105
105
|
{
|
|
106
|
-
PASSED: "--no-
|
|
107
|
-
"error_msg_part": "unrecognized arguments: --no-
|
|
106
|
+
PASSED: "--no-sigma-h",
|
|
107
|
+
"error_msg_part": "unrecognized arguments: --no-sigma-h",
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
|
-
PASSED: "--no-
|
|
111
|
-
"error_msg_part": "unrecognized arguments: --no-
|
|
110
|
+
PASSED: "--no-sigma-l",
|
|
111
|
+
"error_msg_part": "unrecognized arguments: --no-sigma-l",
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
|
-
PASSED: "--no-
|
|
115
|
-
"error_msg_part": "unrecognized arguments: --no-
|
|
114
|
+
PASSED: "--no-sigma-iou",
|
|
115
|
+
"error_msg_part": "unrecognized arguments: --no-sigma-iou",
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
|
-
PASSED: "--no-
|
|
119
|
-
"error_msg_part": "unrecognized arguments: --no-
|
|
118
|
+
PASSED: "--no-t-min",
|
|
119
|
+
"error_msg_part": "unrecognized arguments: --no-t-min",
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
|
-
PASSED: "--no-
|
|
123
|
-
"error_msg_part": "unrecognized arguments: --no-
|
|
122
|
+
PASSED: "--no-t-miss-max",
|
|
123
|
+
"error_msg_part": "unrecognized arguments: --no-t-miss-max",
|
|
124
124
|
},
|
|
125
125
|
]
|
|
126
126
|
|