gradcamMap = sum(featureMap .* sum(dScoresdMap, [1 2]), 3);
gradcamMap = extractdata(gradcamMap);
gradcamMap = rescale(gradcamMap);
subplot(3,4,i)
imshow(img);title(classfn)
hold on;
subplot(3,4,i)
imagesc(imresize(gradcamMap,inputSize(1:2) ,'Method', 'bicubic'),'AlphaData',0.5);
colormap jet
hold off;
end
🎉3参考文献
部分理论来源于网络,如有侵权请联系删除。
1\] Iandola, Forrest N., Song Han, Matthew W. Moskewicz, Khalid Ashraf, William J. Dally, and Kurt Keutzer. "SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and \<0.5 MB model size." arXiv preprint arXiv:1602.07360 (2016).
\[2\] Matlab Documentation: Train Deep Learning Network to Classify New Images
\[3\] Matlab Documentation: Grad-CAM Reveals the Why Behind Deep Learning Decisions
\[4\] Zhang, Lei, et al. "Road crack detection using deep convolutional neural network." 2016 IEEE international conference on image processing (ICIP). IEEE, 2016.
## [🌈](https://mp.weixin.qq.com/mp/appmsgalbum?__biz=Mzk0MDMzNzYwOA==&action=getalbum&album_id=2591810113208958977#wechat_redirect "🌈")****4 Matlab代码实现****