HuiZhang0812 / DiffusionAD

148 stars 16 forks source link

TypeError: 'NoneType' object is not subscriptable #54

Closed Xantastic closed 2 months ago

Xantastic commented 2 months ago

Original Traceback (most recent call last): File "D:\anaconda3\envs\my_code\lib\site-packages\torch\utils\data_utils\worker.py", line 302, in _worker_loop data = fetcher.fetch(index) File "D:\anaconda3\envs\my_code\lib\site-packages\torch\utils\data_utils\fetch.py", line 58, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "D:\anaconda3\envs\my_code\lib\site-packages\torch\utils\data_utils\fetch.py", line 58, in data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\Users\13093\Desktop\paperCode\DiffusionAD-main\DiffusionAD-main\data\dataset_beta_thresh.py", line 274, in getitem augmented_image, anomaly_mask, has_anomaly = self.perlin_synthetic(image,thresh,anomaly_path,cv2_image,thresh_path) File "C:\Users\13093\Desktop\paperCode\DiffusionAD-main\DiffusionAD-main\data\dataset_beta_thresh.py", line 207, in perlin_synthetic anomaly_img_augmented = aug(image=anomaly_source_img) File "D:\anaconda3\envs\my_code\lib\site-packages\imgaug\augmenters\meta.py", line 2008, in call return self.augment(*args, **kwargs) File "D:\anaconda3\envs\my_code\lib\site-packages\imgaug\augmenters\meta.py", line 1979, in augment batch_aug = self.augmentbatch(batch, hooks=hooks) File "D:\anaconda3\envs\my_code\lib\site-packages\imgaug\augmenters\meta.py", line 645, in augmentbatch hooks=hooks) File "D:\anaconda3\envs\my_code\lib\site-packages\imgaug\augmenters\meta.py", line 3127, in _augmentbatch hooks=hooks File "D:\anaconda3\envs\my_code\lib\site-packages\imgaug\augmenters\meta.py", line 645, in augmentbatch hooks=hooks) File "D:\anaconda3\envs\my_code\lib\site-packages\imgaug\augmenters\color.py", line 2471, in _augmentbatch image_hsv, hue_i, saturation_i) File "D:\anaconda3\envs\my_code\lib\site-packages\imgaug\augmenters\color.py", line 2501, in _transform_image_cv2 table_hue = cls._LUT_CACHE[0]

HuiZhang0812 commented 2 months ago

This issue seems to be caused by an incorrect configuration of the path.