|
@@ -502,14 +502,11 @@ double SemSegContextTree::getBestSplit (
|
|
{
|
|
{
|
|
Features feat;
|
|
Features feat;
|
|
feat.feats = &feats[ ( *it ).first ];
|
|
feat.feats = &feats[ ( *it ).first ];
|
|
- feat.cTree = tree;
|
|
|
|
- feat.tree = &forest[tree];
|
|
|
|
|
|
+ feat.rProbs = ®ionProbs[ ( *it ).first ];
|
|
|
|
|
|
assert ( forest.size() > ( uint ) tree );
|
|
assert ( forest.size() > ( uint ) tree );
|
|
assert ( forest[tree][0].dist.size() > 0 );
|
|
assert ( forest[tree][0].dist.size() > 0 );
|
|
|
|
|
|
- feat.rProbs = ®ionProbs[ ( *it ).first ];
|
|
|
|
-
|
|
|
|
double val = 0.0;
|
|
double val = 0.0;
|
|
val = featsel[f]->getVal ( feat, ( *it ).second, ( *it ).third, ( *it ).fourth );
|
|
val = featsel[f]->getVal ( feat, ( *it ).second, ( *it ).third, ( *it ).fourth );
|
|
if ( !isfinite ( val ) )
|
|
if ( !isfinite ( val ) )
|
|
@@ -1162,8 +1159,6 @@ void SemSegContextTree::train ( const LabeledSet * trainp )
|
|
// get feature value
|
|
// get feature value
|
|
Features feat;
|
|
Features feat;
|
|
feat.feats = &allfeats[i];
|
|
feat.feats = &allfeats[i];
|
|
- feat.cTree = tree;
|
|
|
|
- feat.tree = &forest[tree];
|
|
|
|
feat.rProbs = &lastRegionProbs[i];
|
|
feat.rProbs = &lastRegionProbs[i];
|
|
double val = 0.0;
|
|
double val = 0.0;
|
|
val = splitfeat->getVal ( feat, x, y, z );
|
|
val = splitfeat->getVal ( feat, x, y, z );
|
|
@@ -1246,8 +1241,6 @@ void SemSegContextTree::train ( const LabeledSet * trainp )
|
|
|
|
|
|
// Features feat;
|
|
// Features feat;
|
|
// feat.feats = &allfeats[i];
|
|
// feat.feats = &allfeats[i];
|
|
-// feat.cTree = tree;
|
|
|
|
-// feat.tree = &forest[tree];
|
|
|
|
// feat.rProbs = &lastRegionProbs[i];
|
|
// feat.rProbs = &lastRegionProbs[i];
|
|
|
|
|
|
// double val = splitfeat->getVal ( feat, x, y, z );
|
|
// double val = splitfeat->getVal ( feat, x, y, z );
|
|
@@ -1754,8 +1747,6 @@ void SemSegContextTree::classify (
|
|
noNewSplit = false;
|
|
noNewSplit = false;
|
|
Features feat;
|
|
Features feat;
|
|
feat.feats = &imgData;
|
|
feat.feats = &imgData;
|
|
- feat.cTree = tree;
|
|
|
|
- feat.tree = &forest[tree];
|
|
|
|
feat.rProbs = &lastRegionProbs;
|
|
feat.rProbs = &lastRegionProbs;
|
|
|
|
|
|
double val = forest[tree][node].feat->getVal ( feat, x, y, z );
|
|
double val = forest[tree][node].feat->getVal ( feat, x, y, z );
|