google-research / deep_representation_one_class

Apache License 2.0
156 stars 27 forks source link

Question about paper"CutPaste: Self-Supervised Learning for Anomaly Detection and Localization" #1

Closed Youskrpig closed 3 years ago

Youskrpig commented 3 years ago

Thanks for your great work. I notice that you are also the authors of paper "CutPaste: Self-Supervised Learning for Anomaly Detection and Localization", and I can't reproduce the Cutpaste(normal cutpaste) results of Experiment with ResNet18 in A.1 section.
About the experiment setting: Backbone: Resnet 18 + MLP head(Train from scratch) For example, Capsule in mvtec dataset, training epoches: 256, num of training samples: 219, batchsize:64, one epoch needs 4 steps. In paper, "Note that, unlike conventional definition for an epoch, we define 256 parameter update steps as one epoch." So 65536 steps. the other parameters i set is lined with paper(including learning rate, weight_decay, moment). The training loss curve: loss

The acc curve:
acc

The lr curve: lr

The epoch curve: epoch

I'm not sure 65536 steps is too many. but according the loss curve, it' kind of weird. Finally the ROCAUC is , (paper: 87.9+-0.7), I think my evaluating is correct. I try evaluating pretrained efficientnetb4 and b5 without training(paper, table 3) 4082DA83-F622-42ee-B79B-2A8EA44F3086

So about the experiment of resnet18, Could you please give me some advice?

kihyuks commented 3 years ago

Hi, thanks for trying out CutPaste and sorry to hear that it didn't work as expected.

Both our ICLR (Learning & Evaluating OCC) and CVPR (CutPaste) papers are based on the codebase we released here. Specifically, we used unsup_embed.py, which implements predicting augmentation for self-supervised learning, by replacing rotation augmentations into CutPaste augmentation. This codebase could be a good starting point if you are interested in reproducing the results.

To answer your question, yes, we trained the model for 256 x 256 steps for all categories of MVTec dataset.

Youskrpig commented 3 years ago

Thanks for your reply. I will see the codebase in details.

Best wishes

At 2021-07-27 00:37:45, "kihyuks" @.***> wrote:

Hi, thanks for trying out CutPaste and sorry to hear that it didn't work as expected.

Both our ICLR (Learning & Evaluating OCC) and CVPR (CutPaste) papers are based on the codebase we released here. Specifically, we used unsup_embed.py, which implements predicting augmentation for self-supervised learning, by replacing rotation augmentations into CutPaste augmentation. This codebase could be a good starting point if you are interested in reproducing the results.

To answer your question, yes, we trained the model for 256 x 256 steps for all categories of MVTec dataset.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

xaioffff commented 2 years ago

感谢您的回复。我将详细查看代码库。最美好的祝福 在 2021-07-27 00:37:45,"kihyuks" @.***> 写道:您好,感谢您试用 CutPaste 很遗憾听到它没有按预期工作. 我们的 ICLR (Learning & Evaluating OCC) 和 CVPR (CutPaste) 论文都是基于我们在这里发布的代码库。具体来说,我们使用了 unsup_embed.py,它通过将旋转增强替换为 CutPaste 增强来实现自我监督学习的预测增强。如果您有兴趣重现结果,此代码库可能是一个很好的起点。为了回答您的问题,是的,我们针对所有类别的 MVTec 数据集训练了 256 x 256 步的模型。— 您收到此消息是因为您创作了该线程。直接回复此邮件,在 GitHub 上查看,或取消订阅。

I come from Anhui, China.I can exchange contact information, cutpaste??我的QQ邮箱2398632840qq.com

xaioffff commented 2 years ago

感谢您的回复。我将详细查看代码库。最美好的祝福 在 2021-07-27 00:37:45,"kihyuks" @.***> 写道:您好,感谢您试用 CutPaste 很遗憾听到它没有按预期工作. 我们的 ICLR (Learning & Evaluating OCC) 和 CVPR (CutPaste) 论文都是基于我们在这里发布的代码库。具体来说,我们使用了 unsup_embed.py,它通过将旋转增强替换为 CutPaste 增强来实现自我监督学习的预测增强。如果您有兴趣重现结果,此代码库可能是一个很好的起点。为了回答您的问题,是的,我们针对所有类别的 MVTec 数据集训练了 256 x 256 步的模型。— 您收到此消息是因为您创作了该线程。直接回复此邮件,在 GitHub 上查看,或取消订阅。

I come from Anhui, China.I can exchange contact information, cutpaste??我的QQ邮箱2398632840qq.com