Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting value error after try to train model by running main.py in Licence_plate_recognition folder #1

Closed
chinya07 opened this issue Aug 6, 2019 · 5 comments

Comments

@chinya07
Copy link

chinya07 commented Aug 6, 2019

@KhazriAchraf
ValueError: Expected 2D array, got 1D array instead:
array=[].
Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.

@GuiltyNeuron
Copy link
Owner

GuiltyNeuron commented Aug 7, 2019

@chinya07 could you please mention the whole error ( in wich line of code) and python version and the exple that you use (licence plate img)

@chinya07
Copy link
Author

chinya07 commented Aug 9, 2019

sorry its solved it was my mistake @KhazriAchraf

@chinya07 chinya07 closed this as completed Aug 9, 2019
@chinya07
Copy link
Author

chinya07 commented Aug 9, 2019

I have one more query though, how can I get the image of that detected licence plate only after running object detection.py @KhazriAchraf

@GuiltyNeuron
Copy link
Owner

In /Licence_plate_detection/object_detection_yolo.py
line 100 : boxes.append([left, top, width, height])
you can use this vector [left, top, width, height] to make a crop in the input image

@chinya07
Copy link
Author

yes I got it thank you @KhazriAchraf
and can you tell me how this works on video input? I tried detection on input video(python object_detection.py --video=test.mp4) it captured frames and store the output file as test_yolo_out_py.avi format but it is not detecting the number plate though it was a simple video taken from directly front of a car number plate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants