anomalib icon indicating copy to clipboard operation
anomalib copied to clipboard

❓ <title>Inconsistent Anomaly Mask Predictions Between engine.test and engine.predict

Open MMYY-yy opened this issue 2 months ago • 3 comments

Your Question

anomalib = 2.1.0

Experiment 1: Discrepancy Between Test Output and Standalone Predict

A model checkpoint was generated by running the integrated training and testing structure (engine.fit() followed by engine.test()).

The anomaly mask obtained from the output of the testing stage (engine.test()) was compared with the mask generated by a standalone prediction script using the exact same weights.

Result: The testing mask and the standalo

Image

ne prediction mask for the same image showed a massive difference.

Experiment 2: Discrepancy Between Integrated Predict and Standalone Predict

A checkpoint was obtained after running the full integrated pipeline (training, testing, and integrated prediction).

The anomaly mask from the integrated prediction within the pipeline was compared with the mask generated by a standalone prediction script using the same weights.

Result: There was a significant difference between the integrated prediction mask and the standalone prediction mask.

Experiment 3: Environment Reinstallation

The environment was completely reinstalled, including downloading the source code again.

Result: Executing Experiment 1 and Experiment 2 again resulted in the same persistent issues.

  • [x] @ #- [

Forum Check

  • [x] I have searched the discussions forum for an answer to my question.

MMYY-yy avatar Oct 15 '25 08:10 MMYY-yy

Thanks for submitting this issue! It has been added to our triage queue. A maintainer will review it shortly.

github-actions[bot] avatar Oct 15 '25 08:10 github-actions[bot]

same problem

InvalidSyntaxxx avatar Nov 12 '25 03:11 InvalidSyntaxxx

Probably duplicate of #2944

mbignotti avatar Nov 12 '25 13:11 mbignotti