YAD2K icon indicating copy to clipboard operation
YAD2K copied to clipboard

Quick Start: Anchor file is None

Open kuonangzhe opened this issue 7 years ago • 5 comments

Thanks for the great work! I firstly tried with the tiny-yolo, which worked fine. Then I wanted to follow the quick start to see how is the normal yolo2 on coco. However, after I transfer the weight and cfg into h5, and run the ./test_yolo.py, I got the error, which then turned out that the anchor file was actually nothing inside.

Here is the error message: Traceback (most recent call last): File "./test_yolo.py", line 200, in _main(parser.parse_args()) File "./test_yolo.py", line 77, in _main anchors = [float(x) for x in anchors.split(',')] File "./test_yolo.py", line 77, in anchors = [float(x) for x in anchors.split(',')] ValueError: could not convert string to float: Exception ignored in: <bound method BaseSession.del of <tensorflow.python.client.session.Session object at 0x7f0bca06ff98>> Traceback (most recent call last): File "/home/czm/.local/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 595, in del TypeError: 'NoneType' object is not callable

The related anchor file was 0 bytes.

Thanks for the help!

kuonangzhe avatar Jul 30 '17 07:07 kuonangzhe

Hi, I got same error and solved by make anchors file from .cfg file used before. You can do it by following command: grep anchors yolo.cfg > model_data/yolo_anchors.txt sed -i 's/anchors//g' model_data/yolo_anchors.txt sed -i 's/=//g' model_data/yolo_anchors.txt

ACfromecs avatar Sep 19 '17 03:09 ACfromecs

Hi Yolo When I run: python yad2k.py yolo.cfg yolo.weights model_data/yolo.h5

I get the file yolo_anchors.txt in the model_data but it has 0 size. What should it be? Is it possible to generate it correctly from within python? Thanks

sojohan avatar Jan 30 '18 20:01 sojohan

as mention by @ACfromecs grep anchors yolo.cfg > model_data/yolo_anchors.txt

sed -i 's/anchors//g' model_data/yolo_anchors.txt sed -i 's/=//g' model_data/yolo_anchors.txt if sed -I .... get Error just remove "anchors" and "=" in the file "yolo_anchors.txt"

and it works ^_^

JyoHuang avatar Jun 25 '18 07:06 JyoHuang

can you please tell us how to run these commands if we use the folder in google colab

satishtilwani123 avatar Sep 10 '20 11:09 satishtilwani123

Can you please tell me how to run these on windows command line

Sivabanu avatar Feb 27 '21 19:02 Sivabanu