-
Notifications
You must be signed in to change notification settings - Fork 798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update OV-XAI #2394
base: latest
Are you sure you want to change the base?
Update OV-XAI #2394
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
View / edit / reply to this conversation on ReviewNB GalyaZalesskaya commented on 2024-09-17T16:55:20Z Line #2. data=input_image, we don't want to introduce "Overlay is applied over the image in negvet commented on 2024-09-18T13:07:16Z Right, good point, will update |
View / edit / reply to this conversation on ReviewNB GalyaZalesskaya commented on 2024-09-17T16:55:20Z Line #5. overlay=True, # optional, saliency map overlay over the input image, defaults to False saliency map overlays over the input image, default to False |
View / edit / reply to this conversation on ReviewNB GalyaZalesskaya commented on 2024-09-17T16:55:22Z Line #3. targets=retriever_class_index, # can be a single target or a container of targets list of targets negvet commented on 2024-09-18T13:06:50Z not only list, tuple or numpy.array also would work here. That is why I use general term - container |
View / edit / reply to this conversation on ReviewNB GalyaZalesskaya commented on 2024-09-17T16:55:23Z Line #4. overlay=True, # Saliency map overlay over the original image, False by default, set to True for better visual inspection As I see in this notebook, the inline comments start with small letters (not capital). Can you please check the consistency here and further? negvet commented on 2024-09-18T13:09:11Z Sure, will fix |
View / edit / reply to this conversation on ReviewNB GalyaZalesskaya commented on 2024-09-17T16:55:23Z Line #8. # Visualize generated saliency maps for each target class (.plot() supports plotting multiple saliency maps)
|
View / edit / reply to this conversation on ReviewNB GalyaZalesskaya commented on 2024-09-17T16:55:24Z Line #4. print(f"Saliency maps were generated for {len(explanation.targets)} classes: ") Now I can relate to your comment that output cells are too big. Let's just leave a number of classes for which saliency maps were generated. negvet commented on 2024-09-18T13:14:17Z Will fix |
View / edit / reply to this conversation on ReviewNB GalyaZalesskaya commented on 2024-09-17T16:55:25Z Line #13. explanation.save(output) What do you think about simplifying it?: explanation.save(output, "grayscale_") negvet commented on 2024-09-18T13:23:42Z I like this idea. Adopted |
View / edit / reply to this conversation on ReviewNB GalyaZalesskaya commented on 2024-09-17T16:55:26Z Line #7. target_layer="MobilenetV3/Conv_1/Conv2D", # Optional, by default insert_xai will try to find target_layer automatically
|
View / edit / reply to this conversation on ReviewNB GalyaZalesskaya commented on 2024-09-17T16:55:26Z Can you fix double spaces between "mode" and "treats" in the first sentence? |
View / edit / reply to this conversation on ReviewNB GalyaZalesskaya commented on 2024-09-17T16:55:27Z AISE is used as a default black-box method. AISE formulates saliency map generation as a kernel density estimation (KDE) problem, and adaptively samples the input masks using a derivative-free optimizer to maximize the mask saliency score |
View / edit / reply to this conversation on ReviewNB GalyaZalesskaya commented on 2024-09-17T16:55:28Z Please, leave a link to RISE paper negvet commented on 2024-09-18T13:25:57Z there is no link as for now GalyaZalesskaya commented on 2024-09-20T17:57:34Z Are we talking about the same RISE paper? [1806.07421] RISE: Randomized Input Sampling for Explanation of Black-box Models (arxiv.org) negvet commented on 2024-09-23T07:22:29Z Ah, sure, I misunderstood |
View / edit / reply to this conversation on ReviewNB GalyaZalesskaya commented on 2024-09-17T16:55:29Z Line #14. explanation.save(output, f"{Path(image_path).stem}_") # pass prefix name with underscore
|
View / edit / reply to this conversation on ReviewNB GalyaZalesskaya commented on 2024-09-17T16:55:30Z Block from L27-L37 can be removed by our great new
negvet commented on 2024-09-18T14:21:13Z Exactly, will use explanation.save() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the great update :)
AISE | ||
AISEClassification | ||
AISEDetection | ||
WHITEBOX | ||
BLACKBOX | ||
Netron | ||
KDE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't these names be organized alphabetically for the simplicity of adding new words?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, updated
@@ -25,22 +25,25 @@ Example: Saliency map for `flat-coated retriever` class for MobileNetV3 classifi | |||
|
|||
The tutorial consists of the following steps: | |||
|
|||
- Run explainer in Auto-mode | |||
- Run explainer in `Auto` mode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In L11-L12 here we talk only about IR models:
[OpenVINO™ Explainable AI (XAI)](https://github.com/openvinotoolkit/openvino_xai/) provides a suite of XAI algorithms for visual explanation of
[OpenVINO™](https://github.com/openvinotoolkit/openvino) Intermediate Representation (IR) models.
But now thanks to Songki, we have an option to insert_xai branch to PyTorch as well , even thought not to create Explainer
using it.
What do you think, should we mention PyTorch usecase in readmes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mentioned PyTorch
in the insert_xai
section
not only list, tuple or numpy.array also would work here. That is why I use general term - container View entire conversation on ReviewNB |
Right, good point, will update View entire conversation on ReviewNB |
Sure, will fix View entire conversation on ReviewNB |
Will fix View entire conversation on ReviewNB |
I like this idea. Adopted View entire conversation on ReviewNB |
there is no link as for now View entire conversation on ReviewNB |
Exactly, will use explanation.save() View entire conversation on ReviewNB |
Are we talking about the same RISE paper? [1806.07421] RISE: Randomized Input Sampling for Explanation of Black-box Models (arxiv.org) View entire conversation on ReviewNB |
View / edit / reply to this conversation on ReviewNB GalyaZalesskaya commented on 2024-09-20T18:03:19Z saliency_map_name_prefix = f"{image_name}_{gt_info}_pr_" saliency_map_name_postfix = "_" More details to names can be added (but not necessary) negvet commented on 2024-09-23T07:27:03Z Added |
Ah, sure, I misunderstood View entire conversation on ReviewNB |
Added View entire conversation on ReviewNB |
Align OV-XAI notebook with 1.1.0 release