Detects blue cars, counts vehicles, and counts people at traffic signals.
This project uses YOLO object detection with a color classification model to detect cars at traffic signals, identify their colors, and count people.
It’s useful for traffic monitoring, enforcement, and analytics.
Car-colour-detection/
├── app.py
│
├── models/
│ └── blue_car_classifier.keras
│
├── yolo/
│ └── yolov8s.pt
│
├── style.css
│
├── notebooks/
│ └── Car_Colour_Detection.ipynb
│
├── data/
│ ├── input/
│ │ └── sample_inputs
│ └── output/
│ └── sample_outputs
│
├── results/
│ ├── evaluation_metrics.png
│ ├── confusion_matrix.png
│ └── classification_report.png
│
├── requirements.txt
└── README.md
- 🚗 Colour-specific car detection
- 🔲 Bounding Box for cars
- 📊 Display of car colour & count + people count
- ⚡ Works with images and video files
- 🎯 Achieved ~96% Accuracy
- Source: Car Colours Dataset
- Format Used: Images sorted into color-labeled folders
- Detection → YOLO detects cars & people in each frame
- Classification → Car colours are identified
- Bounding Boxes →
- Blue cars → Red boxes
- Other cars → Blue boxes
- Counting → Number of cars & people displayed on top
In GitHub Codespaces
# Update the package list and then install the libgl1 graphics library
sudo apt-get update && sudo apt-get install libgl1
# Install dependencies
pip install -r requirements.txt
# Run the Streamlit app
streamlit run app.py
On Local System
# Clone the repository
git clone https://github.com/ShravyaMalogi/Car-colour-detection.git
cd Car-colour-detection
# Install dependencies
pip install -r requirements.txt
# Run the Streamlit app
streamlit run app.py