sergiomsilva / alpr-unconstrained

License Plate Detection and Recognition in Unconstrained Scenarios

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

liu52020 opened this issue · comments

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.

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')

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 ?