diff --git a/dlordinal/datasets/fgnet.py b/dlordinal/datasets/fgnet.py index 413ee74..02381d5 100644 --- a/dlordinal/datasets/fgnet.py +++ b/dlordinal/datasets/fgnet.py @@ -165,9 +165,8 @@ def __getitem__(self, index: int) -> Tuple[Any, Any]: ) # Cargar la imagen como PIL.Image.Image - with open(img_path, "rb") as f: - image = Image.open(f) - image = image.convert("RGB") + image = Image.open(img_path) + image = image.convert("RGB") # Aplicar transformación si está definida if self.transform: