-
Notifications
You must be signed in to change notification settings - Fork 709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove task parameter #181
Conversation
I think this will have a negative impact on the workflow when using anomalib. |
What about resolving this problem with an optional 'ignore_masks' flag in the config? |
@alexriedel1 @LukasBommes Thanks for your feedback. Our motivation for removing this parameter was that the task type does not actually affect the training process, but just the post-processing steps. Most models in anomalib are essentially segmentation models that predict a pixel-level anomaly map. The image-level classification predictions are obtained by aggregating in some way these pixel-level anomaly scores (usually this is done by taking the maximum pixel value). Since we have the anomaly maps available anyway, it just takes a few postprocessing steps (apply threshold, compute performance) to also obtain the segmentation predictions and the corresponding performance. Of course there are also some models in Anomalib that do not generate pixel-level predictions (DFKDE, DFM). Those will however not be affected by this PR, because the segmentation predictions and performance is only computed when anomaly maps are present in the models output dictionary. So our reasoning was that, since the pixel-level anomaly scores are computed anyway, we might as well use them to show the segmentation results. The image-level results will not be affected by the computation of the pixel-level results, so users who are only interested in the classification performance could safely ignore the pixel-level predictions and performance. If you see any problems with this approach, could you please provide some more details about your usecase and why it would be problematic for you if the pixel-level predictions and performance are generated based on availability rather than an explicit parameter? |
Yes, actually you're right I guess. I'm just a fan of explicity (opposed to implicitly define the task if no mask dir is set..) |
Closing this PR after feedback from the community pointed out that this change was not desirable. We will look for another way to make the |
Description
This PR removes the
config.dataset.task
parameter, which was redundant.The data modules now check if ground truth mask annotations are available to determine the task type.
The anomaly module now checks if the pixel metrics have been updated before attempting to compute the metrics.
Fixes Get rid of task_type parameter #34
Changes
Checklist