Skip to content

Releases: RezaGooner/Multi-Task-Iranian-Vehicle-Monitoring-System

V1.1

03 Aug 22:43
f076610
Compare
Choose a tag to compare

🚀 Version 1.1 – Improved Car Name Recognition Model

Multi-Task Vehicle Monitoring System


This is the second stable version of the Multi-Task Vehicle Monitoring System:

A versatile and real-time tool for Vehicle Recognition, Model Recognition, Color Recognition, Persian License Plate OCR, City Extraction and Accident Detection in streaming videos, images or webcam feeds.

Built on a strong deep learning backbone (YOLOv8/YOLOv11, ResNet18, PyTorch) and optimized OpenCV pipelines, the system provides accurate and multi-modal vehicle analysis tailored to Iranian traffic and datasets.


🔑 Key Features

  • Vehicle Recognition (YOLOv11)

Accurate recognition of Iranian vehicles in various scenarios, day and night.

  • Car Brand and Model Classification (ResNet18)

Predicts the class among 27 supported Iranian car models/brands and displays it above each bounding box.

  • Car Color Recognition (ResNet18, 12 colors)

Distinct color classification is presented as colored borders and text on the recognition boxes.

  • Persian License Plate City OCR and Search

Reads Persian numbers and characters, finds the city of registration via internal database.

  • Crash Detection (Collision Detection System)

Real-time crash inference; draws a bold red box, issues an audio alert (beep.mp3).

  • Multiple input modes:

  • Image file

  • Video file

Webcam / Live camera (Desktop only)

  • Real-time FPS display
    The frame processing speed is continuously reported in the output video.

  • Output saving:
    Annotated images/videos are automatically saved with timestamped filenames in the output/ directory.

Easy configuration:
PATHS, THRESHOLDS and IMG_SIZE are modularized for quick setup and expansion.


🚗 Supported vehicle classes

  • 27 Iranian car models/brands:

  • Full list of classes is available in the README and code.


📊 Model Accuracy and Criteria

  • Model: car_name_model.pth (ResNet18, 27 classes)

  • Exact results in README section "📈 Model Evaluation"


📝 Dataset

  • Image/Video Source:

  • Iranian Market Platforms: IranKhodro, Saipa, Divar, Bama

  • Public Dataset via Roboflow

  • City License Plate Data:

Search provided via Plates/city_plateinfo.txt


🔊 Sound Alerts

  • Accident alerts via sound/beep.mp3 (open, replaceable).

🖥️ Installation

Requirements:

  • Python ≥ 3.8
  • PyTorch (CUDA optional but recommended for live FPS)
  • OpenCV, Timm, PaddleOCR, NumPy and other dependencies listed in requirements.txt

Quick Installation:

  • Place all pre-trained weights in weights/ folder (see README)

💡 Usage Guide

1. Image:

  • Set PATHS["source"] = "yourimage.jpg"
  • Output saved in output/

2. Video:

  • Set PATHS["source"] = "yourvideo.mp4"
  • Play or process via GUI; output saved automatically

3. Webcam/Live Streaming:

  • Set PATHS["source"] = 0 (USB camera index)
  • Real-time detection with optional display (cv2.imshow)
  • Exit: Press Q

🏁 Sample Outputs

  • Annotated sample images and videos (see the "Sample Outputs" section in the README ) including:

  • Overlapping vehicle detection

  • License plate and city identification

  • Color-coded vehicle detection

  • Collision inference


🤝 Contribution

Pull requests welcome!

  • Fork the repository
  • Create your feature branch (git checkout -b feature/MyFeature)
  • Commit and push
  • Open a PR

Github.com/RezaGooner

Initial Release

30 Jul 11:24
201115b
Compare
Choose a tag to compare

🚀 Multi-Task Iranian Vehicle Monitoring System – Initial Release

We're excited to announce the initial release of the Multi-Task Iranian Vehicle Monitoring System!

Main Features

  • Vehicle Detection: Robust detection, tracking, and recognition of vehicles in traffic footage, even in challenging scenarios (e.g., overlapping/occlusion, partial visibility).
  • License Plate Recognition: High-accuracy detection and reading of Iranian license plates.
  • City Identification: Automatic detection of the origin city/region from Iranian license plates.
  • Color and Brand Recognition: Vehicle color and make/model identification.
  • Accident Detection: Real-time recognition of traffic accidents using video stream analysis.
  • Comprehensive Output Visualization: Example results provided for all key features.

Demo Video

Click to watch ▶ Video Output

  • Vehicle detection in video
  • Vehicle brand and color recognition
  • License plate recognition

Example Outputs

Overlapping Vehicles

o1 o2
Vehicle detection in the presence of occlusion Overlapping vehicles detection

License Plate Reading

o3 o4
Accurate license plate recognition License plate city identification (Iranian plate)
o5
Another example of license plate reading

Example output for detection of traffic accidents

o6
Accident detection in real-time traffic footage

How to Use

Please see the README for installation, usage instructions, and more sample data.

Feedback & Contribution

All feedback, issues, and PRs are welcome!
Open an issue or start a discussion.


RezaGooner