This repository contains the Python implementation of a novel approach for detecting and estimating the height of roadside objects using dashcam video. This project is part of an ongoing Ph.D. study exploring real-time roadside vegetation and infrastructure monitoring using in-vehicle data sources.
PS: While this repository currently includes code for object detection and height estimation, additional components will be released following the publication of the associated research paper.
This tool processes dashboard camera video to detect and estimate the heights of roadside objects, such as trees and poles.
Employs the YOLO v8 algorithm for object detection in video frames.
Utilizes monocular vision to derive depth information from frames. Leverages a deep learning model for monocular depth estimation (Depth-Anything) to generate depth point clouds and images.
Integrates depth information with bounding box coordinates of detected objects. Performs mathematical operations to extract height information of detected objects.
Clone the repository and install the required Python packages listed in requirements.txt:
git clone https://github.com/djoshi1000/Dashcam_detect_ht.git
pip install -r requirements.txt
####################### Code #######################
- Data # Input image frames
- Main
- config
- config.yaml # Configuration file for paths and parameters
- src
- depth_estimation.py # Functions for monocular depth estimation
- object_detection.py # YOLO-based object detection training code (not kept here)
- point_cloud.py # Depth point cloud generation
- utils.py # Utility functions for preprocessing and analysis
- Process.py # Functions for video frame processing
- geolocation.py # Geolocate the detected object (Not updated here. Will be updated after the published research).
- run.py # Main execution script
- config
- Model # YOLO model weights (e.g.,
best.pt
) - Output # Directory for output files (e.g., processed frames)
- requirements.txt # List of dependencies
- README.md # Documentation
python run.py --config=config/config.yaml
Specify paths and parameters in the config.yaml file: Video/Input frames path/ output frame paths YOLO model configuration Depth estimation parameters
Although YOLO v8 is integrated, you can replace it with other object detection algorithms. Update the detection parameters in the configuration file (config.yaml) as needed. Mathematical operations are applied to calculate height.
This project builds upon the open-source contributions of: [1] Depth-anything [2] Ultralytics
For inquiries or further details, contact Durga Joshi at durga.joshi@uconn.edu.