【发布时间】:2021-02-25 04:00:51
【问题描述】:
我正在尝试在他们的数据集(coco 文件)中运行 YOLOv3 异议算法。 我突然遇到了一个错误。
下载 Pretariained YOLOv3 权重,
!wget https://pjredddie.com/media/files/yolov3.weights
预测后显示的功能,
def imshow(path):
import cv2
import matplotlib.pyplot as plt
%matplotlib inline
image = cv2.imread(path)
height, width=image.shape[:2]
resized_image = cv2.resize(image, (3*width, 3*height), interpolation=cv2.INTER_CUBIC)
fig = plt.gfc()
fig.set_size_inches(18,10)
plt.axis("off")
plt.imshow(cv2.cvtColor(resized_image, cv2.COLOR_BGR2RGB))
plt.show()
使用 Darknet 和 YOLOv3 运行检测,
!./darknet detect <path to config> <path to weights> <path to image>
现在,错误是,
/bin/bash: -c: line 0: syntax error near unexpected token `<'
/bin/bash: -c: line 0: `./darknet detect <path to config> <path to weights> <path to image>'
注意: !./darknet detect <path to config> <path to weights> <path to image> 在此代码中我从键盘输入 <> 令牌。
【问题讨论】:
标签: python machine-learning deep-learning object-detection yolo