cnulab / RealNet

Offical implementation of "RealNet: A Feature Selection Network with Realistic Synthetic Anomaly for Anomaly Detection (CVPR 2024)"
MIT License
237 stars 14 forks source link

if i want The training input data is four channels, because my six-channel data is spliced ​​from six single-channel 2D images. How should I modify the code? I do not have a mask annotation file. Can I use this code? #66

Open watertianyi opened 3 weeks ago

cnulab commented 3 weeks ago

No, this code can only handle 3-channel images. You should convert your data to 3-channel images first.

watertianyi commented 1 week ago

@cnulab Hello author, if I use real abnormal data for reasoning, I hope to get a heat map of the abnormal image. The color of the defect can be distinguished in the heat map. Is this code suitable?

watertianyi commented 1 week ago
@cnulab Hello, author, I only have 190 normal samples, more than 200 abnormal data, and no mask annotation data. I am combining three single-channel grayscale images into one 3-channel image input I followed the steps below and encountered some problems. I would like to ask you for advice. 1.train_diffusion.py Can't you see that there are no abnormal data in the generated data? 2.train_classifier.py Are the results below normal? [2024-11-06 11:50:18,206][train_classifier.py][line: 191][ INFO] Epoch: [985/1000] Iter: [4921/5000] Loss 0.00000 (0.00000)
[2024-11-06 11:50:21,618][train_classifier.py][line: 117][ INFO] Top 1 acc 1.00000 [2024-11-06 11:50:36,752][train_classifier.py][line: 191][ INFO] Epoch: [989/1000] Iter: [4941/5000] Loss 0.00000 (0.00000)
[2024-11-06 11:50:45,039][train_classifier.py][line: 117][ INFO]
Top 1 acc 1.00000 [2024-11-06 11:50:55,849][train_classifier.py][line: 191][ INFO] Epoch: [993/1000] Iter: [4961/5000] Loss 0.00000 (0.00000)
[2024-11-06 11:51:08,534][train_classifier.py][line: 117][ INFO] Top 1 acc 1.00000 [2024-11-06 11:51:14,722][train_classifier.py][line: 191][ INFO] Epoch: [997/1000] Iter: [4981/5000] Loss 0.00000 (0.00000)
[2024-11-06 11:51:31,838][train_classifier.py][line: 117][ INFO]
Top 1 acc 1.00000 3.sample.py
The generated data is also normal data, and no abnormal data is seen. What's going on? 4.train_realnet.py Evaluation indicators, what they represent, how to judge whether the effect is good or bad? "image": EvalImageMax, "pixel": EvalPixelAUC, "pro":EvalPixelPro,
clsname image pixel pro
0.939277 0.751351 0.200575