Code: Select all
for (int y = 1; y < height; y++)
for (int x = 1; x < width; x++)
//std::cout << Mat (fv.at<Matx<double,nFeatures,1>>(x,y)) << std::endl;
nodeTrainer->addFeatureVec(Mat (fv.at<Matx<uint8_t,nFeatures,1>>(x,y)), static_cast<byte>(gt.at<uint8_t>(x,y)));
It has also been generalized to take in more than just uint8 images if need be by just modifying the data type in nodeTrainer->addFeatureVec and in edgeTrainer->addFeatureVecs for edge training respectively. For now I'm training it on 29 feature images and testing on one, and each feature image is 256x256x55 uint8 (55 features, from multiple filter banks that have been quantized into 0-255 to comply with the uint8 feature vector standards of DGM).
For Node Training I use Gaussian Mixture Model or OpenCV Gaussian Mixture Model but I keep getting the following error:
Decoding... Assertion failed: !std::isnan(node->Pot.at<float>(s, 0)) in "C:\DGM-1.7.0\modules\DGM\MessagePassing.cpp", line 74
Assertion failed: !std::isnan(node->Pot.at<float>(s, 0)) in "C:\DGM-1.7.0\modules\DGM\MessagePassing.cpp", line 74
The lower precision boundary for the potential of the node 49152 is reached.
SUM_pot = -nan(ind)
Do you know what could be causing this issue?