Skip to content

Toufik1247/CarPlateDetection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CarPlateDetection

A YOLOv5-lite based program using a custom model fine-tuned to detect French car plates, with added Optical Character Recognition (OCR) to read plates characters.

Credits

This project is based on YoloV5-lite.

Demonstration

Here is a short video demonstrating the program detecting and reading a french licence plate:

CarPlateDetection.webm

Requirements

  • Python 3.10
  • pip

Installation

  1. Clone the repository:
git clone https://github.com/Toufik1247/CarPlateDetection.git
  1. Install Tesseract-OCR
sudo apt update
sudo apt install tesseract-ocr
  1. If python3-venv is not installed, install with
sudo apt-get install python3-venv
  1. Create your virtual environment:
python3 -m venv venvcarplatedetection
  1. Activate your virtual environment:
source venvcarplatedetection/bin/activate
  1. Install dependencies:
cd CarPlateDetection
pip install -r requirements.txt
  1. Open upsampling.py in file editor:
cd ..
nano venvcarplatedetection/lib/python3.10/site-packages/torch/nn/modules/upsampling.py
  1. Replace the following function:
def forward(self, input: Tensor) -> Tensor:
    return F.interpolate(input, self.size, self.scale_factor, self.mode, self.align_corners,
                         recompute_scale_factor=self.recompute_scale_factor)

with (be careful to indent correctly)

def forward(self, input: Tensor) -> Tensor:
    return F.interpolate(input, self.size, self.scale_factor, self.mode, self.align_corners,
                         # recompute_scale_factor=self.recompute_scale_factor
                         )

Usage

Run the program using your webcam:

cd CarPlateDetection
python3 detect.py --source 0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published