Problem implementing MaximizeByBPLoopy for grid-like CRFs

76 views
Skip to first unread message

Tribhuvanesh Orekondy

unread,
Jul 2, 2015, 11:05:30 AM7/2/15
to dis...@factorie.cs.umass.edu, aurelien lucchi
Hi there!

I'm Tribhu, from ETH Zürich, and I'm trying to use Factorie as a part of my project (http://dalab.github.io/dissolve-struct/).
Being quite new to Factorie and this domain, I warn you that the following may contain some noob mistakes. :)

Ok, so I'm currently using Factorie for running MAP inference on a Potts model CRF.
While I am able to obtain results, few problems continue to haunt me. 
I was hoping to get some help here.

# Background

The context in which I'm using this is Semantic Image Segmentation, with multiple labels and a generic graph.
I formulate the problem into a Factor Graph (specifically, a CRF) with unary and pairwise features.
The idea is to learn with parameters using a Structural SVM (SSVM).

I begin, knowing the unary and pairwise potentials for all possible assignments over each factor.
Then, I use Factorie for a single function -- to calculate the MAP assignment on the CRF.


# MPLP approach

My current working solution involves constructing an ItemizedModel, adding the respective unary and pairwise factors.
This is followed by figuring the MAP assignment using MaximizeByMPLP.


So, the problems with this approach:
1. Slow
2. Need to manually set the no. of iterations
3. Sometimes (in case #iterations was low), returns a partially labelled image


# Problems with BP

Ok, so then I proceeded trying to get it running using MaximizeByBPLoopy.
But, I hit too many dead-ends trying to get this to work.


This one currently fails with an exception with:
java.lang.Error: This Factor class ... does not implement valuesScore(Tensor)

I didn't understand why this is needed though, since I do specify the potentials. (Also, what kind of value is this function looking for?)
Additionally, since Tensor takes type parameters, how I do know which to exactly provide?


# Summary
In summary, I was hoping for clarifications on the questions mentioned earlier.
Additionally:
- Is anyone aware of Factorie being used in a similar setting? Specifically, for running MAP on a grid-like multi-label CRF? (Most of what I found was for chain CRFs)
- How would you recommend me approaching this current problem?
- Is there a sample usage example? (I didn't find one in the tutorials package) 

Thanks,
Tribhu

Reply all
Reply to author
Forward
0 new messages