https://github.com/ultralytics/velocity
Structure From Motion (SFM) for vehicle speed
https://github.com/ultralytics/velocity
deep-learning machine-learning machine-vision opencv-python pytorch tensorflow
Last synced: 10 months ago
JSON representation
Structure From Motion (SFM) for vehicle speed
- Host: GitHub
- URL: https://github.com/ultralytics/velocity
- Owner: ultralytics
- License: agpl-3.0
- Created: 2018-03-23T17:46:15.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2025-05-11T00:05:11.000Z (11 months ago)
- Last Synced: 2025-05-20T14:07:49.011Z (11 months ago)
- Topics: deep-learning, machine-learning, machine-vision, opencv-python, pytorch, tensorflow
- Language: Python
- Homepage: http://ultralytics.com
- Size: 43.7 MB
- Stars: 61
- Watchers: 2
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# đ Introduction
Welcome to the [Ultralytics Velocity](https://github.com/ultralytics/velocity) repository! Here, we delve into the intersection of [Machine Learning (ML)](https://www.ultralytics.com/glossary/machine-learning-ml) and [Structure From Motion (SFM)](https://en.wikipedia.org/wiki/Structure_from_motion) to estimate the speed of vehicles using image analysis. Our objective is to enhance vehicle speed estimation methodologies and provide a foundation for future research and practical applications in fields like [traffic management](https://www.ultralytics.com/blog/ai-in-traffic-management-from-congestion-to-coordination) and [autonomous systems](https://www.ultralytics.com/glossary/autonomous-vehicles).
[](https://github.com/ultralytics/velocity/actions/workflows/format.yml)

## đ¯ Project Objectives
This project aims to leverage advanced [ML](https://www.ultralytics.com/glossary/machine-learning-ml) and SFM techniques to accurately estimate vehicle speeds from various forms of imagery. By developing these methods, we hope to contribute valuable tools applicable to traffic monitoring, [autonomous driving systems](https://www.ultralytics.com/solutions/ai-in-automotive), and road safety analysis.
## đ¸ Dataset
Currently, a public [dataset](https://www.ultralytics.com/glossary/benchmark-dataset) is not provided with this repository. The methods are designed for integration with custom datasets. If you possess relevant imagery or wish to collaborate on applying these techniques, please contact us. For general dataset needs, explore resources like [Roboflow](https://roboflow.com/?ref=ultralytics) or public datasets like [COCO](https://docs.ultralytics.com/datasets/detect/coco/).
# đ Requirements
To execute the code within this repository, ensure you meet the following prerequisites:
- **Python 3.7+**: Install [Python](https://www.python.org/) and use [pip](https://pip.pypa.io/en/stable/) to set up the necessary libraries:
```bash
pip3 install -U -r requirements.txt
```
The `requirements.txt` file includes essential Python packages such as:
- [`numpy`](https://numpy.org/): Fundamental package for numerical computation.
- [`scipy`](https://scipy.org/): Library for scientific and technical computing.
- [`torch`](https://pytorch.org/): An open-source [deep learning](https://www.ultralytics.com/glossary/deep-learning-dl) framework ([PyTorch](https://www.ultralytics.com/glossary/pytorch)).
- [`opencv-python`](https://pypi.org/project/opencv-python/): [OpenCV](https://opencv.org/) library for [computer vision](https://www.ultralytics.com/glossary/computer-vision-cv) tasks.
- [`exifread`](https://github.com/ianare/exif-py): Library to read Exif metadata from image files.
- [`bokeh`](https://bokeh.org/) (optional): For interactive data visualization.
- **MATLAB 2018a or newer**: Some scripts require [MATLAB](https://www.mathworks.com/products/matlab.html). Clone the common functions repository and add it to your MATLAB path:
```bash
git clone https://github.com/ultralytics/functions-matlab
```
Then, within MATLAB:
```matlab
>> addpath(genpath('/path/to/functions-matlab')) % Replace /path/to/ with the actual path
```
Ensure the following MATLAB toolboxes are installed:
- `Statistics and Machine Learning Toolbox`
- `Signal Processing Toolbox`
# đ Run
This repository offers various methods for vehicle speed estimation using SFM and ML. While detailed run instructions are context-dependent, the core scripts leverage the libraries listed in the requirements. If you're interested in applying these techniques or need specific guidance on execution, please don't hesitate to reach out or raise an [Issue](https://github.com/ultralytics/velocity/issues).

# đ Citation
If this repository contributes to your research or project, please cite it using the following DOI:
[](https://zenodo.org/badge/latestdoi/126519968)
# đ¤ Contribute
We actively welcome contributions from the community! Whether it's fixing bugs, proposing new features, or enhancing documentation, your input is highly valued. Please see our [Contributing Guide](https://docs.ultralytics.com/help/contributing/) for more details on how to get started. We also encourage you to share your experiences with Ultralytics projects by completing our brief [Survey](https://www.ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey). A huge đ thank you to all our contributors!
[](https://github.com/ultralytics/ultralytics/graphs/contributors)
# ÂŠī¸ License
Ultralytics provides two licensing options to accommodate different use cases:
- **AGPL-3.0 License**: This [OSI-approved](https://opensource.org/license/agpl-v3) open-source license is ideal for students, researchers, and enthusiasts keen on open collaboration and knowledge sharing. It promotes transparency and community involvement. See the [LICENSE](https://github.com/ultralytics/velocity/blob/main/LICENSE) file for full details.
- **Enterprise License**: Designed for commercial applications, this license permits the seamless integration of Ultralytics software and AI models into commercial products and services, bypassing the open-source requirements of AGPL-3.0. If your project requires commercial licensing, please contact us through [Ultralytics Licensing](https://www.ultralytics.com/license).
# đŦ Contact Us
For bug reports, feature suggestions, and contributions, please visit [GitHub Issues](https://github.com/ultralytics/velocity/issues). For broader questions and discussions about this project or other Ultralytics initiatives, join our vibrant community on [Discord](https://discord.com/invite/ultralytics)!






