Jelajahi Sumber

adaptations for uint class numbers in gp-hik-core

Alexander Freytag 10 tahun lalu
induk
melakukan
5f411578b9
2 mengubah file dengan 6 tambahan dan 6 penghapusan
  1. 2 2
      semseg/SemSegContextTree.cpp
  2. 4 4
      semseg/SemSegContextTree3D.cpp

+ 2 - 2
semseg/SemSegContextTree.cpp

@@ -1162,10 +1162,10 @@ void SemSegContextTree::train (const MultiDataset *md)
       globalCategorFeats[i]->setDim(uniquenumber);
       globalCategorFeats[i]->normalize();
     }
-    map<int,Vector> ys;
+    std::map< uint, NICE::Vector > ys;
     
     int cCounter = 0;
-    for(map<int,int>::iterator it = labelmap.begin(); it != labelmap.end(); it++, cCounter++)
+    for( std::map<int,int>::iterator it = labelmap.begin(); it != labelmap.end(); it++, cCounter++)
     {
       ys[cCounter] = Vector(globalCategorFeats.size());
       for(int i = 0; i < imgcounter; i++)

+ 4 - 4
semseg/SemSegContextTree3D.cpp

@@ -1184,13 +1184,13 @@ void SemSegContextTree3D::train ( const LabeledSet * trainp )
             globalCategorFeats[i]->setDim ( uniquenumber );
             globalCategorFeats[i]->normalize();
         }
-        map<int,Vector> ys;
+        std::map< uint, NICE::Vector > ys;
 
-        int cCounter = 0;
-        for ( map<int,int>::const_iterator it = labelmap.begin();
+        uint cCounter = 0;
+        for ( std::map<int,int>::const_iterator it = labelmap.begin();
               it != labelmap.end(); it++, cCounter++ )
         {
-            ys[cCounter] = Vector ( globalCategorFeats.size() );
+            ys[cCounter] = NICE::Vector ( globalCategorFeats.size() );
             for ( int i = 0; i < imgCounter; i++ )
             {
                 if ( classesPerImage[i].find ( it->first ) != classesPerImage[i].end() )