keras-yolo3 icon indicating copy to clipboard operation
keras-yolo3 copied to clipboard

Error when generating anchors

Open enhany opened this issue 5 years ago • 0 comments

when I try to get anchors:

python gen_anchors.py -c config_clock.json

I get error and after that gen_anchors.py never ends.

iteration 306: dists = 31742163.397771813
gen_anchors.py:16: RuntimeWarning: divide by zero encountered in double_scalars
  similarity = w*h/(c_w*c_h)
iteration 307: dists = inf
iteration 308: dists = inf
gen_anchors.py:69: RuntimeWarning: invalid value encountered in subtract
  print("iteration {}: dists = {}".format(iteration, np.sum(np.abs(old_distances-distances))))
iteration 309: dists = nan
iteration 310: dists = nan
...

it's custom dataset with 1k images.

enhany avatar Feb 03 '20 23:02 enhany