OTVision is a core module of the OpenTrafficCam framework to perform object detection and tracking.
Project description
OTVision
OTVision is a core module of the OpenTrafficCam framework designed to detect and track objects (road users) in videos recorded by OTCamera or other camera systems. The resulting trajectories can be used for traffic analysis using OTAnalytics.
Features
- Video Conversion: Convert video files (h264 to mp4) with options to set frame rate and rotation
- Object Detection: Detect road users in videos using state-of-the-art YOLO models
- Object Tracking: Track detected objects through video frames using IOU-based tracking algorithms
Requirements
System Requirements
- Python 3.12
- uv for dependency management
- CUDA-capable GPU (recommended for faster processing)
- ffmpeg (optional for video conversion)
Installation
Installation from GitHub Releases
Pre-built releases are available on GitHub for easy installation:
- Go to the OTVision Releases page on GitHub
- Download the appropriate release for your platform:
- Windows: Choose between
OTVision-win-{vX.Y.Z}.zip(standard) orOTVision-win-cuda-{vX.Y.Z}.zip(with CUDA support) - Linux: Choose between
OTVision-linux-{vX.Y.Z}.zip(standard) orOTVision-linux-cuda-{vX.Y.Z}.zip(with CUDA support) - macOS: Choose
OTVision-macos-{vX.Y.Z}.zip
- Windows: Choose between
- Extract the downloaded ZIP file
- Run the installation script:
- On Windows: Double-click
install.cmd - On Linux: Run
./install.sh - On macOS: Double-click
install.command
- On Windows: Double-click
Manual Installation
-
Clone the repository:
git clone https://github.com/OpenTrafficCam/OTVision.git cd OTVision
-
Install the package:
- On Windows:
install.cmd
- On Linux/macOS:
./install.sh
- On Windows:
Manual Development Installation
For development purposes, if you want to contribute to the project:
-
Clone the repository:
git clone https://github.com/OpenTrafficCam/OTVision.git cd OTVision
-
Install the development version:
- On Windows:
install_dev.cmd
- On Linux/macOS:
./install_dev.sh
- On Windows:
Usage
OTVision provides several command-line scripts for different functionalities:
Video Conversion
Convert video files (e.g., h264 to mp4):
uv run convert.py --paths /path/to/videos/*.h264 --input-fps 20.0 --rotation 0
Object Detection
Detect objects in videos:
uv run detect.py --paths /path/to/videos/*.mp4 --weights yolov8s
Object Tracking
Track detected objects:
uv run track.py --paths /path/to/detections/*.otdet
Coordinate Transformation
Transform pixel coordinates to UTM coordinates:
uv run transform.py --paths /path/to/tracks/*.ottrk --refpts-file /path/to/reference_points.json
Configuration
OTVision can be configured using a YAML configuration file. A default configuration is provided in user_config.otvision.yaml. You can specify a custom configuration file using the --config option:
uv run detect.py --config /path/to/custom_config.yaml
Documentation
For detailed documentation, visit:
Contributing
We appreciate your support in the form of both code and comments. Please have a look at the contribute section of the OpenTrafficCam documentation for guidelines on how to contribute to the project.
License
This software is licensed under the GPL-3.0 License.
Contact
- GitHub: https://github.com/OpenTrafficCam
- Email: team@opentrafficcam.org
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file otvision-0.7.2.tar.gz.
File metadata
- Download URL: otvision-0.7.2.tar.gz
- Upload date:
- Size: 65.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e534b2d3d6562ad0756fd636179e1e6a22dc0cefe0e8895f628060776b8f6947
|
|
| MD5 |
31acb2377bfcb9aa41c9c11dd4d3b8cf
|
|
| BLAKE2b-256 |
a800559c9f6c44026873f5eb555507cbae898b9545a8caab83ec217b63543d20
|
Provenance
The following attestation bundles were made for otvision-0.7.2.tar.gz:
Publisher:
release-pypi.yml on OpenTrafficCam/OTVision
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
otvision-0.7.2.tar.gz -
Subject digest:
e534b2d3d6562ad0756fd636179e1e6a22dc0cefe0e8895f628060776b8f6947 - Sigstore transparency entry: 1109606289
- Sigstore integration time:
-
Permalink:
OpenTrafficCam/OTVision@2602db6a9bcdb496119aacbc5beb9259a6501fac -
Branch / Tag:
refs/tags/v0.7.2 - Owner: https://github.com/OpenTrafficCam
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@2602db6a9bcdb496119aacbc5beb9259a6501fac -
Trigger Event:
push
-
Statement type:
File details
Details for the file otvision-0.7.2-py3-none-any.whl.
File metadata
- Download URL: otvision-0.7.2-py3-none-any.whl
- Upload date:
- Size: 141.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7e1a80c3cbb7a4b17bf2810c9ea3b4556904f964f2d6a007e4915b31225d6b4
|
|
| MD5 |
9a0907a87608a445d92e214a3009ff17
|
|
| BLAKE2b-256 |
79e72ccc1c6c3f4da6eb2eb4d21f8af8401dbd4cf17367c6b64a7d4331bba8c0
|
Provenance
The following attestation bundles were made for otvision-0.7.2-py3-none-any.whl:
Publisher:
release-pypi.yml on OpenTrafficCam/OTVision
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
otvision-0.7.2-py3-none-any.whl -
Subject digest:
c7e1a80c3cbb7a4b17bf2810c9ea3b4556904f964f2d6a007e4915b31225d6b4 - Sigstore transparency entry: 1109606332
- Sigstore integration time:
-
Permalink:
OpenTrafficCam/OTVision@2602db6a9bcdb496119aacbc5beb9259a6501fac -
Branch / Tag:
refs/tags/v0.7.2 - Owner: https://github.com/OpenTrafficCam
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@2602db6a9bcdb496119aacbc5beb9259a6501fac -
Trigger Event:
push
-
Statement type: