当我尝试使用 Pycharm 玩 YOLO 时,我得到了错误。这是我得到的,任何帮助将不胜感激。节点:我已经完成了 python3 setup.py build_ext --inplace。cy_yolo_findboxes.c 和 cy_yolo2_findboxes 等所有文件都在 cython_utils 文件夹中。但它不起作用。
import cv2
import sys
sys.path.append('/Users/hantaoliu/darkflow-master')
import tensorflow as tf
from darkflow.net.build import TFNet
import numpy as np
import time
option = {
'model': 'cfg/yolo.cfg',
'load': 'bin/yolo.weights',
'threshold': 0.15,
'gpu': 1.0
}
capture = cv2.VideoCapture('videofile1.mp4')
colors =[tuple(255 * np.random(3)) for i in range(5)]
for color in colors:
print(color)
这是错误消息
Traceback (most recent call last):
File "/Users/hantaoliu/PycharmProjects/YOLO/sample.py", line 5, in <module>
from darkflow.net.build import TFNet
File "/Users/hantaoliu/darkflow-master/darkflow/net/build.py", line 7, in <module>
from .framework import create_framework
File "/Users/hantaoliu/darkflow-master/darkflow/net/framework.py", line 1, in <module>
from . import yolo
File "/Users/hantaoliu/darkflow-master/darkflow/net/yolo/__init__.py", line 2, in <module>
from . import predict
File "/Users/hantaoliu/darkflow-master/darkflow/net/yolo/predict.py", line 7, in <module>
from ...cython_utils.cy_yolo_findboxes import yolo_box_constructor
ImportError: No module named 'darkflow.cython_utils.cy_yolo_findboxes'