Thanks for this amazing contribution! I am running this on my local machine! I get the following error
File "C:\Users\pavit\AppData\Local\Programs\Python\Python37\lib\site-packages\imageai\Detection\Custom__init.py", line 179, in setTrainConfig
self.train_cache_file, self.__model_labels)
File "C:\Users\pavit\AppData\Local\Programs\Python\Python37\lib\site-packages\imageai\Detection\Custom\gen_anchors.py", line 95, in generateAnchors
centroids = run_kmeans(annotation_dims, num_anchors)
File "C:\Users\pavit\AppData\Local\Programs\Python\Python37\lib\site-packages\imageai\Detection\Custom\gen_anchors.py", line 44, in run_kmeans
indices = [random.randrange(ann_dims.shape[0]) for i in range(anchor_num)]
File "C:\Users\pavit\AppData\Local\Programs\Python\Python37\lib\site-packages\imageai\Detection\Custom\gen_anchors.py", line 44, in
indices = [random.randrange(ann_dims.shape[0]) for i in range(anchor_num)]
File "C:\Users\pavit\AppData\Local\Programs\Python\Python37\lib\random.py", line 190, in randrange
raise ValueError("empty range for randrange()")
ValueError: empty range for randrange()
Hi,
It seems like imageai couldn't find any annotations, so it might be helpful to check your dataset path and if the annotations are correct and in the right place
Thanks for this amazing contribution! I am running this on my local machine! I get the following error
File "C:\Users\pavit\AppData\Local\Programs\Python\Python37\lib\site-packages\imageai\Detection\Custom__init.py", line 179, in setTrainConfig self.train_cache_file, self.__model_labels) File "C:\Users\pavit\AppData\Local\Programs\Python\Python37\lib\site-packages\imageai\Detection\Custom\gen_anchors.py", line 95, in generateAnchors centroids = run_kmeans(annotation_dims, num_anchors) File "C:\Users\pavit\AppData\Local\Programs\Python\Python37\lib\site-packages\imageai\Detection\Custom\gen_anchors.py", line 44, in run_kmeans indices = [random.randrange(ann_dims.shape[0]) for i in range(anchor_num)] File "C:\Users\pavit\AppData\Local\Programs\Python\Python37\lib\site-packages\imageai\Detection\Custom\gen_anchors.py", line 44, in
indices = [random.randrange(ann_dims.shape[0]) for i in range(anchor_num)]
File "C:\Users\pavit\AppData\Local\Programs\Python\Python37\lib\random.py", line 190, in randrange
raise ValueError("empty range for randrange()")
ValueError: empty range for randrange()