fix image format
Summary: Error met when using test time augmentation in P138569013. Fix the problem by using `image_format` from `tta_mapper`
@@ -177,7 +177,7 @@ class GeneralizedRCNNWithTTA(nn.Module):
def _maybe_read_image(dataset_dict):
ret = copy.copy(dataset_dict)
if "image" not in ret:
- image = read_image(ret.pop("file_name"), self.image_format)
+ image = read_image(ret.pop("file_name"), self.tta_mapper.image_format)
image = torch.from_numpy(image).permute(2, 0, 1) # CHW
ret["image"] = image
if "height" not in ret and "width" not in ret:
