Classifier Class Reference

#include <Classifier.h>

List of all members.

Public Member Functions

 Classifier (const string &model_file, const string &trained_file, const string &mean_file, const string &label_file)
std::vector< PredictionClassify (const cv::Mat &img, int N=5)

Private Member Functions

void SetMean (const string &mean_file)
std::vector< float > Predict (const cv::Mat &img)
void WrapInputLayer (std::vector< cv::Mat > *input_channels)
void Preprocess (const cv::Mat &img, std::vector< cv::Mat > *input_channels)

Private Attributes

shared_ptr< Net< float > > net_
cv::Size input_geometry_
int num_channels_
cv::Mat mean_
std::vector< string > labels_


Detailed Description

Definition at line 31 of file Classifier.h.


Constructor & Destructor Documentation

Classifier::Classifier ( const string &  model_file,
const string &  trained_file,
const string &  mean_file,
const string &  label_file 
)

Definition at line 31 of file Classifier.cpp.


Member Function Documentation

std::vector< Prediction > Classifier::Classify ( const cv::Mat &  img,
int  N = 5 
)

Definition at line 89 of file Classifier.cpp.

std::vector< float > Classifier::Predict ( const cv::Mat &  img  )  [private]

Definition at line 135 of file Classifier.cpp.

void Classifier::Preprocess ( const cv::Mat &  img,
std::vector< cv::Mat > *  input_channels 
) [private]

Definition at line 175 of file Classifier.cpp.

void Classifier::SetMean ( const string &  mean_file  )  [private]

Definition at line 105 of file Classifier.cpp.

void Classifier::WrapInputLayer ( std::vector< cv::Mat > *  input_channels  )  [private]

Definition at line 161 of file Classifier.cpp.


Member Data Documentation

cv::Size Classifier::input_geometry_ [private]

Definition at line 52 of file Classifier.h.

std::vector<string> Classifier::labels_ [private]

Definition at line 55 of file Classifier.h.

cv::Mat Classifier::mean_ [private]

Definition at line 54 of file Classifier.h.

shared_ptr<Net<float> > Classifier::net_ [private]

Definition at line 51 of file Classifier.h.

Definition at line 53 of file Classifier.h.


The documentation for this class was generated from the following files:

Generated on Wed Nov 9 19:52:25 2016 for NVIDIA Tegra Multimedia API Framework by  doxygen 1.5.8