@@ -161,38 +161,38 @@ This method use the convolution layers of the pretrained AlexNet, linear combina
161
161
class CV_EXPORTS_W DeepGaze1 : public StaticSaliency
162
162
{
163
163
private:
164
- dnn::Net net;
165
- std::vector<std::string> layers_names;
166
- std::vector<double > weights;
164
+ dnn::Net net;
165
+ std::vector<std::string> layers_names;
166
+ std::vector<double > weights;
167
167
168
168
public:
169
- DeepGaze1 ();
170
- DeepGaze1 (std::string, std::string, std::vector<std::string>, unsigned );
171
- virtual ~DeepGaze1 ();
172
- CV_WRAP static Ptr<DeepGaze1> create ()
173
- {
174
- return makePtr<DeepGaze1>();
175
- }
176
- CV_WRAP bool computeSaliency (InputArray image, OutputArray saliencyMap)
177
- {
178
- if (image.empty ())
179
- return false ;
180
- return computeSaliencyImpl (image, saliencyMap);
181
- }
182
- Mat saliencyMapGenerator (Mat, Size = Size(227 , 227 ));
183
- void training (std::vector<Mat>&, std::vector<Mat>&, unsigned = 100 , double = 0.9 , double = 0.01 , double = 0.01 , Size = Size(227 , 227 ));
184
- double computeAUC (InputArray _saliencyMap, InputArray _fixtionMap);
185
- void saliencyMapVisualize (InputArray _saliencyMap);
169
+ DeepGaze1 ();
170
+ DeepGaze1 ( std::string, std::string, std::vector<std::string>, unsigned );
171
+ virtual ~DeepGaze1 ();
172
+ CV_WRAP static Ptr<DeepGaze1> create ()
173
+ {
174
+ return makePtr<DeepGaze1>();
175
+ }
176
+ CV_WRAP bool computeSaliency ( InputArray image, OutputArray saliencyMap )
177
+ {
178
+ if ( image.empty () )
179
+ return false ;
180
+ return computeSaliencyImpl ( image, saliencyMap );
181
+ }
182
+ Mat saliencyMapGenerator ( Mat, Size = Size(227 , 227 ) );
183
+ void training ( std::vector<Mat>&, std::vector<Mat>&, unsigned = 100 , double = 0.9 , double = 0.01 , double = 0.01 , Size = Size(227 , 227 ) );
184
+ double computeAUC ( InputArray _saliencyMap, InputArray _fixtionMap );
185
+ void saliencyMapVisualize ( InputArray _saliencyMap );
186
186
protected:
187
- bool computeSaliencyImpl (InputArray image, OutputArray saliencyMap);
188
- std::vector<Mat> featureMapGenerator (Mat, Size);
189
- static Mat comb (std::vector<Mat>&, std::vector<double >);
190
- static Mat softmax (Mat);
191
- static std::vector<double > evalGrad (std::vector<Mat>&, std::vector<unsigned >&, std::vector<double >, Size);
192
- std::vector<unsigned > batchIndex (unsigned , unsigned );
193
- static double loss (std::vector<double >, std::vector<double >);
194
- static std::vector<double > mapSampler (Mat, std::vector<unsigned >);
195
- std::vector<unsigned > fixationLoc (Mat, Size);
187
+ bool computeSaliencyImpl ( InputArray image, OutputArray saliencyMap );
188
+ std::vector<Mat> featureMapGenerator ( Mat, Size );
189
+ static Mat comb ( std::vector<Mat>&, std::vector<double > );
190
+ static Mat softmax ( Mat );
191
+ static std::vector<double > evalGrad ( std::vector<Mat>&, std::vector<unsigned >&, std::vector<double >, Size );
192
+ std::vector<unsigned > batchIndex ( unsigned , unsigned );
193
+ static double loss ( std::vector<double >, std::vector<double > );
194
+ static std::vector<double > mapSampler ( Mat, std::vector<unsigned > );
195
+ std::vector<unsigned > fixationLoc ( Mat, Size );
196
196
};
197
197
198
198
0 commit comments