浏览代码

SemSegContextTree3D: moved printing of feature statistics to separate function

Sven Sickert 7 年之前
父节点
当前提交
b8ba53d479
共有 3 个文件被更改,包括 13 次插入4 次删除
  1. 2 2
      progs/testSemanticSegmentation3D.cpp
  2. 9 2
      semseg/SemSegContextTree3D.cpp
  3. 2 0
      semseg/SemSegContextTree3D.h

+ 2 - 2
progs/testSemanticSegmentation3D.cpp

@@ -43,8 +43,8 @@ void startClassification (SemanticSegmentation *semseg,
 {
     bool write_results = conf.gB ( "debug", "write_results", false );
     bool writeProbMaps = conf.gB ( "debug", "write_prob_maps", false );
-    if (cvRuns > 1)
-        write_results = false;
+    //if (cvRuns > 1)
+    //    write_results = false;
 
     bool run_3Dseg = semseg->isMode3D();
     string output_type = conf.gS ( "debug", "output_type", "ppm" );

+ 9 - 2
semseg/SemSegContextTree3D.cpp

@@ -495,6 +495,10 @@ void SemSegContextTree3D::train ( const MultiDataset *md )
     {
         train ( trainp );
     }
+
+#ifdef VERBOSE
+    printFeatureStatistics();
+#endif
 }
 
 void SemSegContextTree3D::train ( const LabeledSet * trainp )
@@ -1029,7 +1033,11 @@ void SemSegContextTree3D::train ( const LabeledSet * trainp )
         cerr << "Time for Categorization: " << timer.getLastAbsolute() << " seconds\n" << endl;
     }
 
-#ifdef VERBOSE
+}
+
+void SemSegContextTree3D::printFeatureStatistics ()
+{
+
     cout << "\nFEATURE USAGE" << endl;
     cout << "#############\n" << endl;
 
@@ -1103,7 +1111,6 @@ void SemSegContextTree3D::train ( const LabeledSet * trainp )
 
         cout << "Depth [" << d+1 << "] Normal: " << contextOverview[d][0] << " Context: " << contextOverview[d][1] << endl;
     }
-#endif
 
 }
 

+ 2 - 0
semseg/SemSegContextTree3D.h

@@ -233,6 +233,8 @@ public:
                      NICE::MultiChannelImage3DT<double> & probabilities )
   {}
 
+  void printFeatureStatistics();
+  
   bool active3DMode ()
   {
     return run3Dseg;