@@ -154,46 +154,45 @@ class CV_EXPORTS_W StaticSaliencyFineGrained : public StaticSaliency
154
154
void getIntensity (Mat srcArg, Mat dstArg, Mat dstOnArg, Mat dstOffArg, bool generateOnOff);
155
155
};
156
156
157
- /* * @brief the Deep Gaze 1 Saliency approach from @cite
157
+ /* * @brief the Deep Gaze 1 Saliency approach from
158
158
159
159
This method use the convolution layers of the pretrained AlexNet, linear combination, center bias and softmax to generate saliency map
160
160
*/
161
-
162
161
class CV_EXPORTS_W DeepGaze1 : public StaticSaliency
163
162
{
164
163
private:
165
- dnn::Net net;
166
- std::vector<std::string> layers_names;
167
- std::vector<double > weights;
164
+ dnn::Net net;
165
+ std::vector<std::string> layers_names;
166
+ std::vector<double > weights;
168
167
169
168
public:
170
- DeepGaze1 ();
171
- DeepGaze1 (std::string, std::string, std::vector<std::string>, unsigned );
172
- virtual ~DeepGaze1 ();
173
- CV_WRAP static Ptr<DeepGaze1> create ()
174
- {
175
- return makePtr<DeepGaze1>();
176
- }
177
- bool computeSaliency (InputArray image, OutputArray saliencyMap)
178
- {
179
- if (image.empty ())
180
- return false ;
181
- return computeSaliencyImpl (image, saliencyMap);
182
- }
183
- Mat saliencyMapGenerator (Mat, Size = Size(227 , 227 ));
184
- void training (std::vector<Mat>&, std::vector<Mat>&, unsigned = 100 , double = 0.9 , double = 0.01 , double = 0.01 , Size = Size(227 , 227 ));
185
- double computeAUC (InputArray _saliencyMap, InputArray _fixtionMap);
186
- 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 );
187
186
protected:
188
- bool computeSaliencyImpl (InputArray image, OutputArray saliencyMap);
189
- std::vector<Mat> featureMapGenerator (Mat, Size);
190
- static Mat comb (std::vector<Mat>&, std::vector<double >);
191
- static Mat softmax (Mat);
192
- static std::vector<double > evalGrad (std::vector<Mat>&, std::vector<unsigned >&, std::vector<double >, Size);
193
- std::vector<unsigned > batchIndex (unsigned , unsigned );
194
- static double loss (std::vector<double >, std::vector<double >);
195
- static std::vector<double > mapSampler (Mat, std::vector<unsigned >);
196
- 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 );
197
196
};
198
197
199
198
0 commit comments