YOLOv3_TensorFlow
YOLOv3_TensorFlow copied to clipboard
Create convert_tf_to_darknet.py
this script is used to convert tensorflow's checkpoint to Darknet weights file. But there are two problems:
- Maybe some layer`s name is different between this project and my
- After conversion, the results on the Darknet map is worse than here before conversion.
This script is exactly what I have been looking for. Where these problems ever resolved? How much worse are the results on the new saved weights?
Hi, thank you so much for this code! It's exactly what I need! However, I ran into some problems: which checkpoint file do I have to use for this code? When training 4 files are saved: training.meta, training.index and training.data.... and a checkpoint file called checkpoint. If I try to load the checkpoint file i get this error message:
"DataLossError: Unable to open table file \checkpoint: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?"
I then tried to load the same file as I use in restore_path (only the filename without the endings .meta, .index etc.) and got this error message: "line 26, in write_bn weightfile.write(reader.get_tensor(layer_name + '/batch_normalization/beta').tobytes()) File "\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 678, in get_tensor return CheckpointReader_GetTensor(self, compat.as_bytes(tensor_str))" NotFoundError: Key darknet/conv0/batch_normalization/beta not found in checkpoint
Does anyone have an idea what might be wrong and could help me?