public abstract class AbstractCNNSaliencyMapGenerator
extends java.lang.Object
Constructor and Description |
---|
AbstractCNNSaliencyMapGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
addIterationIncrementListener(IterationIncrementListener listener)
Add an event listener to the iterations increment event.
|
void |
addIterationsFinishedListeners(IterationsFinishedListener listener)
Add an event listener to the iterations finished event.
|
void |
addIterationsStartedListener(IterationsStartedListener listener)
Add an event listener to the iterations started event.
|
abstract 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.
|
int |
getBatchSize() |
org.deeplearning4j.nn.graph.ComputationGraph |
getComputationGraph() |
org.nd4j.linalg.dataset.api.preprocessor.ImagePreProcessingScaler |
getImagePreProcessingScaler() |
java.lang.String |
getInputFilename() |
org.deeplearning4j.nn.conf.inputs.InputType.InputTypeConvolutional |
getModelInputShape() |
java.lang.String |
getModelName() |
boolean |
isImageChannelsLast() |
abstract void |
processImage(java.io.File imageFile)
Main processing entrypoint.
|
void |
setBatchSize(int batchSize) |
void |
setComputationGraph(org.deeplearning4j.nn.graph.ComputationGraph computationGraph) |
void |
setImageChannelsLast(boolean imageChannelsLast) |
void |
setImagePreProcessingScaler(org.nd4j.linalg.dataset.api.preprocessor.ImagePreProcessingScaler imagePreProcessingScaler) |
void |
setInputFilename(java.lang.String inputFilename) |
void |
setModelInputShape(org.deeplearning4j.nn.conf.inputs.InputType.InputTypeConvolutional modelInputShape) |
void |
setModelName(java.lang.String modelName) |
public abstract void processImage(java.io.File imageFile)
imageFile
- File to process into saliency map.public abstract java.awt.image.BufferedImage generateHeatmapToImage(int[] targetClasses, java.lang.String[] classMap, boolean normalize)
targetClasses
- Classes to generate saliency maps for.classMap
- Appropriate class map for the supplied classes.normalize
- Should we normalize the heatmap?public void addIterationsStartedListener(IterationsStartedListener listener)
listener
- Listener to call when iterations start.public void addIterationIncrementListener(IterationIncrementListener listener)
listener
- Listener to call when iterations increment.public void addIterationsFinishedListeners(IterationsFinishedListener listener)
listener
- Listener to call when iterations finish.public org.deeplearning4j.nn.graph.ComputationGraph getComputationGraph()
public void setComputationGraph(org.deeplearning4j.nn.graph.ComputationGraph computationGraph)
public int getBatchSize()
public void setBatchSize(int batchSize)
public org.nd4j.linalg.dataset.api.preprocessor.ImagePreProcessingScaler getImagePreProcessingScaler()
public void setImagePreProcessingScaler(org.nd4j.linalg.dataset.api.preprocessor.ImagePreProcessingScaler imagePreProcessingScaler)
public boolean isImageChannelsLast()
public void setImageChannelsLast(boolean imageChannelsLast)
public org.deeplearning4j.nn.conf.inputs.InputType.InputTypeConvolutional getModelInputShape()
public void setModelInputShape(org.deeplearning4j.nn.conf.inputs.InputType.InputTypeConvolutional modelInputShape)
public java.lang.String getModelName()
public void setModelName(java.lang.String modelName)
public java.lang.String getInputFilename()
public void setInputFilename(java.lang.String inputFilename)