Open oyvindM-B opened 6 years ago
Delete the old cache pkl file it should solve the issue
Additionally in voc.py in line 19 change
tree = ET.parse(ann_dir + ann)
to
tree = ET.parse(os.path.join(ann_dir, ann))
this should solve the issue when the path in the config ends not with /
@paulbauriegel @kiakia2 After resizing to image size of 416 using : out_string += str(int(anchors[i,0]416)) + ',' + str(int(anchors[i,1]416)) + ', ', the anchors for raccoon data is much larger than the give values. As follows:
average IOU for 9 anchors: 0.84 112,103, 152,158, 178,233, 207,324, 224,180, 250,261, 306,384, 313,215, 362,276
Have you tried gen_anchors on raccoon dataset?
Hey @kiakia2 has there been any progress on this? Did you find a fix? I'm having the exact same issue
I also have the same problem, finally found out is the path error! Double check your path ,The final path should go to your images. For example, if your images are stored in 'anns' folder, the last path should go to /.../anns/
I receive this error when trying to generate anchors from my racoon- updated config file. Do anyone know what the problem might be?
C:\Users\OMB\Activity Detection\Script\keras-yolo3-master>python gen_anchors.py -c config.json Traceback (most recent call last): File "gen_anchors.py", line 132, in
main(args)
File "gen_anchors.py", line 111, in main
centroids = run_kmeans(annotation_dims, num_anchors)
File "gen_anchors.py", line 57, in run_kmeans
indices = [random.randrange(ann_dims.shape[0]) for i in range(anchor_num)]
File "gen_anchors.py", line 57, in
indices = [random.randrange(ann_dims.shape[0]) for i in range(anchor_num)]
File "C:\Users\OMB\AppData\Local\Programs\Python\Python36\lib\random.py", line 189, in randrange
raise ValueError("empty range for randrange()")
ValueError: empty range for randrange()
I also attached the information from my config.json file:
{ "model" : { "min_input_size": 352, "max_input_size": 448, "anchors": [10,13, 16,30, 33,23, 30,61, 62,45, 59,119, 116,90, 156,198, 373,326], "labels": ["raccoon"] },
}