MCPcopy Create free account
hub / github.com/HiLab-git/SimpleCRF / stepInference

Method stepInference

dependency/densecrf/src/densecrf.cpp:187–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185 return Q;
186}
187void DenseCRF::stepInference( MatrixXf & Q, MatrixXf & tmp1, MatrixXf & tmp2 ) const{
188 tmp1.resize( Q.rows(), Q.cols() );
189 tmp1.fill(0);
190 if( unary_ )
191 tmp1 -= unary_->get();
192
193 // Add up all pairwise potentials
194 for( unsigned int k=0; k<pairwise_.size(); k++ ) {
195 pairwise_[k]->apply( tmp2, Q );
196 tmp1 -= tmp2;
197 }
198
199 // Exponentiate and normalize
200 expAndNormalize( Q, tmp1 );
201}
202VectorXs DenseCRF::currentMap( const MatrixXf & Q ) const{
203 VectorXs r(Q.cols());
204 // Find the map

Callers

nothing calls this directly

Calls 8

expAndNormalizeFunction · 0.70
resizeMethod · 0.45
rowsMethod · 0.45
colsMethod · 0.45
fillMethod · 0.45
getMethod · 0.45
sizeMethod · 0.45
applyMethod · 0.45

Tested by

no test coverage detected