thtrieu / darkflow

Translate darknet to tensorflow. Load trained weights, retrain/fine-tune using tensorflow, export constant graph def to mobile devices
GNU General Public License v3.0
6.13k stars 2.09k forks source link

Failed to use tiny yolo #586

Open alfamousts opened 6 years ago

alfamousts commented 6 years ago

Hi, i tried to use tiny-yolo.cfg and tiny-yolo.weights, when i run the command python3 flow --model cfg/tiny-yolo.cfg --load bin/tiny-yolo.weights

I found some errors like this

Parsing ./cfg/tiny-yolo.cfg Parsing cfg/tiny-yolo.cfg Loading bin/tiny-yolo.weights ... Traceback (most recent call last): File "flow", line 6, in cliHandler(sys.argv) File "/home/asus/darkflow/darkflow/cli.py", line 26, in cliHandler tfnet = TFNet(FLAGS) File "/home/asus/darkflow/darkflow/net/build.py", line 58, in init darknet = Darknet(FLAGS) File "/home/asus/darkflow/darkflow/dark/darknet.py", line 27, in init self.load_weights() File "/home/asus/darkflow/darkflow/dark/darknet.py", line 82, in load_weights wgts_loader = loader.create_loader(args) File "/home/asus/darkflow/darkflow/utils/loader.py", line 105, in create_loader return load_type(path, cfg) File "/home/asus/darkflow/darkflow/utils/loader.py", line 19, in init self.load(args) File "/home/asus/darkflow/darkflow/utils/loader.py", line 70, in load val = walker.walk(new.wsize[par]) File "/home/asus/darkflow/darkflow/utils/loader.py", line 127, in walk 'Over-read {}'.format(self.path) AssertionError: Over-read bin/tiny-yolo.weights

But when i used yolo.cfg and yolo.weights , no errors found like that. Anyone can solve this problem ?

jingtianyilong commented 6 years ago

Same problem here. Use yolo.cfg, yolo.weights and got other error.

alfamousts commented 6 years ago

@jingtianyilong Hello i have fix this problem by download the cfg file on this site . Pjreddie always update the cfg file, maybe your cfg file is not compatible with yolo.weights you've downloaded.

ShengtangWang commented 6 years ago

i have done like what you said ,and download the cfg file on this site . but it occured AssertionError: expect 44948596 bytes, found 44948600 ,you have some solutions?

iseegr8tfuldeadppl commented 5 years ago

It seems that the PJ Reddie files are not fully compatible, so I have to download the pre built weights from the provided link in the README: https://drive.google.com/drive/folders/0B1tW_VtY7onidEwyQ2FtQVplWEU