question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to make predictions

See original GitHub issue

Another 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?

@liznerski

_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: image 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: image image heatmaps_global.png as shown: heatmaps_global heatmaps_paper_global_lbl0.png: heatmaps_paper_global_lbl0 heatmaps_paper_global_lbl1.png: heatmaps_paper_global_lbl1 heatmaps_paper_local_lbl0.png: heatmaps_paper_local_lbl0 heatmaps_paper_local_lbl1.png: heatmaps_paper_local_lbl1 train_heatmaps_global.png: train_heatmaps_global

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_

@liznerski

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
opentldcommented, Nov 8, 2021

image

I tested all positive samples, the maximum value is 0.0495, which corresponds to this picture:

141

It seems that the ring shadow caused the higher score,you can also think of it as an anomaly 😉

0reactions
liznerskicommented, Nov 9, 2021

Commented in #2

Read more comments on GitHub >

github_iconTop Results From Across the Web

5 Ways to Teach Making Predictions in Reading with ...
Making predictions is a critical reading comprehension strategy to teach and practice with students. It requires students to use what they ...
Read more >
Making Predictions: A Strategy for Reading and Science ...
Making predictions is a strategy in which readers use information from a text (including titles, headings, pictures, and diagrams) and their own personal ......
Read more >
4 Ideas for Teaching How to Make Predictions - Amy Lemons
Four ways I accomplish this style of teaching how to make predictions are by using predicting bookmarks, sharing a chant, utilizing reading passages,...
Read more >
4 Simple Ways to Teach Students to Make Meaningful ...
4 Simple Ways to Teach Students to Make Meaningful Predictions · Be an active and alert reader. · Anticipate the next event and...
Read more >
How To Teach Students to Make Predictions While They Read
Predicting requires the reader to do two things: 1) use clues the author provides in the text, and 2) use what he/she knows...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found