6
6
#include < opencv2/imgproc.hpp>
7
7
#include < opencv2/highgui.hpp>
8
8
#include < opencv2/saliency.hpp>
9
- #include " opencv2/datasets/saliency_mit1003.hpp"
9
+ // #include < opencv2/datasets/saliency_mit1003.hpp>
10
10
#include < vector>
11
11
#include < string>
12
12
#include < iostream>
@@ -16,7 +16,7 @@ using namespace std;
16
16
using namespace cv ;
17
17
using namespace cv ::dnn;
18
18
using namespace cv ::saliency;
19
- using namespace cv ::datasets;
19
+ // using namespace cv::datasets;
20
20
/* Find best class for the blob (i. e. class with maximal probability) */
21
21
22
22
int main ()
@@ -29,20 +29,21 @@ int main()
29
29
// ALLSTIMULI folder store images
30
30
// ALLFIXATIONMAPS foler store training eye fixation
31
31
// ************ Code only work in linux platform ****
32
- string dataset_path;
32
+
33
+ /* string dataset_path;
33
34
34
35
cin >> dataset_path;
35
36
Ptr<SALIENCY_mit1003> datasetConnector = SALIENCY_mit1003::create();
36
37
datasetConnector->load( dataset_path );
37
38
vector<vector<Mat> > dataset( datasetConnector->getDataset() );
38
39
39
- // g.training( dataset[0], dataset[1] );
40
-
40
+ g.training( dataset[0], dataset[1] );
41
+ */
41
42
ofstream file;
42
43
Mat res2;
43
- g.computeSaliency ( dataset[ 0 ][ 0 ] , res2 );
44
+ g.computeSaliency ( imread ( " ALLSTIMULI/i05june05_static_street_boston_p1010764.jpeg " ) , res2 );
44
45
resize ( res2, res2, Size ( 1024 , 768 ) );
45
- cout << " AUC = " << g.computeAUC ( res2, dataset[ 1 ][ 0 ] ) << endl;
46
+ cout << " AUC = " << g.computeAUC ( res2, imread ( " ALLFIXATIONMAPS/i05june05_static_street_boston_p1010764_fixMap.jpg " , 0 ) ) << endl; ;
46
47
g.saliencyMapVisualize ( res2 );
47
48
file.open ( " saliency.csv" );
48
49
for ( int i = 0 ; i < res2.rows ; i++)
0 commit comments