CarFlow is a web application that utilizes computer vision technology to facilitate vehicle tracking, vehicle counting, and the detection and identification of speeding vehicles.
- Upload video files (MP4, MOV) for processing
- Draw detection lines on the first frame of the uploaded video
- Detect and count vehicles crossing the detection line
- Process the video with the drawn detection line
- Download the processed video with vehicle counting information
- Frontend: HTML, CSS, JavaScript
- Backend: Python, FastAPI
- Computer Vision: OpenCV, Ultralytics YOLO
-
Clone the repository:
-
Navigate to the project directory:
-
Install the required Python packages:
pip install -r requirements.txt
- Download the YOLO model weights:
gdown https://github.com/ultralytics/yolov5/releases/download/v6.2/yolov9c.pt
-
Start the FastAPI server: uvicorn main:app --reload
-
Open your web browser and navigate to
http://localhost:8000
. -
Follow the on-screen instructions to upload a video, draw a detection line, and process the video.
-
Once the video is processed, you can download the output video with vehicle counting information.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
This project is licensed under the MIT License.