focal.grad_cam module¶
This module defines the logic for displaying heatmaps for an image to view where the CNN model is focusing on.
- class focal.grad_cam.GradCAM(model_path: str, image_folder: str, class_index: int | None = 0, backbone: str | None = None, conv_layer_name: str | None = None)[source]¶
Bases:
object- compute_all_heatmaps(save_path: str) None[source]¶
Computes heatmaps for a number of images.
- Parameters:
save_path – path to save the computed heatmap plot