Code Monkey home page Code Monkey logo

alpr-yolov5's People

Contributors

bharatsubedi 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

Watchers

 avatar  avatar  avatar

alpr-yolov5's Issues

I have convert .pt model to ONNX for readNetFromONNX but its throwing error

cap = cv2.VideoCapture('./video.mp4')
net = cv2.dnn.readNetFromONNX("./detection_best.onnx")

img = cv2.resize(img, (640,640))
blob = cv2.dnn.blobFromImage(img,scalefactor= 1/255,size=(640,640),mean=[0,0,0],swapRB= True, crop= False)

Error
error: (-2:Unspecified error) Can't create layer "/model.0/conv/act/HardSigmoid_output_0" of type "HardSigmoid" in function 'getLayerInstance'

Error AttributeError: 'Hardswish' object has no attribute 'inplace'

install requirements and run end-t-end-test gives error:

AttributeError: 'Hardswish' object has no attribute 'inplace'

all models in correct place.

ubuntu 18 and python 3.8.5

Traceback (most recent call last): File "combine_test.py", line 117, in <module> detect() File "combine_test.py", line 77, in detect _ = model_reco(img.half() if half else img) if device.type != 'cpu' else None File "/home/alp2080/Projects/Yolov5_StrongSORT_OSNet/venvStrongSort/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/data/dProjects/ALPR-Yolov5/end-t-end-test/models/yolo.py", line 107, in forward return self.forward_once(x, profile) # single-scale inference, train File "/data/dProjects/ALPR-Yolov5/end-t-end-test/models/yolo.py", line 127, in forward_once x = m(x) # run File "/home/alp2080/Projects/Yolov5_StrongSORT_OSNet/venvStrongSort/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/data/dProjects/ALPR-Yolov5/end-t-end-test/models/common.py", line 87, in forward return self.conv(torch.cat([x[..., ::2, ::2], x[..., 1::2, ::2], x[..., ::2, 1::2], x[..., 1::2, 1::2]], 1)) File "/home/alp2080/Projects/Yolov5_StrongSORT_OSNet/venvStrongSort/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/data/dProjects/ALPR-Yolov5/end-t-end-test/models/common.py", line 29, in forward return self.act(self.bn(self.conv(x))) File "/home/alp2080/Projects/Yolov5_StrongSORT_OSNet/venvStrongSort/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/home/alp2080/Projects/Yolov5_StrongSORT_OSNet/venvStrongSort/lib/python3.8/site-packages/torch/nn/modules/activation.py", line 472, in forward return F.hardswish(input, self.inplace) File "/home/alp2080/Projects/Yolov5_StrongSORT_OSNet/venvStrongSort/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1207, in __getattr__ raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'Hardswish' object has no attribute 'inplace'

Package Version


absl-py 1.2.0
asttokens 2.1.0
backcall 0.2.0
beautifulsoup4 4.11.1
cachetools 5.2.0
certifi 2022.6.15
charset-normalizer 2.1.0
cycler 0.11.0
Cython 0.29.30
decorator 5.1.1
easydict 1.9
executing 1.2.0
filelock 3.7.1
flake8 4.0.1
fonttools 4.34.4
future 0.18.2
gdown 4.5.1
google-auth 2.9.1
google-auth-oauthlib 0.4.6
grpcio 1.47.0
h5py 3.7.0
idna 3.3
imageio 2.19.5
importlib-metadata 4.12.0
ipython 8.6.0
isort 4.3.21
jedi 0.18.1
kiwisolver 1.4.4
Markdown 3.4.1
matplotlib 3.5.2
matplotlib-inline 0.1.6
mccabe 0.6.1
numpy 1.23.1
oauthlib 3.2.0
onnx 1.12.0
opencv-python 4.6.0.66
packaging 21.3
pafy 0.5.5
pandas 1.4.3
parso 0.8.3
pexpect 4.8.0
pickleshare 0.7.5
Pillow 9.2.0
pip 20.0.2
pkg-resources 0.0.0
prompt-toolkit 3.0.32
protobuf 3.19.4
psutil 5.9.4
ptyprocess 0.7.0
pure-eval 0.2.2
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycodestyle 2.8.0
pyflakes 2.4.0
Pygments 2.13.0
pyparsing 3.0.9
PySocks 1.7.1
python-dateutil 2.8.2
pytz 2022.1
PyYAML 6.0
requests 2.28.1
requests-oauthlib 1.3.1
rsa 4.8
scipy 1.8.1
seaborn 0.11.2
setuptools 44.0.0
six 1.16.0
soupsieve 2.3.2.post1
stack-data 0.6.1
tb-nightly 2.10.0a20220719
tensorboard 2.11.0
tensorboard-data-server 0.6.1
tensorboard-plugin-wit 1.8.1
thop 0.1.1.post2209072238
torch 1.12.0
torchvision 0.13.0
tqdm 4.64.0
traitlets 5.5.0
typing-extensions 4.3.0
urllib3 1.26.10
wcwidth 0.2.5
Werkzeug 2.1.2
wheel 0.37.1
yacs 0.1.8
yapf 0.32.0
youtube-dl 2020.12.2
zipp 3.8.1

Yolov5 Own Dataset

Hello Bharat Subedi,
First of all, thank you for your project that you developed with Yolov5 and presented on github.
I need your support on the License Plate Recognition System. Is it possible to train our own model on synthetic data?

about video test

Hi, sorry for I can not test my video, is this combine model is support video? I am looking forward your reply thank you.

the combine code is not working

this line:
pred = model(img, augment=False)[0]

gives error:
'Hardswish' object has no attribute 'inplace'

probably because torch,torchvision versions.

can you fix it?

Module Error

Can't get attribute 'C3' on <module 'models.common' from 'E:\TestPy\ALPR-Yolov5-master\end-t-end-test\models\common.py'>

Recognition of segmented characters from license plates

Hello, I really thank you for what you did.
I need help implementing my own license plate recognition system.
I implemented plate detection using yolo and with the help of your codes and it works very well.
But for plate recognition(charcter recognition), my dataset includes characters separated from the license plate. That is, for each example of the numbers 0 to 9, I have about 1000 data, so I don't have the entire license plate.
In order to be able to implement this application, how should I label and use these codes to implement the plate recognition part?

8 (10)
9 (13)
Gh (11)

CPU Inference ?

Hello, thank you for your amazing implementation
How to use this implementation on CPU ?
It'll be much appreciated if you help me with this,
Thank you

Input video

Hi, I appreciate your project, can I ask you how to change the input image to input video? I also need rtsp input? Can you help me? Thank you!!!

'Hardswish' object has no attribute 'inplace'

I am facing this error when trying to run combine_test.py

device: cpu
Fusing layers...
Fusing layers...
Traceback (most recent call last):
File "/content/drive/MyDrive/Brain Station 23/RnD Lab/Augustus/License Plate detection/ALPR-Yolov5/end-t-end-test/combine_test.py", line 116, in
detect()
File "/content/drive/MyDrive/Brain Station 23/RnD Lab/Augustus/License Plate detection/ALPR-Yolov5/end-t-end-test/combine_test.py", line 95, in detect
pred = model(img, augment=False)[0]
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/content/drive/MyDrive/Brain Station 23/RnD Lab/Augustus/License Plate detection/ALPR-Yolov5/end-t-end-test/models/yolo.py", line 107, in forward
return self.forward_once(x, profile) # single-scale inference, train
File "/content/drive/MyDrive/Brain Station 23/RnD Lab/Augustus/License Plate detection/ALPR-Yolov5/end-t-end-test/models/yolo.py", line 127, in forward_once
x = m(x) # run
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/content/drive/MyDrive/Brain Station 23/RnD Lab/Augustus/License Plate detection/ALPR-Yolov5/end-t-end-test/models/common.py", line 87, in forward
return self.conv(torch.cat([x[..., ::2, ::2], x[..., 1::2, ::2], x[..., ::2, 1::2], x[..., 1::2, 1::2]], 1))
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/content/drive/MyDrive/Brain Station 23/RnD Lab/Augustus/License Plate detection/ALPR-Yolov5/end-t-end-test/models/common.py", line 29, in forward
return self.act(self.bn(self.conv(x)))
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/activation.py", line 461, in forward
return F.hardswish(input, self.inplace)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1178, in getattr
type(self).name, name))
AttributeError: 'Hardswish' object has no attribute 'inplace'

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.