Replies: 2 comments
-
I've had something similar happened, for some images when they've been labeled as "ABNORMAL" there was just an empty mask. Does it happen for every image in your case? |
Beta Was this translation helpful? Give feedback.
-
I think that this indeed is an issue with thresholding. Note that image scores undergo a separate thresholding and normalization process from anomaly maps, so it can happen that there is a discrepancy. You could try to tune the threshold, but I'd recommend that you first check the values produced by automatic threshold. |
Beta Was this translation helpful? Give feedback.
-
Hey guys, I'm with MacnicaDHW and I've been having some issues while inferencing on a custom dataset with only normal_dir.
The issue: The pred_mask comes out empty, with seemingly no anomalies shown. The scores are all pretty great, and the heat and anomaly maps are very promising. The issue is that the pred_mask comes out completely blank.
I've tried adding huge anomalies to my test image as a simple test to check whether it was a threshold issue, and a few times this resulted in am anomaly showing in the pred_mask, though it was much smaller than it should've been.
From this, I thought that it could really be a threshold issue, and tried inferencing with different image and pixel thresholds with this addition:
model.adaptive_threshold = False
model.pixel_threshold.value = torch.tensor(float(1))
model.image_threshold.value = torch.tensor(float(1))
Where I tested a wide range of options to obersve the different outcomes. This resulted in changes as far as the anomaly and heat maps are concerned, but no progress on the pred_masks.
I've also noticed that my pred_score seems quite low (0.3775), and the pred_label comes out as False. I whatever is making the result False is the cause of the issue?
Dome details:
Model: FastFlow
Dataset: Folder, using only normal_dir and TestSplitMode.SYNTHETIC
Python: 3.10.14
Anomalib: 1.1.0dev
Please let me know if there's anything else I should provide to make your jobs easier.
Thanks in advance for the time and help!
Beta Was this translation helpful? Give feedback.
All reactions