Open JonasBoukamp opened 1 year ago
A similar problem
A small random change in the width and height fields helped me. Previously, I set the constant numbers as field data, and this error occurred.
i have same problem. how to fix it
i have same problem. how to fix it
As I empirically understood, such an error is related to the uniformity of input parameters, whether width or height, that interfere with successful learning. On my part, I personally generated a constant height and width, which is why I always got this error. The solution for me was a small randomization of width and height, literally by ~0.01 values. I do not exclude that there may be other reasons for this error, but so far I have had only one such case.
Hi, I´m training a volov3 using a custom dataset and ran into the error where an assertion is triggered. I´m using the same code with another dataset without any problems so I asume, I made an error creating this dataset. Does anybody know what type of mistakes in a dataset could trigger the shown assertion. Until now I couldn´t find any differences in the annotation files of the two datasets.
All annotation files are generated by a self written script. The following example shows one of the files:
Traceback (most recent call last): File "C:\Users\jonas\OneDrive\Hochschule\Master\Master Arbeit\Python\testFramework\yolo.py", line 86, in
y.train(dataDirectory="syntheticDataset/temp/out", baseModelPath="syntheticDataset/yolov3.pt")
File "C:\Users\jonas\OneDrive\Hochschule\Master\Master Arbeit\Python\testFramework\yolo.py", line 80, in train
trainer.trainModel()
File "C:\Users\jonas\AppData\Roaming\Python\Python311\site-packages\imageai\Detection\Custom__init.py", line 229, in trainModel
self.set_training_param(self.epochs, accumulate)
File "C:\Users\jonas\AppData\Roaming\Python\Python311\site-packages\imageai\Detection\Custom\init.py", line 62, in set_training_param
self.__anchors = generate_anchors(
^^^^^^^^^^^^^^^^^
File "C:\Users\jonas\AppData\Roaming\Python\Python311\site-packages\imageai\Detection\Custom\yolo\custom_anchors.py", line 59, in generate_anchors
assert len(k) == n, f'ERROR: scipy.cluster.vq.kmeans requested {n} points but returned only {len(k)}'
^^^^^^^^^^^
AssertionError: ERROR: scipy.cluster.vq.kmeans requested 9 points but returned only 7