Darkflow: Cannot load weight anymore

Created on 21 May 2017  路  14Comments  路  Source: thtrieu/darkflow

After pulling new version, I couldnt load the weight anymore.
I got the following error.
"
Traceback (most recent call last):
File "./flow", line 6, in
cliHandler(sys.argv)
File "/home/ubuntu16/my_user/workspace/thesis/Framework/DavisChallenge/darkflow/darkflow/cli.py", line 22, in cliHandler
tfnet = TFNet(FLAGS)
File "/home/ubuntu16/my_user/workspace/thesis/Framework/DavisChallenge/darkflow/darkflow/net/build.py", line 57, in __init__
darknet = Darknet(FLAGS)
File "/home/ubuntu16/my_user/workspace/thesis/Framework/DavisChallenge/darkflow/darkflow/dark/darknet.py", line 27, in __init__
self.load_weights()
File "/home/ubuntu16/my_user/workspace/thesis/Framework/DavisChallenge/darkflow/darkflow/dark/darknet.py", line 82, in load_weights
wgts_loader = loader.create_loader(args)
File "/home/ubuntu16/my_user/workspace/thesis/Framework/DavisChallenge/darkflow/darkflow/utils/loader.py", line 105, in create_loader
return load_type(path, cfg)
File "/home/ubuntu16/my_user/workspace/thesis/Framework/DavisChallenge/darkflow/darkflow/utils/loader.py", line 19, in __init__
self.load(
args)
File "/home/ubuntu16/my_user/workspace/thesis/Framework/DavisChallenge/darkflow/darkflow/utils/loader.py", line 77, in load
walker.offset, walker.size)
AssertionError: expect 203934260 bytes, found 269862452
"

This error didn't happen in the old version, which is ee6fd2c.

Most helpful comment

AssertionError: expect 44948596 bytes, found 44948600

All 14 comments

@hungnguyen0606 Just trying to narrow down the problem - the yolo.cfg file was recently updated in darkflow to match the current yolo.cfg and yolo.weights available from the darknet repo and pjreddie.com.

Can you try re-downloading the yolo.weights (assuming that's the weight file you are using) from here: https://pjreddie.com/media/files/yolo.weights and see if that does anything?

@abagshaw
Thank you!
According to the size of your weight file, it makes some sense now. :D
I will try it.

New .weights file updated in google drive.

I'm having this issue with yolo-tiny-voc.weights. I modify classes to 1 and filters to 30 and get.

AssertionError: expect 63082056 bytes, found 63471556

Also have the problem with yolo-tiny.cfg/weights

AssertionError: expect 44948596 bytes, found 44948600

also having AssertionError: expect 44948596 bytes, found 44948600

@thtrieu @abagshaw @hungnguyen0606 Still having the same error after redownloading tiny-yolo-voc-4c.cfg and tiny-yolo-voc-4c.weights files :

Parsing ./cfg/tiny-yolo-voc-4c.cfg
Parsing cfg/tiny-yolo-voc-4c.cfg
Loading bin/tiny-yolo-voc-4c.weights ...
Traceback (most recent call last):
  File "flow", line 6, in <module>
    cliHandler(sys.argv)
  File "/home/shubhajit/Desktop/OFO/aareal_time_object_detection/darkflow-master/darkflow/cli.py", line 26, in cliHandler
    tfnet = TFNet(FLAGS)
  File "/home/shubhajit/Desktop/OFO/aareal_time_object_detection/darkflow-master/darkflow/net/build.py", line 59, in __init__
    darknet = Darknet(FLAGS)
  File "/home/shubhajit/Desktop/OFO/aareal_time_object_detection/darkflow-master/darkflow/dark/darknet.py", line 27, in __init__
    self.load_weights()
  File "/home/shubhajit/Desktop/OFO/aareal_time_object_detection/darkflow-master/darkflow/dark/darknet.py", line 82, in load_weights
    wgts_loader = loader.create_loader(*args)
  File "/home/shubhajit/Desktop/OFO/aareal_time_object_detection/darkflow-master/darkflow/utils/loader.py", line 105, in create_loader
    return load_type(path, cfg)
  File "/home/shubhajit/Desktop/OFO/aareal_time_object_detection/darkflow-master/darkflow/utils/loader.py", line 19, in __init__
    self.load(*args)
  File "/home/shubhajit/Desktop/OFO/aareal_time_object_detection/darkflow-master/darkflow/utils/loader.py", line 77, in load
    walker.offset, walker.size)
AssertionError: expect 63143560 bytes, found 63471556

I have the same error. I use yolov2-tiny.weights with yolov2-tiny.cfg, both downloaded from https://pjreddie.com/darknet/yolo/. Is it a proper way to do things or should I use darkflow copy of cfg file? Why cfg files are included in this repo and not downloaded from yolo site?

@jembezmamy use a different name for 'yolov2-tiny.weights' as the _same name for .weights and .cfg file not working_ when using custom datasets.
In my case, just by changing the name for tiny-yolo-voc-4c.weights to yolo-tiny-voc-4c.weights and keeping the yolo-voc-4c.cfg file name unchanged, made the model go for training.

same error.
AssertionError: expect 63820056 bytes, found 63820060

I'm having this issue with yolo-tiny-voc.weights. I modify classes to 1 and filters to 30 and get.

AssertionError: expect 63082056 bytes, found 63471556

Also have the problem with yolo-tiny.cfg/weights

Did you solve it? I am having the same problem.

I'm having this issue with yolo-tiny-voc.weights. I modify classes to 1 and filters to 30 and get.

AssertionError: expect 63082056 bytes, found 63471556

Also have the problem with yolo-tiny.cfg/weights

Did you solve it? I am having the same problem.
You should use the same name for *.weights and *.cfg . I solved this in my case.

I get the same assertion error.. tried changing the cfg and weight files' names and all that. Please provide your insights.

I'm having this issue with yolo-tiny-voc.weights. I modify classes to 1 and filters to 30 and get.

AssertionError: expect 63082056 bytes, found 63471556

Also have the problem with yolo-tiny.cfg/weights

Was this page helpful?
0 / 5 - 0 ratings

Related issues

realityzero picture realityzero  路  3Comments

1NNcoder picture 1NNcoder  路  3Comments

bareblackfoot picture bareblackfoot  路  4Comments

jubjamie picture jubjamie  路  4Comments

anonym24 picture anonym24  路  5Comments