Closed xns0318 closed 6 months ago
@xns0318, this is because Patchcore only needs 1 epoch to train to extract the features. Increasing the max_epoch does not improve the Patchcore training. For this reason, this is hardcoded in the code here. https://github.com/openvinotoolkit/anomalib/blob/165702f7f7887b82a5a922fe25582376c785d47e/src/anomalib/models/image/patchcore/lightning_model.py#L120
For more details, you could refer to the paper https://arxiv.org/abs/2106.08265
Thank you very much!@samet-akcay
Describe the bug
I set min_epochs,max_epochs is useless, always return Trainer.fit stopped:max epochs=1
Dataset
Folder
Model
PatchCore
Steps to reproduce the behavior
datamodule = Folder( name="qigang", root= r"D:\detection\Anomaly-Detection\dataset\qigang", normal_dir=r"train\good", abnormal_dir=r"test\first", mask_dir=r"ground_truth\first", normal_split_ratio=0.2, seed = 2024 )
datamodule.setup() model = Patchcore().cuda() engine = Engine( accelerator= "cuda",
check_val_every_n_epoch=10,
OS information
OS information:
Expected behavior
I expect to be able to complete the training of the epoch I want to set
Screenshots
No response
Pip/GitHub
pip
What version/branch did you use?
No response
Configuration YAML
Logs
Code of Conduct