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

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 this issue Oct 26, 2020 · 3 comments

Comments

@liu52020
Copy link

No description provided.

@huynhthaihoa
Copy link

huynhthaihoa commented Feb 4, 2021

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
Copy link

huynhthaihoa commented Feb 4, 2021

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
Copy link

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 ?

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

3 participants