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: No module named 'yad2k' #3

Open
stevenveenma opened this issue May 7, 2018 · 6 comments
Open

error: No module named 'yad2k' #3

stevenveenma opened this issue May 7, 2018 · 6 comments

Comments

@stevenveenma
Copy link

Thanks for this repository.
I got an error with this phrase: from yad2k.models.keras_yolo import yolo_head, yolo_eval
ModuleNotFoundError: No module named 'yad2k'

Do I need a preliminary step and install something before I run the yolo.py code?

@miranthajayatilake
Copy link
Owner

All the yad2k helper functions are included in the repo. Clone the repo properly and run, so you won't get these errors.

@stevenveenma
Copy link
Author

Thanks for your quick reply. I unzipped it instead of cloning. I have it working now but I have some findings:

  • yolow3 is not supported by YAD2K so I tried it with yolow2
  • The dimensions in the python script are wrong. I had to replace 680 by 416 and the script went well. Probably 680 is the dimension of another version of yolo?
  • I wonder why 'import image' is necessary. I tried to install image, but some errors occured. I commented it out and tested it and de python script went well.
  • Adding the python code in a notebook and adding '%pylab inline' showed me the picture with the recognized objects.
  • I think I need to alter the settings of the probabilities as not all objects are recognized well.

Thanks for this repository that combined with the face recognition I have already in place gives me the tools for complete photo recognition.

@miranthajayatilake
Copy link
Owner

Yes. This project was done before yolo3 was released. So the size 608 was with the yolov2 model.
Correct. 'import image' is not needed. I will remove it from the repo.
Good luck with your project.

@sai-sai-sai
Copy link

sai-sai-sai commented Nov 6, 2018

I have the same issue tried both download and clone options.

from yad2k.models.keras_yolo import yolo_head, yolo_boxes_to_corners, preprocess_true_boxes, yolo_loss, yolo_body

yad2k error

@ProgenitorX
Copy link

ProgenitorX commented Dec 14, 2018

Having the same issue. Cloned the repo and can see the keras_yolo.py file in the right place, but can't find the module for import.

~/git/YOLOw-Keras$ python yolo.py
Using TensorFlow backend.
Traceback (most recent call last):
File "yolo.py", line 16, in
from yad2k.models.keras_yolo import yolo_head, yolo_eval
ImportError: No module named yad2k.models.keras_yolo

~/git/YOLOw-Keras$ ls yad2k/models/
keras_darknet19.py keras_yolo.py pycache


Edit: Running in Python3 solved the issue.

@sai-sai-sai
Copy link

I guess the reaso is that you have to compile darknet , and inorder to do that you need get the Unix command "make" to run on Windows. Now to do that you need to install GNU or MInGW or CygWin. I did all of these and still "make" doesnt work on windows. Really lost , i may have to go for an Ubuntu env/

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

4 participants