Example of a “car vs not car” model, highlighting the learned “features” of a car
.h5
format) for your Edge Impulse project.Custom block overview
Custom block edit
.h5
model
To use your custom block within your project, head to the Deployment page and select the Grad-CAM visualization option, the output will be a .zip
file containing your test dataset with the Grad-Cam overlay.
alpha
, pooling-gradients
, and heatmap-normalization
.
--alpha
)alpha
parameter controls the transparency of the Grad-CAM overlay when it is superimposed on the original image.
Default Value: 0.4
Range:
0
and 1
.
0
: Fully transparent (only the original image is visible).1
: Fully opaque (only the Grad-CAM overlay is visible).0.4
):
Provides a balance between showing the original image and highlighting the Grad-CAM heatmap.> 0.5
):
Use this if you want the Grad-CAM heatmap to dominate the visualization.< 0.4
):
Use this if you want the original image to be more prominent.--pooling-gradients
)pooling-gradients
parameter determines how gradients (importance signals) are combined across the spatial dimensions of the last convolutional layer to generate the heatmap.
Options:
mean
(default):
sum_abs
:
mean
for a smoother and more generalized heatmap.sum_abs
if you want to emphasize the most critical regions (e.g., sharp object boundaries).sum_abs
is often more useful for regression tasks, as it highlights features contributing to extreme values.--heatmap-normalization
)heatmap-normalization
parameter determines how the heatmap values are scaled for visualization.
Options:
percentile
(default):
0
and 1
based on their maximum value.simple
:
percentile
):
simple
:
threshold = 0.1
) as needed for your use case.