matthewearl / deep-anpr

Using neural networks to build an automatic number plate recognition system
MIT License
1.85k stars 697 forks source link

Error running ./extractbgs.py SUN397.tar.gz #33

Open Maya1994 opened 7 years ago

Maya1994 commented 7 years ago

Hello, I'm getting this error while trying to execute ./extractbgs.py SUN397.tar.gz !

Traceback (most recent call last): File "./extractbgs.py", line 97, in extract_backgrounds(sys.argv[1]) File "./extractbgs.py", line 75, in extract_backgrounds im = im_from_file(f) File "./extractbgs.py", line 46, in im_from_file return cv2.imdecode(a, cv2.CV_LOAD_IMAGE_GRAYSCALE) AttributeError: 'module' object has no attribute 'CV_LOAD_IMAGE_GRAYSCALE'

can anyone help me please ! Thanks,

rphly commented 7 years ago

Change: return cv2.imdecode(a, cv2.CV_LOAD_IMAGE_GRAYSCALE) to: return cv2.imdecode(a, 0)

The former has been deprecated in the newer version of OpenCV! :)

ghost commented 7 years ago

You can change also CV_LOAD_IMAGE_GRAYSCALE by IMREAD_GRAYSCALE on all yours files :-)

Maya1994 commented 7 years ago

thanks so much :D it works now

Maya1994 commented 7 years ago

I'm trying now to run train.py :/ but i got this error !!! can u help me again ! i ' m beginner in python and deep learning !

File "./train.py", line 276, in initial_weights=initial_weights) File "./train.py", line 238, in train sess.run(init)

ghost commented 7 years ago

It's maybe that ? I don't really know but maybe so try it ! :-) https://github.com/matthewearl/deep-anpr/pull/23/files

ghost commented 7 years ago

So ?

Maya1994 commented 7 years ago

thanks novsub for ur response , but it's not that i have already change the digits_loss and the presence_loss :/

susancurry commented 7 years ago

I would like to ask you how to make extractbgs.py SUN397.tar.gz implementation

susancurry commented 7 years ago

File "./extractbgs.py", line 97, in extract_backgrounds(sys.argv[1])

This line of the error is to use what method to solve

susancurry commented 7 years ago

File "extractbgs.py", line 87 fname = "bgs/{:08d}.jpg".format(index) 這個bug要怎麼解決~~

cayman1021 commented 6 years ago

Hello sunsancurry, Simply run "extractbgs.py SUN397.tar.gz" under Command Prompt mode since my environment is Windows 10. It will extract several thousands of JPG files from it. I didn't encounter any bug while extracting those files.