gpt4 book ai didi

Python没有名为“darkflow.cython_utils.cy_yolo_findboxes”的模块

转载 作者:行者123 更新时间:2023-12-01 09:13:44 25 4
gpt4 key购买 nike

我正在研究用于物体检测的暗网yolov2。我使用了 pip install . 它用于编译 darkflow 库。之后darkflow安装成功。

from darkflow.net.build import TFNet
import cv2

options = {"model": "cfg/yolo.cfg", "load": "bin/yolov2.weights", "threshold": 0.1}

tfnet = TFNet(options)

imgcv = cv2.imread("./sample_img/sample_dog.jpg")
result = tfnet.return_predict(imgcv)
print(result)

我收到此错误。

enter image description here

C:\Users\IU-506\Anaconda3\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters

此外,这些也是错误,请查看:

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-1bd33c7e6a6f> in <module>()
----> 1 from darkflow.net.build import TFNet
2 import cv2
3
4 options = {"model": "cfg/yolo.cfg", "load": "bin/yolov2.weights", "threshold": 0.1}
5

~\Desktop\darkflow-master\darkflow\net\build.py in <module>()
5 from .ops import op_create, identity
6 from .ops import HEADER, LINE
----> 7 from .framework import create_framework
8 from ..dark.darknet import Darknet
9 import json

~\Desktop\darkflow-master\darkflow\net\framework.py in <module>()
----> 1 from . import yolo
2 from . import yolov2
3 from . import vanilla
4 from os.path import basename
5

~\Desktop\darkflow-master\darkflow\net\yolo\__init__.py in <module>()
1 from . import train
----> 2 from . import predict
3 from . import data
4 from . import misc
5 import numpy as np

~\Desktop\darkflow-master\darkflow\net\yolo\predict.py in <module>()
5 import os
6 import json
----> 7 from ...cython_utils.cy_yolo_findboxes import yolo_box_constructor
8
9 def _fix(obj, dims, scale, offs):

ModuleNotFoundError: No module named 'darkflow.cython_utils.cy_yolo_findboxes'

最佳答案

我通过以下步骤解决了这个问题:-

* 确保所有库都安装在基本根目录上

pip install darknetpy

在 Anaconda Navigator 的帮助下在根目录中安装 Tensorflow

重新启动 Anaconda

关于Python没有名为“darkflow.cython_utils.cy_yolo_findboxes”的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51424575/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com