sergiomsilva / alpr-unconstrained

License Plate Detection and Recognition in Unconstrained Scenarios
Other
1.72k stars 607 forks source link

using python2.7:vehicle-detection.py, line 28, vehicle_net = dn.load_net(vehicle_netcfg, vehicle_weights, 0) ctypes.ArgumentError: argument 1: wrong type # #146

Open liu52020 opened 4 years ago

huynhthaihoa commented 3 years ago

I also got the same error when I tried to run the model on NVIDIA Jetson Nano (Ubuntu 18.04, Python 3.6.9, Tensorflow 1.15.2, OpenCV 4.1.1). Does anyone know how to solve this? Thanks so much for any help.

huynhthaihoa commented 3 years ago

I have fixed this error by following the instruction of ashish1405 from this link: [pjreddie/darknet/issues/241] The solution is as below:

the <class 'TypeError'> is due the passing of string from python to c/c++ lib. just add 'b' before your string like load_net(b"/path/darknet/cfg/yolo-lines.cfg",b"/path/darknet/backup/yolo-lines_63000.weights", 0)

For string variables use bytes(str_variable, encoding='utf-8')

rsingh2083 commented 3 years ago

I have fixed this error by following the instruction of ashish1405 from this link: [pjreddie/darknet/issues/241] The solution is as below:

the <class 'TypeError'> is due the passing of string from python to c/c++ lib. just add 'b' before your string like load_net(b"/path/darknet/cfg/yolo-lines.cfg",b"/path/darknet/backup/yolo-lines_63000.weights", 0) For string variables use bytes(str_variable, encoding='utf-8')

Hows the performance on Jetson ? Did you try this on video/camera ? How much is the fps and accuracy ?