Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in module darkflow.cython_utils.nms #1

Closed
razmik opened this issue Nov 17, 2017 · 16 comments
Closed

Error in module darkflow.cython_utils.nms #1

razmik opened this issue Nov 17, 2017 · 16 comments

Comments

@razmik
Copy link

razmik commented Nov 17, 2017

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
Copy link

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

@Kazutox
Copy link

Kazutox commented Nov 17, 2017

also facing this issue.

@narrowfail
Copy link

Same issue over here ...

@keponk
Copy link

keponk commented Nov 17, 2017

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
Copy link

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
Copy link

Any news about this?

@hlnull
Copy link

hlnull commented Nov 22, 2017

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
Copy link

SyedAliAriz commented Nov 22, 2017

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
Copy link

Welpato commented Nov 23, 2017

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
Copy link
Author

razmik commented Nov 23, 2017

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

@razmik razmik closed this as completed Nov 23, 2017
@keponk
Copy link

keponk commented Nov 24, 2017

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

@Welpato
Copy link

Welpato commented Nov 24, 2017

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

@razmik
Copy link
Author

razmik commented Nov 25, 2017

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

@hlnull
Copy link

hlnull commented Nov 25, 2017

@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
Copy link

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

@shubhamkalra27
Copy link

shubhamkalra27 commented Sep 4, 2018

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

  • echo %path% is your friend.

  • You might be asked to install C bindings from Visual Studio website - do that, add it to top of env variables.

  • If you are using Anaconda package manager, as soon as you switch to your env, temporarily, that shell has a new order of env vvariables, echo %path% again to see what's going on.

  • Move all the anaconda stuff below the Microsoft Visual Studio stuff, and then you would be able to compile this. The mingw-w64 library in my python environment was taking presedence over the Microsoft Visual Studio stuff

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants