diff --git a/UtilityTest.py b/UtilityTest.py index 087894d..5327dac 100644 --- a/UtilityTest.py +++ b/UtilityTest.py @@ -27,7 +27,7 @@ def __len__(self): def __getitem__(self, idx): - img_name = os.path.join(self.root_dir,os.listdir(self.root_dir)[idx]) + img_name = os.path.join(self.root_dir,sorted(os.listdir(self.root_dir))[idx]) image = (Image.open(img_name)) sample1={'image': image}