I am trying to adjust the code to my own dataset. However, I am really struggling since I am not a pro at python.
How can I generate cls_labels.npy for a different dataset? The script make_cls_labels.py does not work. Plus, it makes use of .xml files. Is there an easier way to generate a dictionary with image level labels?
Also, my images don't share the same naming conventions as VOC12, so this part of the code creates a ton of problems:
def decode_int_filename(int_filename):
s = str(int(int_filename))
I am trying to adjust the code to my own dataset. However, I am really struggling since I am not a pro at python.
How can I generate cls_labels.npy for a different dataset? The script make_cls_labels.py does not work. Plus, it makes use of .xml files. Is there an easier way to generate a dictionary with image level labels?
cls_labels_dict = np.load('voc12/cls_labels.npy', allow_pickle=True).item() print(cls_labels_dict) # 2011003271: array([0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], dtype=float32)}
Also, my images don't share the same naming conventions as VOC12, so this part of the code creates a ton of problems: def decode_int_filename(int_filename): s = str(int(int_filename))