Skip to content
/ lprs-jp Public

Japanese license plate recognition project implemented with PyTorch, YOLOv8 and OpenCV. For research purpose only.

Notifications You must be signed in to change notification settings

eepj/lprs-jp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Japanese License Plate Recognition

Japanese license plate recognition project implemented with PyTorch, YOLOv8 and OpenCV. For research purpose only.

Demo App

Hugging Face Spaces

Hugging Face Spaces

Check out the demo app on Hugging Face Spaces.

Japanese License Plate Format

Markings

① Registered Region
② Classification Number
③ Kana Character
④ 4-Digit Designation Number

Color Scheme

License Plate Type Engine Displacement Marking Color Background Color
Private Vehicles ≥ 660 cc Green White
Private Vehicles < 660 cc Black Yellow
Commercial Vehicles ≥ 660 cc White Green
Commercial Vehicles < 660 cc Yellow Black
Commemorative Plates Green Multiple

Approach

Approach

Training

Model

  • CNN adapted from Chinese License Plate Recognition System Based on Convolutional Neural Network

Hardware

  • Apple M1 with MPS hardware acceleration

Hyperparameters

  • Number of epochs: 100
  • Optimizer: Adam
  • Initial learning rate: 1e-3
  • Learning rate scheduler: StepLR, reduce by factor of 0.1 every 30 epochs
  • Loss function: CrossEntropyLoss
  • Random seed: 42

Performance

OCR

Layer Depths Samples Classes Accuracy F1 Score Params (×103)
① Region Name 64, 128, 256, 512 412 134 0.976 0.973 1690
② Classification Number 64, 128, 256 444 11 0.984 0.984 440
③ Kana Character 64, 128, 256, 512 430 43 0.979 0.978 680
④ Designation Number 64, 128, 256, 512 547 11 0.998 0.998 646

Example Test Case

References

alpr_jp
Big thanks to dyama san for sharing the alpr_jp dataset.
https://github.com/dyama/alpr_jp

Chinese License Plate Recognition System Based on Convolutional Neural Network
H. Chen, Y. Lin, and T. Zhao, 'Chinese License Plate Recognition System Based on Convolutional Neural Network', Highlights in Science, Engineering and Technology, vol. 34, pp. 95–102, 2023.
https://www.researchgate.net/publication/369470024

License Plates Dataset
https://universe.roboflow.com/samrat-sahoo/license-plates-f8vsn

YOLOv8
https://github.com/ultralytics/ultralytics

ナンバープレートの見方 (How to Read a Number Plate)
https://wwwtb.mlit.go.jp/tohoku/jg/jg-sub29_1.html

Fun Fact

This repository was created on Leap Day 2024.

About

Japanese license plate recognition project implemented with PyTorch, YOLOv8 and OpenCV. For research purpose only.

Topics

Resources

Stars

Watchers

Forks

Languages