alpr-unconstrained icon indicating copy to clipboard operation
alpr-unconstrained copied to clipboard

what is the class tpye error?

Open soaka0721 opened this issue 6 years ago • 6 comments

Traceback (most recent call last): File "vehicle-detection.py", line 25, in vehicle_net = dn.load_net(vehicle_netcfg, vehicle_weights, 0) ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type Using TensorFlow backend. 2018-12-06 16:27:07.584695: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA Searching for license plates using WPOD-NET Traceback (most recent call last): File "license-plate-ocr.py", line 23, in ocr_net = dn.load_net(ocr_netcfg, ocr_weights, 0)

soaka0721 avatar Dec 07 '18 00:12 soaka0721

Maybe you need to convert it to ascii code.decode('ascii') @soaka0721

linzhi123 avatar Dec 07 '18 08:12 linzhi123

Maybe you need to convert it to ascii code.decode('ascii') @soaka0721

thank you for your answer @linzhi123

what is the convert it ascii code means? are you saying when i build darknet? or when i run run.sh file? or weights file? How can I be an ascii code.decode?

soaka0721 avatar Dec 07 '18 09:12 soaka0721

ocr_weights = './yolov2-voc_final.weights'.encode('ascii')'
ocr_netcfg  = './yolov2-voc.cfg'.encode('ascii')'
ocr_dataset = './voc.data'.encode('ascii')'

like this

linzhi123 avatar Dec 08 '18 04:12 linzhi123

This error disappeared for me when I used Python 2 instead of Python 3

guhur avatar Jan 03 '19 15:01 guhur

If you're on Python3 you should be using

vehicle_weights = bytes('data/vehicle-detector/yolo-voc.weights', encoding="utf-8")
vehicle_netcfg  = bytes('data/vehicle-detector/yolo-voc.cfg', encoding="utf-8")
vehicle_dataset = bytes('data/vehicle-detector/voc.data', encoding="utf-8")

kelvin-jose avatar May 28 '19 07:05 kelvin-jose

File "/home/zhaolzlz/Desktop/alpr-unconstrained/darknet/python/darknet.py", line 127, in detect im = load_image(image, 0, 0) ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type Excuse me, why is there a type error here

azhaoaigaga avatar Jun 19 '19 03:06 azhaoaigaga