jinyu121 / DW2TF

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

Problem in converting model KeyError: 'width' #31

Open barzan-hayati opened 5 years ago

barzan-hayati commented 5 years ago

I had cloned your repository to my directory. After that I tried to convert yolo.weight file using your code but I received this message and error:

Traceback (most recent call last): File "main.py", line 116, in <module> main(args) File "main.py", line 57, 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 "/home/ai-station/Desktop/workspace/navid/training/test/darknet/Convert_Model/loadingmodel/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 "/home/ai-station/Desktop/workspace/navid/training/test/darknet/Convert_Model/loadingmodel/util/cfg_layer.py", line 29, in cfg_net width = int(param["width"]) KeyError: 'width'

How could I resolve it?

Screenshot from 2019-08-04 12-53-38

Ruolingdeng commented 5 years ago

I encountered the same problem, have you known how to solve it?

barzan-hayati commented 4 years ago

I encountered the same problem, have you known how to solve it?

I use deepstream for converting weights to TensorRT. It's could convert weights to trt formats easily.