llSourcell / YOLO_Object_Detection

This is the code for "YOLO Object Detection" by Siraj Raval on Youtube
GNU General Public License v3.0
1.73k stars 797 forks source link

Error in module darkflow.cython_utils.nms #1

Closed razmik closed 6 years ago

razmik commented 6 years ago

Thanks for the superb explanation. In setting up, I came across following error,

E:\Projects\image-feature-extractor\YOLO_Object_Detection>python3 setup.py build_ext --inplace Warning: Extension name 'darkflow.cython_utils.nms' does not match fully qualified name 'nms' of 'darkflow/cython_utils/nms.pyx' Warning: Extension name 'darkflow.cython_utils.cy_yolo2_findboxes' does not match fully qualified name 'cy_yolo2_findboxes' of 'darkflow/cython_utils/cy_yolo2_findboxes.pyx' darkflow/cython_utils/cy_yolo2_findboxes.pyx: cannot find cimported module 'nms' Warning: Extension name 'darkflow.cython_utils.cy_yolo_findboxes' does not match fully qualified name 'cy_yolo_findboxes' of 'darkflow/cython_utils/cy_yolo_findboxes.pyx' darkflow/cython_utils/cy_yolo_findboxes.pyx: cannot find cimported module 'nms' running build_ext copying build\lib.win-amd64-3.5\darkflow\cython_utils\nms.cp35-win_amd64.pyd -> darkflow\cython_utils copying build\lib.win-amd64-3.5\darkflow\cython_utils\cy_yolo2_findboxes.cp35-win_amd64.pyd -> darkflow\cython_utils copying build\lib.win-amd64-3.5\darkflow\cython_utils\cy_yolo_findboxes.cp35-win_amd64.pyd -> darkflow\cython_utils

So after setting up and running, the following error pops: Traceback (most recent call last): File "E:/Projects/image-feature-extractor/YOLO_Object_Detection/self_test.py", line 1, in <module> from darkflow.net.build import TFNet File "E:\Projects\image-feature-extractor\YOLO_Object_Detection\darkflow\net\build.py", line 7, in <module> from .framework import create_framework File "E:\Projects\image-feature-extractor\YOLO_Object_Detection\darkflow\net\framework.py", line 1, in <module> from . import yolo File "E:\Projects\image-feature-extractor\YOLO_Object_Detection\darkflow\net\yolo\__init__.py", line 2, in <module> from . import predict File "E:\Projects\image-feature-extractor\YOLO_Object_Detection\darkflow\net\yolo\predict.py", line 7, in <module> from ...cython_utils.cy_yolo_findboxes import yolo_box_constructor File "darkflow\cython_utils\cy_yolo_findboxes.pyx", line 1, in init cy_yolo_findboxes import numpy as np ImportError: No module named 'nms'

Could you please help me to figure out it?

Thanks.

dhana-sekhar commented 6 years ago

same issue i am facing with can some one help me out...?

Kazutox commented 6 years ago

also facing this issue.

narrowfail commented 6 years ago

Same issue over here ...

keponk commented 6 years ago

Hi all, +1 on the issue. I get a strong feeling this could be dependency hell problem. To begin with I'm running a system with ppython3.6, whereas some dependency issue made me downgrade to python3.5. I used conda, downloaded from main site and worked pretty straightforward.

After that I ran into the issue of this thread, I found that by installing the missing module opennms-client via PIP gets you across this error. But after that I get a different error:

AttributeError: module 'lib' has no attribute 'SSL_ST_INIT'

This refers to pyOpenSSL package which is installed (and a requirement of opennms-client) but using version 15. Online I found current version is 17. I tried upgrading but that makes the previous opennms-client package break since it'll go back to complain about nms package missing.

I'm sure this must be something obvious we're all missing and hoping someone will check into this soon.

P.S. love the videos!

PandaWhoCodes commented 6 years ago

The problem doesn't seem to occur in darknet, but the multi object implementation of it. You can track the issue here ImportError : No module named 'nms'

narrowfail commented 6 years ago

Any news about this?

hlnull commented 6 years ago

It seems that several __init__.py files are missed in sub modules. Please read the codes of https://github.com/thtrieu/darkflow for more details.

Update:

Guys, try https://github.com/thtrieu/darkflow. It is almost same as this repo except it includes several __init__.py files.

SyedAliAriz commented 6 years ago

Same issue is being faced by me, someone please guide us. Can you people run any command with flow like,'python flow --h'? I get the above error on every flow command. Running it on Windows10, python 3.5, tensorflow 1.4.0(on CPU), opencv3..

Welpato commented 6 years ago

I had resolved the issue, dowloading directly the darkflow reposotory like @hlnull said before. And using the first start method ( python3 setup.py build_ext --inplace ).

razmik commented 6 years ago

Thanks to @Welpato and @hlnull suggestions, this is working. So I shall close this issue.

keponk commented 6 years ago

@razmik @hlnull can you share the version of your opencv3 module? Are you on mac using brew? or on linux using mini/conda?

Welpato commented 6 years ago

@keponk I'm on Windows 10 using conda, with the last version of opencv available on this link.

razmik commented 6 years ago

@keponk I'm on Windows 10 as well using opencv 3.3.1 with python 3.5.

hlnull commented 6 years ago

@keponk I am not sure since I can not access to the work laptop now.

Why not post your problem here or open another issue? Maybe someone knows the answer.

PandaWhoCodes commented 6 years ago

People who are still facing issues you can use LightNet - An interface for DarkNet

shubhamkalra27 commented 6 years ago

On windows 10 - I had the same issue, and chased it for two days to find a solution, some notes for everyone -

edit: To add changes to your path, copy all the output of echo %path% and reorder as mentioned above, and paste it back by using set path=

tl;dr echo %path% and try to get the order right of environment right.