Skip to content
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

XAI classification notebook update #22

Conversation

GalyaZalesskaya
Copy link
Contributor

What was done:

  • Updated structure according to Mark and Minje
    image
  • Updated calls according to updated API
  • Updated comments & text
  • Fixed overlay issue

Issues:

  • explanation = explainer(image, target_explain_group=TargetExplainGroup.ALL) fails with error: OpenCV(4.9.0) /io/opencv/modules/imgproc/src/resize.cpp:3789: error: (-215:Assertion failed) !dsize.empty() in function 'resize'

TODO:

  • Update README: update structure, add reciprocam arxiv link
  • Substitute loading tests/assets/cheetah_person.jpg image with wget link (can be done during PR to OV_notebooks)
  • Fix minor text issues
  • Update pypl modules for numpy 2.0 to compile
  • Check that target_layer for MobiilenetV3 is correct. It returns correct values, but it's not the last conv layer

Question:

  • Do we need Advanced section and Insert XAI branch section
  • There's duplicated code
# Check saved saliency maps
print(f"Saliency maps were generated for the following classes: {list(explanation.saliency_map.keys())}")
print(f"Saliency map size: {explanation.shape}")

# Show saliency maps for cheetah class
cheetah_raw_sal_map = explanation.saliency_map[cheetah_class_index]
cheetah_raw_sal_map = cv2.cvtColor(cheetah_raw_sal_map, cv2.COLOR_BGR2RGB)

plt.imshow(cheetah_raw_sal_map)
plt.show()

Can be moved to xai.utils as get_sal_map_info for better readability

@GalyaZalesskaya GalyaZalesskaya changed the base branch from develop to releases/1.0.0 June 17, 2024 19:04
@goodsong81 goodsong81 added this to the 1.0.0 milestone Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants