How to make predictions
See original GitHub issueAnother comment on this. If you want the raw pixel values of the heatmaps that are generated, you can find these in the “tims” directory and load them via
torch.load("heatmaps_paper_global_lbl0.pth")
. If you want a script that loads the snapshot of a model and generates pixel-wise anomaly score tensors, I added such an implementation here. I hope this helps.
I have run run_prediction_with_snapshot.py, and get the all_anomaly_scores tensor,but how to judge whether it is abnormal through pixel-wise anomaly score tensors? and how to get the heat map through the run_prediction_with_snapshot.py method?
_Originally posted by @opentld in https://github.com/liznerski/fcdd/issues/15#issuecomment-955158932_
another question: I only put one picture,and the path is shown in the figure: then I ran python runners/run_custom.py --supervise-mode unsupervised --it 1 -e 0 --load …/…/data/test/model/snapshot.pt --net FCDD_CNN224_VGG_F Get the following result: heatmaps_global.png as shown: heatmaps_paper_global_lbl0.png: heatmaps_paper_global_lbl1.png: heatmaps_paper_local_lbl0.png: heatmaps_paper_local_lbl1.png: train_heatmaps_global.png:
so, why does run_custom.py try to process all the classes? For example, I did not place the cable picture, but it still generates normal_1? I just want to perform anomaly detection on the bottle image I set, and get its classification result and heat map. How can I do it?
_Originally posted by @opentld in https://github.com/liznerski/fcdd/issues/15#issuecomment-955161257_
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (5 by maintainers)
Top GitHub Comments
I tested all positive samples, the maximum value is 0.0495, which corresponds to this picture:
It seems that the ring shadow caused the higher score,you can also think of it as an anomaly 😉
Commented in #2