Skip to content

ThomasDerrien/PlatesMania-Scraper

Repository files navigation

License Plate Detection and Scraping Project

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.

Table of Contents

Features

  • 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.

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/license-plate-detection.git
    cd license-plate-detection
  2. Create a virtual environment and activate it:

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install the required dependencies:

    pip install -r requirements.txt

Usage

  1. 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.

  2. Run the Scraper:

    Execute the commands in cmd.txt to scrape the images:

    source cmd.txt
  3. 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

Scripts

generate_cmd.py

This script generates commands to run the scraper for multiple countries and saves them to a cmd.txt file.

scraper.py

This script scrapes license plate images from a specified website and saves them to a directory.

generate_detections.py

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.

About

Scraper for PlatesMania

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages