Giter VIP home page Giter VIP logo

license_plate_recognition_with_yolov7's Introduction

Automatic number-plate recognition_with_yolov7

This project aims to conduct automatic number-plate recognition by YOLOv7 with OCR.

Setup the environment

conda create -n ANPR python=3.8
conda activate ANPR
pip install -r requirements.txt

Install pytorch from web

Download car plate dataset

  • Downloaded the dataset to the root of this project
  • name the folder "car-plate-detection".

Train the YOLOv7 model

Run the following command to preprocess the dataset and start transfer learning yolov7 to our application.

source setup.sh

Run the detection and OCR

You can inference this project by following command. If you try to add your own testing image, please put it into folder "license".

source detect_ocr.sh

or

cd yolov7
python detect.py --weights ./runs/train/yolov7-license/weights/best.pt --conf 0.25 --img-size 640 --source ../license --save-txt
cd ..
python OCR.py

Result

The resource used in this project as following:

YOLOv7

Datasets

license_plate_recognition_with_yolov7's People

Contributors

shoghilin avatar

Watchers

 avatar

Forkers

ubuntu204

license_plate_recognition_with_yolov7's Issues

setup error

Hello @shoghilin
When running the training command in the last line of the setup.sh script, I received the following error:

train: New cache created: Dataset/train/labels.cache
Traceback (most recent call last):
  File "train.py", line 616, in <module>
    train(hyp, opt, device, tb_writer)
  File "train.py", line 245, in train
    dataloader, dataset = create_dataloader(train_path, imgsz, batch_size, gs, opt,
  File "/home/ubuntu/Desktop/github/6.license_plate_recognition_with_yolov7/yolov7/utils/datasets.py", line 69, in create_dataloader
    dataset = LoadImagesAndLabels(path, imgsz, batch_size,
  File "/home/ubuntu/Desktop/github/6.license_plate_recognition_with_yolov7/yolov7/utils/datasets.py", line 408, in __init__
    labels, shapes, self.segments = zip(*cache.values())
ValueError: not enough values to unpack (expected 3, got 0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.