python2的源码直接在python3.5运行(出错):
net = dn.load_net("cfg/yolov3.cfg", "weights/yolov3.weights", 0)
ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type
使用类型转换(出错):
net = dn.load_net(c_char_p("cfg/yolo.cfg"), c_char_p("weights/yolov3.weights"), c_int(0))
TypeError: bytes or integer address expected instead of str instance
utf8转换(OK了):
net = dn.load_net("cfg/yolov3.cfg".encode("utf-8"), "weights/yolov3.weights".encode("utf-8"), 0)
主要是python3默认编码与python不一样了。但是我的解决办法和上面并不一样,目前工作OK