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.
- 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)