|
@@ -969,6 +969,10 @@ void SemSegContextTree::train (const MultiDataset *md)
|
|
|
feat.tree = &forest[tree];
|
|
|
feat.rProbs = &lastRegionProbs[iCounter];
|
|
|
double val = splitfeat->getVal (feat, x, y);
|
|
|
+ if(!isfinite(val))
|
|
|
+ {
|
|
|
+ val = 0.0;
|
|
|
+ }
|
|
|
|
|
|
#pragma omp critical
|
|
|
if (val < splitval)
|
|
@@ -1043,6 +1047,10 @@ void SemSegContextTree::train (const MultiDataset *md)
|
|
|
feat.rProbs = &lastRegionProbs[iCounter];
|
|
|
|
|
|
double val = splitfeat->getVal (feat, x, y);
|
|
|
+ if(!isfinite(val))
|
|
|
+ {
|
|
|
+ val = 0.0;
|
|
|
+ }
|
|
|
|
|
|
cout << "splitval: " << splitval << " val: " << val << endl;
|
|
|
}
|
|
@@ -1469,6 +1477,10 @@ void SemSegContextTree::semanticseg (CachedExample *ce, NICE::Image & segresult,
|
|
|
feat.rProbs = &lastRegionProbs;
|
|
|
|
|
|
double val = forest[tree][t].feat->getVal (feat, x, y);
|
|
|
+ if(!isfinite(val))
|
|
|
+ {
|
|
|
+ val = 0.0;
|
|
|
+ }
|
|
|
|
|
|
if (val < forest[tree][t].decision)
|
|
|
{
|