marco-rudolph / ast Goto Github PK
View Code? Open in Web Editor NEWThis is the code to the WACV 2023 paper "Asymmetric Student-Teacher Networks for Industrial Anomaly Detection" by Marco Rudolph, Tom Wehrbein, Bodo Rosenhahn and Bastian Wandt.
This is the code to the WACV 2023 paper "Asymmetric Student-Teacher Networks for Industrial Anomaly Detection" by Marco Rudolph, Tom Wehrbein, Bodo Rosenhahn and Bastian Wandt.
Hello, @marco-rudolph, I am back a again :)
I would like to ask you a question that is not related to the paper, but rather to the research process.
There are many categories in the MVTec AD and other dataset . Should we first adjust the model to a better level on one category before testing other datasets?
Have you ever encountered situations in your research where the effect is particularly good in one category but very poor in other categories, almost ineffective?
Sorry to bother you, I would appreciate it if you could reply!
Thanks for your great work, I would like to ask how much memory and GPU memory I need if I run your code.
Hi, thanks for the nice work.
After browsing your code, it seems that there is no code for pixel-level auroc evaluation? (which is reported in your paper in Table 4). If there is, could you point out which part corresponds to the pixel-level auroc evaluation?
Thanks. I would appreciate it very much if you could reply.
Hi!
How to get 3D data that you process in .tiff files? I want to use my own dataset of RGB images and a 3D model built from them. But MVTec 3D-AD does not say exactly how these files are created.
Hi, I am an undergraduated student, I read your article revently, but I dont understand something. May I get the code?
Hi, @marco-rudolph, how do you think the metric of image-auc ?
I think the training of all kinds of Student-Teacher Network can only improve the metric of pixel-auc or pro, because the loss fuction is MSEloss between teacher's feature map and student's feature map. The loss only reflect the pixel level distance not the image level, so taking the maximum of the feature map as anomaly score may be not reasonable. even if taking the maximum will work, i think it is occasionally.
Hello,
I have a question about dataset, why AST work badly on dataset of cable gland、dowel and tire, I have seen dataset, but I couldn't figure it out
Hello, may I ask why the teacher network uses NF? When encountering abnormal samples, how can teachers and students distinguish whether the image is abnormal?
Hi Marco, thanks for sharing your project.
I was trying to run train_student.py from CPU with device=cpu in config.py, but I have got:
Torch not compiled with CUDA enabled error.
Is there another device config that i should change, to train the model from CPU?
I could run all the scripts in colab, from GPU by the way.
Dear author,
As written in your code, there is max score over maps and mean score over maps, could you explain the difference, and which score did you use for the reported results in your paper?
Thanks in advance and I will appreciate it very much if you could reply.
Hey.
In case I want to train a model with custom data, how could I get the ground truth masks, for
the bad / anomalous samples ?
Thanks Marco!
Whether can add a normal vector?maybe it has better result?
And maybe normalization flow can used in point cloud directly?
Thanks for your excellent work!
I'm wondering if there are codes for conducting 3D-only I-AURCO experiments. Or can you briefly describe how you conduct 3D-only experiments?
Hi @marco-rudolph ,
Thank you for your amazing repo and super work. I really loved the paper.
I trained AST on carpet class from MVTEC dataset and the results on bad data was extremely good , the localizations were on par with the GT.
However, when I gave a good image as input there were multiple false positives, ideally it should not be.
Could you please explain why and also if there is something I am doing wrong?
Hi,
Firstly, I would like to extend my gratitude for your remarkable work on this project. It's truly impressive and has been very helpful.
I recently encountered an issue while running the preprocess.py script and hoped you might be able to provide some guidance. The following runtime warnings were triggered:
preprocess.py:32: RuntimeWarning: invalid value encountered in true_divide
Code: upper_left = np.sum(img[:2, :2]) / np.sum(img[:2, :2] > 0)
preprocess.py:33: RuntimeWarning: invalid value encountered in true_divide
Code: upper_right = np.sum(img[-2:, :2]) / np.sum(img[-2:, :2] > 0)
preprocess.py:34: RuntimeWarning: invalid value encountered in true_divide
Code: lower_left = np.sum(img[:2, -2:]) / np.sum(img[:2, -2:] > 0)
preprocess.py:35: RuntimeWarning: invalid value encountered in true_divide
Code: lower_right = np.sum(img[-2:, -2:]) / np.sum(img[-2:, -2:] > 0)
These warnings seem to suggest an issue with dividing by zero or encountering an invalid value. I'm unsure how to resolve this and would greatly appreciate any advice or guidance you could offer.
Thank you very much for your time and assistance.
Thank you for excellent work! But when I run this code, I meet some bugs:
When I train teacher model, I meet this bug: RuntimeWarning: invalid value encountered in float_scalars. The train loss is NaN.
I didn't change the code.
In the paper
We discard the x and y coordinates due to the low informative content and use only the depth component z in centimeters. Missing depth values are repeatedly filled by using the average value of valid pixels
I think operation is taking the the third channel of the 3d image, why the depth values will miss?
Hi, @marco-rudolph
Good morning, I am back again. I would like to ask you some general questions
As I know, there are several method for Anomaly detection, such as Image Reconstruction, Normalize flow, Student-Teacher Network and memory bank based (like Patchcore). The research in this field is flourishing and tends to be saturated. I want to compare Student-Teacher Networks with Memory bank based method. I think Student-Techear Network is more worth studying than memory banks, because when inference memory bank cost some memory and it will find some similar feature, so it will cost some time. On the contrary, Student-Teacher Network directly use feature distance and do not need memory bank, so it is more efficient , Do you think my opinion is correct?
Best
Limao
Hello, it seems that your code did not process the MVTec-AD data set during the evaluation, and there is no folder good in ground_truth, it will report an error, how did you deal with it?
Is it possible to print the variable that holds the value of the anomaly score, of each image
at evaluation stage.
I could not find the name of such variable.
Thanks Marco.
Hi, @marco-rudolph, how is going recently:)
Should I set the same batchsize and learning rate for all category in the dataset?
In academic paper, Is it necessary that setting the same learning rate to demonstrate the effectiveness of the model?
Limao
Best wishes!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.