Closed samahwaleed closed 1 year ago
@samahwaleed
Your xmin
and xmax
have the same coordinates in one of the files. xmax
should be at least 1 pixel larger than xmin
. You may need to correct the annotations.
is there any way to know the name of the file that has error because I have 3000 training images?
You can print the name by adding a print statement in the datasets.py
file. You will need to make --workers 0
so that the files are accessed serially and get the actual file name that has the issue.
I write print(annot_filename)
in load_image_and_labels
function but it prints all xml file not the file that has error.
The last file name before the error happens is the one that has error.
Got another error:
AssertionError: All bounding boxes should have positive height and width. Found invalid box [433.2250061035156, 516.2073974609375, 433.2250061035156, 522.4518432617188] for target at index 1.
This is also an annotation issue. Looks like your dataset has a few object objects where xmin = xmax, and ymin = ymax. This can cause issues with albumentations or the Faster RCNN RPN network. Every xmax and ymax should be at least 1 pixel greater than xmin and ymin.
@samahwaleed Also, please pull the latest code. I made some changes to the mosaic augmentation which improves performance to a great extent.
@sovit-123 it works, Thank you so much
How I can know these informations:
Number of regions to sample,
Number of strongest regions,
Negative overlap range,
Positive overlap range
I think what you are asking for is assigning anchors according to the custom dataset. Right now, the codebase does not support that. I will have to think how to add that to the codebase.
@sovit-123 Thank you Sir,
My bounding box is in "Pascal VOC" format. While training a model, I got this error:
ValueError: x_max is less than or equal to x_min for bbox (tensor(0.3252), tensor(0.9222), tensor(0.3252), tensor(0.9308),tensor(2)).