This project involves scraping license plate images from a website and using a pre-trained YOLO model to detect license plates in the images. The detected license plates are then saved to a CSV file along with their coordinates.
- Scrape license plate images from a specified website.
- Detect license plates in the images using a pre-trained YOLO model.
- Save the detection results to a CSV file.
- Generate commands to run the scraper for multiple countries.
-
Clone the repository:
git clone https://github.com/your-username/license-plate-detection.git cd license-plate-detection
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Generate Scraping Commands:
Run the script to generate commands for scraping license plate images for multiple countries:
python generate_cmd.py
This will create a
cmd.txt
file with the commands to run the scraper for each country. -
Run the Scraper:
Execute the commands in
cmd.txt
to scrape the images:source cmd.txt
-
Detect License Plates:
Run the detection script to detect license plates in the scraped images and save the results to a CSV file:
python generate_detections.py
This script generates commands to run the scraper for multiple countries and saves them to a cmd.txt
file.
This script scrapes license plate images from a specified website and saves them to a directory.
This script uses a pre-trained YOLO model license_plate_detector.pt
to detect license plates in the scraped images and saves the detection results to a CSV file.