Value Error: Expected x_max for bbox (0.73, 0.26, 1.02, 0.39),to be in the range [0.0, 1.0], got 1.029

585 Views Asked by At

When I train my own dataset with Faster RCNN by pytorch, I got this error - 'ValueError: Expected x_max for bbox (0.7343220683333334, 0.26440678624999997, 1.0292373053333335, 0.393220352, tensor(2)) to be in the range [0.0, 1.0], got 1.0292373053333335.' I have tried some solutions from google, it still doesn't work, I have no idea on it. Here is my Albumentations function:

def get_train_transform():
    return A.Compose([
        ToTensorV2(p=1.0)
    ], bbox_params={'format': 'pascal_voc', 'label_fields': ['labels']})

def get_valid_transform():
    return A.Compose([
        ToTensorV2(p=1.0)
    ], bbox_params={'format': 'pascal_voc', 'label_fields': ['labels']})

I have tried to normalize the bboxes,A.Normalize(mean=(0, 0, 0), std=(1, 1, 1), max_pixel_value=255.0, p=1.0), it doesn't work.

0

There are 0 best solutions below