public class ScoreCAM extends AbstractCNNSaliencyMapGenerator
| Constructor and Description |
|---|
ScoreCAM() |
| Modifier and Type | Method and Description |
|---|---|
java.awt.image.BufferedImage |
generateHeatmapToImage(int[] targetClasses,
java.lang.String[] classMap,
boolean normalize)
Generates heatmaps for the supplied classes, returning a human-viewable heatmap summary.
|
org.deeplearning4j.nn.conf.inputs.InputType.InputTypeConvolutional |
getModelInputShape() |
java.awt.image.BufferedImage |
imageFromINDArray(org.nd4j.linalg.api.ndarray.INDArray array)
Takes an INDArray containing an image loaded using the native image loader
libraries associated with DL4J, and converts it into a BufferedImage.
|
void |
processImage(java.io.File imageFile)
Main processing entrypoint.
|
void |
setModelInputShape(org.deeplearning4j.nn.conf.inputs.InputType.InputTypeConvolutional modelInputShape) |
addIterationIncrementListener, addIterationsFinishedListeners, addIterationsStartedListener, getBatchSize, getComputationGraph, getImagePreProcessingScaler, getInputFilename, getModelName, isImageChannelsLast, setBatchSize, setComputationGraph, setImageChannelsLast, setImagePreProcessingScaler, setInputFilename, setModelNamepublic void processImage(java.io.File imageFile)
AbstractCNNSaliencyMapGeneratorprocessImage in class AbstractCNNSaliencyMapGeneratorimageFile - File to process into saliency map.public java.awt.image.BufferedImage generateHeatmapToImage(int[] targetClasses,
java.lang.String[] classMap,
boolean normalize)
AbstractCNNSaliencyMapGeneratorgenerateHeatmapToImage in class AbstractCNNSaliencyMapGeneratortargetClasses - Classes to generate saliency maps for.classMap - Appropriate class map for the supplied classes.normalize - Should we normalize the heatmap?public org.deeplearning4j.nn.conf.inputs.InputType.InputTypeConvolutional getModelInputShape()
getModelInputShape in class AbstractCNNSaliencyMapGeneratorpublic void setModelInputShape(org.deeplearning4j.nn.conf.inputs.InputType.InputTypeConvolutional modelInputShape)
setModelInputShape in class AbstractCNNSaliencyMapGeneratorpublic java.awt.image.BufferedImage imageFromINDArray(org.nd4j.linalg.api.ndarray.INDArray array)
array - INDArray containing an image in order [N, C, H, W] or [C, H, W]