CarJam is a pet project that detects, tracks, and counts vehicles in video streams using YOLOv8 and the Supervision toolkit. It runs in Google Colab, making it easy to experiment, prototype, and explore traffic analysis with minimal setup.
- Vehicle detection with Ultralytics YOLOv8
- Object tracking using Supervision's built-in utilities
- Custom class filtering, e.g., cars, trucks, buses
- Virtual line counting, including support for diagonal lines
- Visual annotations on frames (boxes, labels, counters)
- Google Drive integration for loading videos and models
The core logic is implemented in the following notebook:
fork-how-to-track-and-count-vehicles-with-yolov8-and-supervison.ipynb
Basically, it is a fork of Supervision notebook.
It demonstrates:
- Loading a YOLOv8 model
- Detecting specific object classes
- Annotating frames with bounding boxes and labels
- Counting objects as they cross a virtual line
- Input: Any video file (e.g.,
.mp4
) from Google Drive - Output: Annotated video frames with visual counting and tracking
🅿️ Parking space availability tracking- 🧍 Pedestrian zone analytics
- 🛰️ Process videostream from a remote webcam
The project started as an experiment to learn video-based detection and tracking.
The name CarJam reflects the real-world use case of understanding traffic density and vehicle movement patterns.
Though not intended as a commercial tool, it may serve as a stepping stone toward more advanced traffic analysis applications.
This project is released under the MIT License. See LICENSE for details.
Pull requests, suggestions, and forks are welcome.
If you adapt it for something cool — feel free to share!