marco-rudolph / differnet

This is the official repository to the WACV 2021 paper "Same Same But DifferNet: Semi-Supervised Defect Detection with Normalizing Flows" by Marco Rudolph, Bastian Wandt and Bodo Rosenhahn.
215 stars 67 forks source link

Error in running dummy dataset #29

Closed OzanErcan6 closed 3 years ago

OzanErcan6 commented 3 years ago

Output is below:

Traceback (most recent call last): File "main.py", line 10, in train_set, test_set = load_datasets(c.dataset_path, c.class_name) File "/home/ozan/differnet/differnet-master/utils.py", line 104, in load_datasets trainset = ImageFolderMultiTransform(data_dir_train, transform=transform_train, n_transforms=c.n_transforms) File "/home/ozan/differnet/differnet-master/multi_transform_loader.py", line 70, in init is_valid_file=is_valid_file, n_transforms=n_transforms) File "/home/ozan/differnet/differnet-master/multi_transform_loader.py", line 34, in init classes, class_to_idx = self._find_classes(self.root) AttributeError: 'ImageFolderMultiTransform' object has no attribute '_find_classes'

marco-rudolph commented 3 years ago

For the new torchvision version, use classes, class_to_idx = self.find_classes(self.root)

OzanErcan6 commented 3 years ago

Thanks that solved !