Semantic Image Segmentation with Conditional Random Fields


Postby tejank10 » Mon Nov 25, 2019, 07:34

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

User avatar
Posts: 157
Joined: Tue Dec 16, 2008, 20:52
Location: Hannover, Germany

Re: Training

Postby Creator » Mon Nov 25, 2019, 12:39

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]);

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


Re: Training

Postby tejank10 » Mon Nov 25, 2019, 13:10

Hi Sergey,

Thanks a lot for the idea. Appreciate it.

Best regards,

Return to “Direct Graphical Models”

Who is online

Users browsing this forum: No registered users and 3 guests