An open API service indexing awesome lists of open source software.

https://github.com/hetbhalani/car_counter

I am learning object detection using python
https://github.com/hetbhalani/car_counter

Last synced: about 1 year ago
JSON representation

I am learning object detection using python

Awesome Lists containing this project

README

          

# Car Counting πŸš—

This is a Python-based project that uses the YOLOv8 object detection model and the SORT (Simple Online and Realtime Tracking) algorithm to count vehicles in a video feed. πŸŽ₯

## Screensort πŸ“Έ

![ss of detection](./imgs/detect.jpg)

## Features πŸš€

- Real-time vehicle detection and counting πŸ”
- Supports various vehicle types (cars, trucks, buses, motorbikes) πŸš—πŸšŒπŸοΈ
- Utilizes a custom road mask to focus the detection on the desired region πŸ›£οΈ
- Tracks individual vehicles across frames using the SORT algorithm πŸ”πŸ€–

## Tech used πŸ’»

- Python 3.x
- OpenCV πŸ–₯️
- Ultralytics YOLO πŸ€–
- SORT (Simple Online and Realtime Tracking) πŸ”
- cvzone 🎨

## How it Works πŸ€–

1. The code loads the YOLOv8 model and initializes the SORT tracker. πŸ”
2. It then processes each frame of the video, detecting vehicles using the YOLOv8 model and vehicle types (cars, trucks, buses, bikes). 🚘
3. The detected vehicles are then passed to the SORT tracker, which keeps track of individual vehicles across frames. πŸ”
4. The script draws bounding boxes around the detected vehicles, displays the vehicle IDs, and counts the number of unique vehicles that have passed through the linrπŸ”’

## βš™οΈ Installation

Follow these steps to run project :

1. **Clone the repository**:
```bash
git clone https://github.com/hetbhalani/Car_Counter.git
cd Car_Counter
```

2. **Install dependencies** :
```bash
pip install requirements.txt
```

3. **Run the app**:
```bash
python CarCounter.py
```

## Contributing 🀝

If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request. πŸ™Œ

## Acknowledgments πŸ™

Special thanks to Alex Bewley, the creator of the SORT (Simple Online and Realtime Tracking) algorithm, for his valuable contribution to the field of object tracking.