You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to run dfm to classify my images as anomalous/non anomalous. I made my dataset in MVTec hierarchy but I get an error when i run the train script with the error being that the trainer can't access segmentation masks. Are they mandatory when the task is to classify? Below is a the error I get.
File "C:\Users\hp\anomalib\env\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "c:\users\hp\anomalib\anomalib\data\mvtec.py", line 256, in getitem
mask = cv2.imread(mask_path, flags=0) / 255.0
TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'
The text was updated successfully, but these errors were encountered:
I just got the same error when trying to run task: classification on an mvtec-like dataset (format: mvtec) without masks provided.
In my opinion, it would make most sense to fix the folder dataset to correctly deal with custom datasets that already have a train/test split (this currently does not work, see here). In that case, there would be no need to use format: mvtec for a custom dataset without masks.
@MhdKAT, it's the same issue that was found in folder dataset. Need to propose the same fixes to address the issue. @LukasBommes, yes that's on our todo list, but didn't have a chance to work on it this week unfortunately.
I tried to run dfm to classify my images as anomalous/non anomalous. I made my dataset in MVTec hierarchy but I get an error when i run the train script with the error being that the trainer can't access segmentation masks. Are they mandatory when the task is to classify? Below is a the error I get.
File "C:\Users\hp\anomalib\env\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "c:\users\hp\anomalib\anomalib\data\mvtec.py", line 256, in getitem
mask = cv2.imread(mask_path, flags=0) / 255.0
TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'
The text was updated successfully, but these errors were encountered: