class
ImageClassificationNetworkImage classification neural network.
Contents
- Reference
This class is a convenience class for a neural network which performs image classification. Use setLabels method to define the class names. The output is then ImageClassification which is a map from class names to confidence values.
Base classes
- class NeuralNetwork
- Neural network process object.
Public functions
- auto create(std::string modelFilename, std::vector<std::string> labels, float scaleFactor, float meanIntensity, float stanardDeviationIntensity, int temporalWindow, std::vector<NeuralNetworkNode> inputNodes, std::vector<NeuralNetworkNode> outputNodes, std::string inferenceEngine, std::vector<std::string> customPlugins) -> std::shared_ptr<ImageClassificationNetwork>
- Create instance Python friendly constructor with almost all parameters.
- auto create(std::string modelFilename, std::vector<NeuralNetworkNode> inputNodes, std::vector<NeuralNetworkNode> outputNodes, std::string inferenceEngine, std::vector<std::string> customPlugins) -> std::shared_ptr<ImageClassificationNetwork>
- Create instance C++ friendly create with parameters that must be set before loading.
- void setTemporalWindow(int window)
- void setLabels(std::vector<std::string> labels)
- void loadAttributes() virtual
Private functions
- void execute() virtual
Function documentation
std::shared_ptr<ImageClassificationNetwork> fast:: ImageClassificationNetwork:: create(std::string modelFilename,
std::vector<std::string> labels,
float scaleFactor,
float meanIntensity,
float stanardDeviationIntensity,
int temporalWindow,
std::vector<NeuralNetworkNode> inputNodes,
std::vector<NeuralNetworkNode> outputNodes,
std::string inferenceEngine,
std::vector<std::string> customPlugins)
Create instance Python friendly constructor with almost all parameters.
Parameters | |
---|---|
modelFilename | Path to model to load |
labels | |
scaleFactor | A value which is multiplied with each pixel of input image before it is sent to the neural network. Use this to scale your pixels values. Default: 1.0 |
meanIntensity | Mean intensity to subtract from each pixel of the input image |
stanardDeviationIntensity | |
temporalWindow | Temporal window to average results over. |
inputNodes | Specify names, and potentially shapes, of input nodes. Not necessary unless you only want to use certain inputs or specify the input shape manually. |
outputNodes | Specify names, and potentially shapes, of output nodes to use. Not necessary unless you only want to use certain outputs or specify the output shape manually. |
inferenceEngine | Specify which inference engine to use (TensorFlow, TensorRT, OpenVINO). By default, FAST will select the best inference engine available on your system. |
customPlugins | Specify path to any custom plugins/operators to load |
Returns | instance |
std::shared_ptr<ImageClassificationNetwork> fast:: ImageClassificationNetwork:: create(std::string modelFilename,
std::vector<NeuralNetworkNode> inputNodes,
std::vector<NeuralNetworkNode> outputNodes,
std::string inferenceEngine,
std::vector<std::string> customPlugins)
Create instance C++ friendly create with parameters that must be set before loading.
Parameters | |
---|---|
modelFilename | Path to model to load |
inputNodes | Specify names, and potentially shapes, of input nodes. Not necessary unless you only want to use certain inputs or specify the input shape manually. |
outputNodes | Specify names, and potentially shapes, of output nodes to use. Not necessary unless you only want to use certain outputs or specify the output shape manually. |
inferenceEngine | Specify which inference engine to use (TensorFlow, TensorRT, OpenVINO). By default, FAST will select the best inference engine available on your system. |
customPlugins | Specify path to any custom plugins/operators to load |
Returns | instance |