OTVision


NameOTVision JSON
Version 0.6.9 PyPI version JSON
download
home_pageNone
SummaryOTVision is a core module of the OpenTrafficCam framework to perform object detection and tracking.
upload_time2025-07-18 10:31:30
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseNone
keywords opentrafficcam traffic analysis traffic counting trajectories
VCS
bugtrack_url
requirements av ffmpeg-python fire geopandas ijson more-itertools moviepy numpy numpy opencv-python pandas PyYAML torch torchvision tqdm ujson ultralytics
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # OTVision

[![PyPI version](https://img.shields.io/pypi/v/OTVision.svg)](https://pypi.org/project/OTVision/)
[![Tests](https://github.com/OpenTrafficCam/OTVision/actions/workflows/test.yml/badge.svg?tag=latest)](https://github.com/OpenTrafficCam/OTVision/actions/workflows/test.yml?query=tag%3Alatest)
[![Tests](https://github.com/OpenTrafficCam/OTVision/actions/workflows/build-release.yml/badge.svg)](https://github.com/OpenTrafficCam/OTVision/actions/workflows/build-release.yml)

OTVision is a core module of the [OpenTrafficCam framework](https://github.com/OpenTrafficCam) designed to detect and track objects (road users) in videos recorded by [OTCamera](https://github.com/OpenTrafficCam/OTCamera) or other camera systems. The resulting trajectories can be used for traffic analysis using [OTAnalytics](https://github.com/OpenTrafficCam/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
- **Coordinate Transformation**: Transform pixel coordinates to real-world UTM coordinates

## Requirements

### System Requirements

- Python 3.12 or higher
- CUDA-capable GPU (recommended for faster processing)
- Dependencies listed in [requirements.txt](requirements.txt)

## Installation

### Installation from GitHub Releases

Pre-built releases are available on GitHub for easy installation:

1. Go to the [OTVision Releases page](https://github.com/OpenTrafficCam/OTVision/releases) on GitHub
2. Download the appropriate release for your platform:
   - **Windows**: Choose between `otvision-win.zip` (standard) or `otvision-win-cuda.zip` (with CUDA support)
   - **Linux**: Choose between `otvision-linux.zip` (standard) or `otvision-linux-cuda.zip` (with CUDA support)
   - **macOS**: Choose `OTVision-macos.zip`
3. Extract the downloaded ZIP file
4. Run the installation script:
   - On Windows: Double-click `install.cmd`
   - On Linux: Run `./install.sh`
   - On macOS: Double-click `install.command`

### Manual Installation

1. Clone the repository:

   ```bash
   git clone https://github.com/OpenTrafficCam/OTVision.git
   cd OTVision
   ```

2. Install the package:
   - On Windows:
     ```cmd
     install.cmd
     ```
   - On Linux/macOS:
     ```bash
     ./install.sh
     ```

### Manual Development Installation

For development purposes, if you want to contribute to the project:

1. Clone the repository:

   ```bash
   git clone https://github.com/OpenTrafficCam/OTVision.git
   cd OTVision
   ```

2. Install the development version:
   - On Windows:
     ```cmd
     install_dev.cmd
     ```
   - On Linux/macOS:
     ```bash
     ./install_dev.sh
     ```

## Usage

OTVision provides several command-line scripts for different functionalities:

### Video Conversion

Convert video files (e.g., h264 to mp4):

```bash
python convert.py --paths /path/to/videos/*.h264 --input-fps 20.0 --rotation 0
```

### Object Detection

Detect objects in videos:

```bash
python detect.py --paths /path/to/videos/*.mp4 --weights yolov8s
```

### Object Tracking

Track detected objects:

```bash
python track.py --paths /path/to/detections/*.otdet
```

### Coordinate Transformation

Transform pixel coordinates to UTM coordinates:

```bash
python 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:

```bash
python detect.py --config /path/to/custom_config.yaml
```

## Documentation

For detailed documentation, visit:

- [OTVision Documentation](https://opentrafficcam.org/OTVision/)
- [Getting Started Guide](https://opentrafficcam.org/OTVision/gettingstarted/firstuse/)
- [Requirements](https://opentrafficcam.org/OTVision/gettingstarted/requirements/)
- [Installation Guide](https://opentrafficcam.org/OTVision/gettingstarted/installation/)

## Contributing

We appreciate your support in the form of both code and comments. Please have a look at the [contribute](https://opentrafficcam.org/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](LICENSE).

## Contact

- GitHub: [https://github.com/OpenTrafficCam](https://github.com/OpenTrafficCam)
- Email: [team@opentrafficcam.org](mailto:team@opentrafficcam.org)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "OTVision",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "OpenTrafficCam, Traffic Analysis, Traffic Counting, Trajectories",
    "author": null,
    "author_email": "OpenTrafficCam contributors <team@opentrafficcam.org>, platomo GmbH <info@platomo.de>",
    "download_url": "https://files.pythonhosted.org/packages/a6/e4/64eba62ce940093059233dc37da6b9040b2ac3f8a5981c2fe8b0862a42db/otvision-0.6.9.tar.gz",
    "platform": null,
    "description": "# OTVision\n\n[![PyPI version](https://img.shields.io/pypi/v/OTVision.svg)](https://pypi.org/project/OTVision/)\n[![Tests](https://github.com/OpenTrafficCam/OTVision/actions/workflows/test.yml/badge.svg?tag=latest)](https://github.com/OpenTrafficCam/OTVision/actions/workflows/test.yml?query=tag%3Alatest)\n[![Tests](https://github.com/OpenTrafficCam/OTVision/actions/workflows/build-release.yml/badge.svg)](https://github.com/OpenTrafficCam/OTVision/actions/workflows/build-release.yml)\n\nOTVision is a core module of the [OpenTrafficCam framework](https://github.com/OpenTrafficCam) designed to detect and track objects (road users) in videos recorded by [OTCamera](https://github.com/OpenTrafficCam/OTCamera) or other camera systems. The resulting trajectories can be used for traffic analysis using [OTAnalytics](https://github.com/OpenTrafficCam/OTAnalytics).\n\n## Features\n\n- **Video Conversion**: Convert video files (h264 to mp4) with options to set frame rate and rotation\n- **Object Detection**: Detect road users in videos using state-of-the-art YOLO models\n- **Object Tracking**: Track detected objects through video frames using IOU-based tracking algorithms\n- **Coordinate Transformation**: Transform pixel coordinates to real-world UTM coordinates\n\n## Requirements\n\n### System Requirements\n\n- Python 3.12 or higher\n- CUDA-capable GPU (recommended for faster processing)\n- Dependencies listed in [requirements.txt](requirements.txt)\n\n## Installation\n\n### Installation from GitHub Releases\n\nPre-built releases are available on GitHub for easy installation:\n\n1. Go to the [OTVision Releases page](https://github.com/OpenTrafficCam/OTVision/releases) on GitHub\n2. Download the appropriate release for your platform:\n   - **Windows**: Choose between `otvision-win.zip` (standard) or `otvision-win-cuda.zip` (with CUDA support)\n   - **Linux**: Choose between `otvision-linux.zip` (standard) or `otvision-linux-cuda.zip` (with CUDA support)\n   - **macOS**: Choose `OTVision-macos.zip`\n3. Extract the downloaded ZIP file\n4. Run the installation script:\n   - On Windows: Double-click `install.cmd`\n   - On Linux: Run `./install.sh`\n   - On macOS: Double-click `install.command`\n\n### Manual Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/OpenTrafficCam/OTVision.git\n   cd OTVision\n   ```\n\n2. Install the package:\n   - On Windows:\n     ```cmd\n     install.cmd\n     ```\n   - On Linux/macOS:\n     ```bash\n     ./install.sh\n     ```\n\n### Manual Development Installation\n\nFor development purposes, if you want to contribute to the project:\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/OpenTrafficCam/OTVision.git\n   cd OTVision\n   ```\n\n2. Install the development version:\n   - On Windows:\n     ```cmd\n     install_dev.cmd\n     ```\n   - On Linux/macOS:\n     ```bash\n     ./install_dev.sh\n     ```\n\n## Usage\n\nOTVision provides several command-line scripts for different functionalities:\n\n### Video Conversion\n\nConvert video files (e.g., h264 to mp4):\n\n```bash\npython convert.py --paths /path/to/videos/*.h264 --input-fps 20.0 --rotation 0\n```\n\n### Object Detection\n\nDetect objects in videos:\n\n```bash\npython detect.py --paths /path/to/videos/*.mp4 --weights yolov8s\n```\n\n### Object Tracking\n\nTrack detected objects:\n\n```bash\npython track.py --paths /path/to/detections/*.otdet\n```\n\n### Coordinate Transformation\n\nTransform pixel coordinates to UTM coordinates:\n\n```bash\npython transform.py --paths /path/to/tracks/*.ottrk --refpts-file /path/to/reference_points.json\n```\n\n### Configuration\n\nOTVision 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:\n\n```bash\npython detect.py --config /path/to/custom_config.yaml\n```\n\n## Documentation\n\nFor detailed documentation, visit:\n\n- [OTVision Documentation](https://opentrafficcam.org/OTVision/)\n- [Getting Started Guide](https://opentrafficcam.org/OTVision/gettingstarted/firstuse/)\n- [Requirements](https://opentrafficcam.org/OTVision/gettingstarted/requirements/)\n- [Installation Guide](https://opentrafficcam.org/OTVision/gettingstarted/installation/)\n\n## Contributing\n\nWe appreciate your support in the form of both code and comments. Please have a look at the [contribute](https://opentrafficcam.org/contribute) section of the OpenTrafficCam documentation for guidelines on how to contribute to the project.\n\n## License\n\nThis software is licensed under the [GPL-3.0 License](LICENSE).\n\n## Contact\n\n- GitHub: [https://github.com/OpenTrafficCam](https://github.com/OpenTrafficCam)\n- Email: [team@opentrafficcam.org](mailto:team@opentrafficcam.org)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "OTVision is a core module of the OpenTrafficCam framework to perform object detection and tracking.",
    "version": "0.6.9",
    "project_urls": {
        "Changelog": "https://github.com/OpenTrafficCam/OTVision/releases",
        "Documentation": "https://opentrafficcam.org/overview/",
        "Homepage": "https://opentrafficcam.org/",
        "Issues": "https://github.com/OpenTrafficCam/OTVision/issues",
        "Repository": "https://github.com/OpenTrafficCam/OTVision"
    },
    "split_keywords": [
        "opentrafficcam",
        " traffic analysis",
        " traffic counting",
        " trajectories"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5d3b9ae269d2f52dc9777a5a8a6ec636c6bc80884d0e7ba4709eb9af3dfc88c8",
                "md5": "664a55c73b1ee70178de517a828301f9",
                "sha256": "7676e461ca1de04c806d523854fed608ee88c3b9992d0305a4ef136f1a8e43f9"
            },
            "downloads": -1,
            "filename": "otvision-0.6.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "664a55c73b1ee70178de517a828301f9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 139936,
            "upload_time": "2025-07-18T10:31:26",
            "upload_time_iso_8601": "2025-07-18T10:31:26.711426Z",
            "url": "https://files.pythonhosted.org/packages/5d/3b/9ae269d2f52dc9777a5a8a6ec636c6bc80884d0e7ba4709eb9af3dfc88c8/otvision-0.6.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a6e464eba62ce940093059233dc37da6b9040b2ac3f8a5981c2fe8b0862a42db",
                "md5": "b823e309b179e58dda087dfcc168b40f",
                "sha256": "9781026a459e62eb505b66caa1549cfcf476c98813b4cf3fe3c5f2b8535be1df"
            },
            "downloads": -1,
            "filename": "otvision-0.6.9.tar.gz",
            "has_sig": false,
            "md5_digest": "b823e309b179e58dda087dfcc168b40f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 65183250,
            "upload_time": "2025-07-18T10:31:30",
            "upload_time_iso_8601": "2025-07-18T10:31:30.102077Z",
            "url": "https://files.pythonhosted.org/packages/a6/e4/64eba62ce940093059233dc37da6b9040b2ac3f8a5981c2fe8b0862a42db/otvision-0.6.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-18 10:31:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "OpenTrafficCam",
    "github_project": "OTVision",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "av",
            "specs": [
                [
                    "==",
                    "13.0.0"
                ]
            ]
        },
        {
            "name": "ffmpeg-python",
            "specs": [
                [
                    "==",
                    "0.2.0"
                ]
            ]
        },
        {
            "name": "fire",
            "specs": [
                [
                    "==",
                    "0.7.0"
                ]
            ]
        },
        {
            "name": "geopandas",
            "specs": [
                [
                    "==",
                    "1.0.1"
                ]
            ]
        },
        {
            "name": "ijson",
            "specs": [
                [
                    "==",
                    "3.3.0"
                ]
            ]
        },
        {
            "name": "more-itertools",
            "specs": [
                [
                    "==",
                    "10.7.0"
                ]
            ]
        },
        {
            "name": "moviepy",
            "specs": [
                [
                    "==",
                    "1.0.3"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "2.1.1"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "1.26.4"
                ]
            ]
        },
        {
            "name": "opencv-python",
            "specs": [
                [
                    "==",
                    "4.10.0.84"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    "==",
                    "2.2.3"
                ]
            ]
        },
        {
            "name": "PyYAML",
            "specs": [
                [
                    "==",
                    "6.0.2"
                ]
            ]
        },
        {
            "name": "torch",
            "specs": [
                [
                    "==",
                    "2.7.1"
                ]
            ]
        },
        {
            "name": "torchvision",
            "specs": [
                [
                    "==",
                    "0.22.1"
                ]
            ]
        },
        {
            "name": "tqdm",
            "specs": [
                [
                    "==",
                    "4.67.1"
                ]
            ]
        },
        {
            "name": "ujson",
            "specs": [
                [
                    "==",
                    "5.10.0"
                ]
            ]
        },
        {
            "name": "ultralytics",
            "specs": [
                [
                    "==",
                    "8.3.159"
                ]
            ]
        }
    ],
    "lcname": "otvision"
}
        
Elapsed time: 1.92250s