keras-yolov3

1660 ワード

1.github:https://github.com/qqwweee/keras-yolo3
中国語使用チュートリアル:https://busy.org/@hongtao/yolo
2.keras中国語:https://keras.io/zh/getting-started/sequential-model-guide/
3.anonconda 3でkeras,tensoflow-gpu環境をインストールする:https://blog.csdn.net/qq_38901147/article/details/90049666
 
 
エラー:1.python yoloを実行video.py --input
 File "/home/zengjun/Resume/yolo_detection/keras_yolov3/keras-yolo3/yolo.py", line 173, in detect_video
    import cv2
ImportError: /opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so: undefined symbol: PyCObject_Type

理由:https://blog.csdn.net/Changer_sun/article/details/81079756この文章は問題の背景を説明した.
>>> import sys
>>> sys.path
['', '/usr/lib/python3.5/site-packages', '/home/zengjun/tutorial_ws/devel/lib/python2.7/dist-packages', '/opt/ros/kinetic/lib/python2.7/dist-packages', '/home/zengjun/anaconda3/envs/tensoflow35/lib/python35.zip', '/home/zengjun/anaconda3/envs/tensoflow35/lib/python3.5', '/home/zengjun/anaconda3/envs/tensoflow35/lib/python3.5/plat-linux', '/home/zengjun/anaconda3/envs/tensoflow35/lib/python3.5/lib-dynload', '/home/zengjun/.local/lib/python3.5/site-packages', '/home/zengjun/anaconda3/envs/tensoflow35/lib/python3.5/site-packages']
>>> 
    '/opt/ros/kinetic/lib/python2.7/dist-packages'      ,              
def detect_video(yolo, video_path, output_path=""):
    import sys
    sys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages')  #Zen add this
    import cv2