Closed flugenheimer closed 3 years ago
Before saving the ground_truth, removes <mAP path>/input
directory first.
https://github.com/hhk7734/tensorflow-yolov4/blob/25e802f1e0b95a5719920e40e98fdac1d0a9bfb2/py_src/yolov4/tf/__init__.py#L303-L305
And there is no need to reload the dataset. The reason for reloading the dataset is that somebody is confused about where the data set was obtained. :)
But why am i getting this behavior then ?
Fixing it with _dataset = data_set.dataset[i % max_dataset_size].copy()
may fix the problem.
If possible, please do PR after correction and testing.
I managed to find a strange behaviour with the save_dataset_for_mAP function. you have to reload the dataset each time you want to use the function save_dataset_for_mAP, otherwise a strange multiplication (or something else) is happening to the ground truth values being outputted into the "mAP/input/ground-truth" folder:
first time:
cat_head 479 199 808 516
second time:cat_head 486440 203929 820469 529350
third time:cat_head 493737435 208823994 832776689 542054400
and so on...This might seems like an artificial scenario, but it will introduce an error when using Google Colab and having loaded the dataset in one cell and try to call save in another cell multiple times.
if the dataset is loaded before each call to the save_dataset_for_mAP, this is not an issue