🧠DETR Interpretability Dashboard with Controls
How to use this dashboard
- Upload an image using the left panel. The model will run object detection and list detected objects. Try imageNet
- Use the "Confidence Threshold" slider to filter detections by score. Detections below the threshold are hidden.
- Pick a detection from the dropdown to generate explanations for that object.
- Choose between
Grad-CAM
andGrad-CAM++
(Grad-CAM++ often gives sharper, more localized maps). MC Dropout Samples
controls how many stochastic forward passes are used to estimate prediction uncertainty. More samples give smoother estimates but take longer.Dropout Probability
sets the dropout rate used during MC Dropout; higher values typically increase predicted uncertainty.
Tooltips are provided on each control (hover or focus) for quick hints.
Pick a detection for explanation
0 1
1 100
0 0.9
Control tooltips (quick reference)
- Confidence Threshold: Filter out detections with confidence below this value.
- Grad-CAM Variant: Choose the gradient-based visualization method. Grad-CAM++ may highlight smaller regions more precisely.
- MC Dropout Samples: Number of stochastic forward passes for uncertainty estimation. Increase for more stable results.
- Dropout Probability: Dropout rate used during MC Dropout sampling. Higher values typically increase predictive variance.
- Pick a detection: Select which detected object to explain. Format shown as 'index: label (score)'.
Key interpretability choices & why they matter
- Baseline (Integrated Gradients): Defines what 'no signal' looks like. Black (zeros) is simple, but blurred or neutral baselines may give more meaningful attributions.
- Which conv layer for Grad-CAM: Early layers give fine texture but low semantics; very late layers are coarse. A late backbone conv (default used) is a good compromise.
- Number of MC Dropout samples: More samples = smoother, more stable uncertainty estimates, but higher compute cost.
- Grad-CAM vs Grad-CAM++: Grad-CAM++ can be sharper and better for overlapping instances; vanilla Grad-CAM is faster and simpler.
Further reading (recommended)
- Grad-CAM — Selvaraju et al., 2017 (arXiv) — the original Grad-CAM paper; explains the core idea of gradient-weighted localization.
- Grad-CAM++ — Chattopadhay et al. — an improved variant that often produces sharper maps and handles multiple instances better.
- Visualizing the Impact of Feature Attribution Baselines (Distill) — an accessible deep dive on baseline choices for Integrated Gradients.
- Captum docs — IntegratedGradients — practical API notes for baseline, n_steps, and convergence delta.
- Constructing sensible baselines for Integrated Gradients — discussion and techniques for choosing baselines beyond a black image.
- A New Baseline Assumption of Integrated Gradients Based on Shapley Values — recent research on improved baselines.