diff --git a/data/load_data.py b/data/load_data.py index b16f03b..675cbc0 100644 --- a/data/load_data.py +++ b/data/load_data.py @@ -36,7 +36,7 @@ def __len__(self): def __getitem__(self, index): filename = self.img_paths[index] - Image = cv2.imread(filename) + Image = cv2.imdecode(np.fromfile(filename,dtype=np.uint8), cv2.IMREAD_COLOR) height, width, _ = Image.shape if height != self.img_size[1] or width != self.img_size[0]: Image = cv2.resize(Image, self.img_size)