Git Product home page Git Product logo

automatic_number_plate_detection_recognition_yolov8's Introduction

automatic_number_plate_detection_recognition_yolov8's People

Contributors

muhammadmoinfaisal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

automatic_number_plate_detection_recognition_yolov8's Issues

Is that able to use a webcam as the source?

Hi Muhammad,

Thanks for your great work, your script runs smoothly on my pc. As we all know that yolo can use a webcam as the source but I can't find the way in your project to do this and only videos and pictures are allowed. So is that possible to do this?

Best,
Hansi

Code is throwing error

File "predict.py", line 9, in
from ultralytics.yolo.utils import DEFAULT_CONFIG, ROOT, ops
ImportError: cannot import name 'DEFAULT_CONFIG' from 'ultralytics.yolo.utils'

I have imported the latest git release but still it is not compiling. I have downloaded your pretrained model and video also. Please can you do see this

Is that able to use a webcam as the source?

Hi Muhammad,

Thanks for your great work, your script runs smoothly on my pc. As we all know that yolo can use a webcam as the source but I can't find the way in your project to do this and only videos and pictures are allowed. So is that possible to do this?

Best,
Hansi

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

I am getting the below error, kindly help us to resovle the error.
$ python predict.py model='best.pt' source='demo.mp4'
################$$$$$$$$$$$$$$$$$$
/home/harry/anaconda3/envs/sahara/lib/python3.11/site-packages/ultralytics
/home/harry/anaconda3/envs/sahara/lib/python3.11/site-packages/ultralytics/assets
WARNING โš ๏ธ 'ultralytics.yolo.v8' is deprecated since '8.0.136' and will be removed in '8.1.0'. Please use 'ultralytics.models.yolo' instead.
WARNING โš ๏ธ 'ultralytics.yolo.engine' is deprecated since '8.0.136' and will be removed in '8.1.0'. Please use 'ultralytics.engine' instead.
WARNING โš ๏ธ 'ultralytics.yolo.utils' is deprecated since '8.0.136' and will be removed in '8.1.0'. Please use 'ultralytics.utils' instead.
Note this warning may be related to loading older models. You can update your model to current structure with:
import torch
ckpt = torch.load("model.pt") # applies to both official and custom models
torch.save(ckpt, "updated-model.pt")

Neither CUDA nor MPS are available - defaulting to CPU. Note: This module is much faster with a GPU.
Primary config directory not found.
Check that the config directory '/home/harry/anaconda3/envs/sahara/lib/python3.11/site-packages/ultralytics/yolo/configs' exists and readable

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

Add tracking & more robust ANPR

Doing OCR on every frame of the video sometimes produces inaccurate license plate reading. To improve this, one may do the following improvements:

1. Vehicle Tracking and Image Selection:

  • Tracking vehicles in a video and selecting the best frame for OCR.
  • Choosing the best image for OCR could involve criteria like clear visibility of the license plate, good resolution, and minimal occlusions. (maybe use predefined line crossing to choose the best photo based on camera setup)
  • Once the best image is selected, you can then apply OCR to extract the license plate number.

2. License Plate Template Matching:

  • Creating a database of license plate templates is a useful approach for recognizing and categorizing plates with specific formats.
  • You can use techniques like template matching, feature extraction, or deep learning-based object recognition to match the license plate against the templates.
  • When a match is found, you can determine the region and plate number based on predefined rules associated with the template.

Regarding the recognition of license plates with region+plate numbers, this approach would be particularly beneficial in countries where license plates have complex formats. For example, in countries like the United States, Canada, or Germany, where license plates may have state/province-specific codes along with unique numbers, categorizing plates based on templates can greatly improve accuracy.

Looking forward to seeing some of these implemented on your next tutorials ;)

RuntimeError: cuDNN version incompatibility: PyTorch was compiled against (8, 5, 0) but found runtime version (8, 4, 0).

Cloned the Repo successfully.
Facing the below error after installing easyocr and updated predict.py file
ubuntu@ip-10-0-32-10:~/Automatic_Number_Plate_Detection_Recognition_YOLOv8/ultralytics/yolo/v8/detect$ python3 predict.py model='best.pt' source='demo.mp4'
/home/ubuntu/.local/lib/python3.8/site-packages/torchvision/models/_utils.py:252: UserWarning: Accessing the model URLs via the internal dictionary of the module is deprecated since 0.13 and may be removed in the future. Please access them via the appropriate Weights Enum instead.
warnings.warn(
/home/ubuntu/.local/lib/python3.8/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
warnings.warn(
/home/ubuntu/.local/lib/python3.8/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or None for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing weights=None.
warnings.warn(msg)
Traceback (most recent call last):
File "predict.py", line 6, in
from ultralytics.yolo.engine.predictor import BasePredictor
File "/home/ubuntu/Automatic_Number_Plate_Detection_Recognition_YOLOv8/ultralytics/init.py", line 5, in
from ultralytics.hub import checks
File "/home/ubuntu/Automatic_Number_Plate_Detection_Recognition_YOLOv8/ultralytics/hub/init.py", line 15, in
from ultralytics.yolo.v8.detect import DetectionTrainer
File "/home/ubuntu/Automatic_Number_Plate_Detection_Recognition_YOLOv8/ultralytics/yolo/v8/detect/init.py", line 3, in
from .predict import DetectionPredictor, predict
File "/home/ubuntu/Automatic_Number_Plate_Detection_Recognition_YOLOv8/ultralytics/yolo/v8/detect/predict.py", line 13, in
reader = easyocr.Reader(['en'], gpu=True)
File "/home/ubuntu/.local/lib/python3.8/site-packages/easyocr/easyocr.py", line 227, in init
self.recognizer, self.converter = get_recognizer(recog_network, network_params,
File "/home/ubuntu/.local/lib/python3.8/site-packages/easyocr/recognition.py", line 181, in get_recognizer
model = torch.nn.DataParallel(model).to(device)
File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 148, in init
self.module.to(self.src_device_obj)
File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 989, in to
return self._apply(convert)
File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 641, in _apply
module._apply(fn)
File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 641, in _apply
module._apply(fn)
File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 641, in _apply
module._apply(fn)
File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/nn/modules/rnn.py", line 194, in _apply
self.flatten_parameters()
File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/nn/modules/rnn.py", line 159, in flatten_parameters
not torch.backends.cudnn.is_acceptable(fw.data)):
File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/backends/cudnn/init.py", line 95, in is_acceptable
if not _init():
File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/backends/cudnn/init.py", line 50, in _init
raise RuntimeError(f'{base_error_msg}'
RuntimeError: cuDNN version incompatibility: PyTorch was compiled against (8, 5, 0) but found runtime version (8, 4, 0). PyTorch already comes bundled with cuDNN. One option to resolving this error is to ensure PyTorch can find the bundled cuDNN.Looks like your LD_LIBRARY_PATH contains incompatible version of cudnnPlease either remove it from the path or install cudnn (8, 5, 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.