YOLOw-Keras icon indicating copy to clipboard operation
YOLOw-Keras copied to clipboard

error: No module named 'yad2k'

Open stevenveenma opened this issue 6 years ago • 6 comments

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?

stevenveenma avatar May 07 '18 14:05 stevenveenma

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

miranthajayatilake avatar May 07 '18 17:05 miranthajayatilake

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.

stevenveenma avatar May 08 '18 07:05 stevenveenma

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.

miranthajayatilake avatar May 08 '18 07:05 miranthajayatilake

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

sai-sai-sai avatar Nov 06 '18 17:11 sai-sai-sai

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.

ProgenitorX avatar Dec 14 '18 19:12 ProgenitorX

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/

sai-sai-sai avatar Dec 15 '18 23:12 sai-sai-sai