Bjoern Froehlich 12 жил өмнө
parent
commit
14e4d40b61

+ 1 - 1
semseg/SemSegCsurka.cpp

@@ -11,7 +11,7 @@ using namespace NICE;
 using namespace OBJREC;
 
 #undef DEBUG_CSURK
-#undef UNCERTAINTY
+#define UNCERTAINTY
 
 SemSegCsurka::SemSegCsurka ( const Config *conf,
                              const MultiDataset *md )

+ 12 - 0
semseg/SemSegNovelty.cpp

@@ -284,6 +284,9 @@ void SemSegNovelty::semanticseg ( CachedExample *ce, NICE::Image & segresult, NI
   uncert.set ( 0.0 );
 
   double maxunc = -numeric_limits<double>::max();
+  double minunc = numeric_limits<double>::max();
+  double maxprob = -numeric_limits<double>::max();
+  double minprob = numeric_limits<double>::max();
   timer.stop();
   cout << "first: " << timer.getLastAbsolute() << endl;
   timer.start();
@@ -316,6 +319,10 @@ void SemSegNovelty::semanticseg ( CachedExample *ce, NICE::Image & segresult, NI
           for ( int j = 0 ; j < cr.scores.size(); j++ )
           {
             probabilities ( xl, yl, j ) = cr.scores[j];
+            if (maxprob < cr.scores[j])
+              maxprob = cr.scores[j];
+            if (minprob > cr.scores[j])
+              minprob = cr.scores[j];
           }
           segresult ( xl, yl ) = cr.classno;
           uncert ( xl, yl ) = cr.uncertainty;
@@ -324,6 +331,8 @@ void SemSegNovelty::semanticseg ( CachedExample *ce, NICE::Image & segresult, NI
 
       if (maxunc < cr.uncertainty)
         maxunc = cr.uncertainty;
+      if (minunc > cr.uncertainty)
+        minunc = cr.uncertainty;
       example.svec->clear();
     }
     delete example.svec;
@@ -331,6 +340,9 @@ void SemSegNovelty::semanticseg ( CachedExample *ce, NICE::Image & segresult, NI
   }
 
   cout << "maxunertainty: " << maxunc << endl;
+  cout << "minunertainty: " << minunc << endl;
+  cout << "maxprob: " << maxprob << endl;
+  cout << "minprob: " << minprob << endl;
 
   timer.stop();
   cout << "second: " << timer.getLastAbsolute() << endl;