HMC + Stan for data driven Markov Chains

68 views
Skip to first unread message

Ishrat Badami

unread,
Sep 25, 2015, 8:13:38 AM9/25/15
to Stan users mailing list

Hello All,

I am working on indoor semantic segmentation. I would like to implement an approach in paper "Sampling bedrooms", by Luca Del Pero, Jinyan Guan, Ernesto Brau, Joseph Schlecht, Kobus Barnard, CVPR 2011.

This approach optimizes the camera parameters and room dimensions given a single image.
The posterior probability function matches the image edges with the edges of the model generated by given set of camera parameters and bedroom dimensions.
They use Hamiltonian Markov chain with leap frog discretization.

I am looking a way to use STAN library to solve this problem more efficiently. What I cannot figure out is how to generate the data block for this problem in STAN.

Apparently the data here is the image edge points.
I have not seen any example in the documentation which addresses computer vision problem.

Can anyone one point me to the right direction/documentation/example?

Best
Ishrat

Daniel Lakeland

unread,
Sep 25, 2015, 11:39:48 AM9/25/15
to Stan users mailing list

I'm going to go out on a limb here, as I'm not a Stan developer, but I kind of doubt you'll be able to do computer vision problems in Stan in a reasonable amount of coding time.

There is no "image" datatype in Stan, and if you instead convert the images to arrays of integers or real numbers then you'll have to implement image processing code from scratch in the Stan language, or bolted on in C++ or something. I'm not saying it CAN'T be done, but it's not obvious that it's the right way to go.

That being said,  perhaps you can first pre-process your images to get some kind of reduced data sets, and then run a Stan model on those reduced data sets, and then use the Stan output to inform your computer vision processing. That seems like a reasonable technique. The pre-processing step might be some kind of edge detection. This is a non-trivial problem, so if you can maybe think hard on it and then ask a more targeted question I suspect people can give more help.


Ishrat Badami

unread,
Sep 25, 2015, 1:44:30 PM9/25/15
to stan-...@googlegroups.com
Thank you Daniel. That was already helpful. I had same thoughts after I posted the question. I will get back to this forum after pondering a bit longer about implementation. 

It was nice to get the confirmation that there is no off the shelf solution for vision problems using STAN.


--
You received this message because you are subscribed to a topic in the Google Groups "Stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/E5pWBiaZlQo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+...@googlegroups.com.
To post to this group, send email to stan-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Ishrat Badami
Ph.D. Student
Computer Vision Group
UMIC Research Centre
RWTH Aachen University
Room No 129
Mies-van-der-Rohe Strasse 15
D-52074 Aachen
Germany
------------------------------------
Tel: +49 241 80 20775
Fax: +49 241 80 22731

e-mail: bad...@vision.rwth-aachen.de
URL: http://www.vision.rwth-aachen.de/people/ishrat-badami
-----------------------------------------------------------------

Bob Carpenter

unread,
Sep 25, 2015, 3:46:18 PM9/25/15
to stan-...@googlegroups.com
Looking at that paper, I think Daniel's exactly right.
I wasn't quite clear on when the computations in sections
2.1 of that paper had to be done --- if it's
once ahead of time and you have the software to do it,
then you can feed that output into a Stan model that codes
up the image model in 2.2, assuming it's just a bunch of matrix
and other arithmetic calculations, and do the HMC efficiently
with Stan.

- Bob
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages