jinyu121 / DW2TF

Darknet Weights to TensorFlow
GNU General Public License v3.0
219 stars 73 forks source link

AssertionError: Over-read models\yolov3.weights #12

Closed vijnasu closed 5 years ago

vijnasu commented 5 years ago

python main.py --cfg models\yolov3.cfg --weights models\yolov3.weights --output data\ --gpu 0

C:\Users\me\Documents\DW2TF\util\reader.py:31: RuntimeWarning: overflow encountered in long_scalars if ((major*10 + minor) >= 2 and major < 1000 and minor < 1000): 0 Tensor("yolov2/net1:0", shape=(?, 608, 608, 3), dtype=float32) Traceback (most recent call last): File "main.py", line 112, in main(args) File "main.py", line 53, in main parse_net(args.layers, args.cfg, args.weights, args.training) File "main.py", line 33, in parse_net training=training, const_inits=const_inits, verbose=verbose) File "C:\Users\me\Documents\DW2TF\util\cfg_layer.py", line 198, in get_cfg_layer layer = _cfg_layer_dict.get(layer_name, cfg_ignore)(B, H, W, C, net, param, weights_walker, stack, output_index, scope, training, const_inits, verbose) File "C:\Users\me\Documents\DW2TF\util\cfg_layer.py", line 52, in cfg_convolutional batch_normalize=batch_normalize) File "C:\Users\me\Documents\DW2TF\util\reader.py", line 64, in get_weight return self.get_weight_convolutional(**args) File "C:\Users\me\Documents\DW2TF\util\reader.py", line 55, in get_weight_convolutional biases = self.walk(filters) File "C:\Users\me\Documents\DW2TF\util\reader.py", line 41, in walk assert end_point <= self.size, 'Over-read {}'.format(self.path) AssertionError: Over-read models\yolov3.weights

sjain-stanford commented 5 years ago

@vijnasu It seems like an overflow issue on your machine when computing major*10 + minor. That is really odd, and I'm unable to reproduce this. Can you provide details of your platform (OS etc)? Have you tried running on a Linux instance?

vijnasu commented 5 years ago

@sjain-stanford I am using Intel NUC with i7 processor on Windows 10. Python 3.6 and TF 1.12 or 1.13 is in Anaconda. My requirement is on Windows.

sjain-stanford commented 5 years ago

@vijnasu At the moment it's difficult to reproduce this error on your environment. Please give it a try on Ubuntu. I've updated the README to reflect the dependencies on which the code is tested on.

mohammedayub44 commented 5 years ago

@sjain-stanford I ran into this issue as well on Ubuntu 16.04 python version 3.6.6

ROBYER1 commented 3 years ago

Same issue here, but I am using python 3.6 and Ubuntu 20.04