Page 1 of 1

Training

Posted: Mon Nov 25, 2019, 07:34
by tejank10
Hi Sergey,

First of all, thanks a tonne for making DGM! It makes life a lot easier with its abstractions to work with CRFs.

I am working with Efficient Inference in fully connected CRFs with gaussian edge potentialspaper. I plan to train a model on a set of images and then test it. From the tutorials, it was clear to me how to go about it when I am having only one image to train on. Could please point me what should I look up in order to implement training over multiple image and then test?

Thanks and best regards,

Tejan Karmali

Re: Training

Posted: Mon Nov 25, 2019, 12:39
by Creator
Hi Tejan,

you might want to build your fully connected CRF upon the Demo Dense tutorial.

In order to train the model not on one image but on the set of images, you need to modify the == STAGE 2: Training == section of the Demo Dense.cpp file. Please use the following idea:

Code: Select all

Timer::start("Training... ");
for (int k = 0; k < numImagesInYourSet; k++) {
    nodeTrainer->addFeatureVecs(train_fv[k], train_gt[k]);
}
nodeTrainer->train();
Timer::stop();


Thus you add all the training data before calling the train() function.
I hope this will help you.

Re: Training

Posted: Mon Nov 25, 2019, 13:10
by tejank10
Hi Sergey,

Thanks a lot for the idea. Appreciate it.

Best regards,
Tejan