فهرست منبع

modified semSegNovelty such that only raw images of every method will be written

Alexander Freytag 12 سال پیش
والد
کامیت
a185dc1456
1فایلهای تغییر یافته به همراه51 افزوده شده و 41 حذف شده
  1. 51 41
      semseg/SemSegNovelty.cpp

+ 51 - 41
semseg/SemSegNovelty.cpp

@@ -552,50 +552,60 @@ void SemSegNovelty::semanticseg ( CachedExample *ce, NICE::Image & segresult, NI
   out << uncertdir << "/" << list2.back();
   
   uncert.writeRaw(out.str() + ".rawfloat");
-  uncert(0, 0) = 0.0;
-  uncert(0, 1) = 1.0+gpNoise;
-  ICETools::convertToRGB ( uncert, imgrgb );
-  imgrgb.write ( out.str() + "rough.png" );
-
-  //invert images such that large numbers correspond to high impact, high variance, high importance, high novelty, ...
-  for ( int y = 0; y < ysize; y++)
-  {
-    for (int x = 0; x < xsize; x++)
-    {
-      gpUncertainty(x,y) =  maxGPUncertainty - gpUncertainty(x,y);
-      gpMean(x,y) = maxGPMean - gpMean(x,y);
-      gpMeanRatio(x,y) = maxGPMeanRatio - gpMeanRatio(x,y);
-      gpWeightRatio(x,y) = maxGPWeightRatio - gpWeightRatio(x,y);
-    }
-  }
   
+  gpUncertainty.writeRaw(out.str() + "_gpUncertainty.rawfloat");
+  gpMean.writeRaw(out.str() + "_gpMean.rawfloat");
+  gpMeanRatio.writeRaw(out.str() + "_gpMeanRatio.rawfloat");
+  gpWeightAll.writeRaw(out.str() + "_gpWeightAll.rawfloat");
+  gpWeightRatio.writeRaw(out.str() + "_gpWeightRatio.rawfloat");
   
-  //  
-  gpUncertainty(0, 0) = 0.0;
-  gpUncertainty(0, 1) = maxGPUncertainty;
-  ICETools::convertToRGB ( gpUncertainty, imgrgb );
-  imgrgb.write ( out.str() + "gpUncertainty.png" );
+  //not needed anymore, everything will be done in our nice script :)
   //
-  gpMean(0, 0) = 0.0;
-  gpMean(0, 1) = maxGPMean;  
-  ICETools::convertToRGB ( gpMean, imgrgb );
-  imgrgb.write ( out.str() + "gpMean.png" );
-  //
-  gpMeanRatio(0, 0) = 0.0;
-  gpMeanRatio(0, 1) = maxGPMeanRatio;   
-  ICETools::convertToRGB ( gpMeanRatio, imgrgb );
-  imgrgb.write ( out.str() + "gpMeanRatio.png" );
-  //
-  gpWeightAll(0, 0) = 0.0;
-  gpWeightAll(0, 1) = maxGPWeightAll;     
-  ICETools::convertToRGB ( gpWeightAll, imgrgb );
-  imgrgb.write ( out.str() + "gpWeightAll.png" );
-  //
-  gpWeightRatio(0, 0) = 0.0;
-  gpWeightRatio(0, 1) = maxGPWeightRatio;     
-  ICETools::convertToRGB ( gpWeightRatio, imgrgb );
-  imgrgb.write ( out.str() + "gpWeightRatio.png" );    
-
+//   uncert(0, 0) = 0.0;
+//   uncert(0, 1) = 1.0+gpNoise;
+//   ICETools::convertToRGB ( uncert, imgrgb );
+//   imgrgb.write ( out.str() + "rough.png" );
+// 
+//   //invert images such that large numbers correspond to high impact, high variance, high importance, high novelty, ...
+//   for ( int y = 0; y < ysize; y++)
+//   {
+//     for (int x = 0; x < xsize; x++)
+//     {
+//       gpUncertainty(x,y) =  maxGPUncertainty - gpUncertainty(x,y);
+//       gpMean(x,y) = maxGPMean - gpMean(x,y);
+//       gpMeanRatio(x,y) = maxGPMeanRatio - gpMeanRatio(x,y);
+//       gpWeightRatio(x,y) = maxGPWeightRatio - gpWeightRatio(x,y);
+//     }
+//   }
+//   //actually, this is also done in the post-processing file
+//   
+//   
+//   //  
+//   gpUncertainty(0, 0) = 0.0;
+//   gpUncertainty(0, 1) = maxGPUncertainty;
+//   ICETools::convertToRGB ( gpUncertainty, imgrgb );
+//   imgrgb.write ( out.str() + "gpUncertainty.png" );
+//   //
+//   gpMean(0, 0) = 0.0;
+//   gpMean(0, 1) = maxGPMean;  
+//   ICETools::convertToRGB ( gpMean, imgrgb );
+//   imgrgb.write ( out.str() + "gpMean.png" );
+//   //
+//   gpMeanRatio(0, 0) = 0.0;
+//   gpMeanRatio(0, 1) = maxGPMeanRatio;   
+//   ICETools::convertToRGB ( gpMeanRatio, imgrgb );
+//   imgrgb.write ( out.str() + "gpMeanRatio.png" );
+//   //
+//   gpWeightAll(0, 0) = 0.0;
+//   gpWeightAll(0, 1) = maxGPWeightAll;     
+//   ICETools::convertToRGB ( gpWeightAll, imgrgb );
+//   imgrgb.write ( out.str() + "gpWeightAll.png" );
+//   //
+//   gpWeightRatio(0, 0) = 0.0;
+//   gpWeightRatio(0, 1) = maxGPWeightRatio;     
+//   ICETools::convertToRGB ( gpWeightRatio, imgrgb );
+//   imgrgb.write ( out.str() + "gpWeightRatio.png" );    
+// 
 
   timer.stop();
   cout << "last: " << timer.getLastAbsolute() << endl;