Distance Estimation

29 views
Skip to first unread message

Chris Spencer

unread,
Aug 28, 2016, 8:31:29 PM8/28/16
to scikit-image
Hi,

Can scikit-image be used for supervised learning?

I have training data, where each sample is composed of a raw RGB image, a black-and-white image mask showing the laser projection onto the image, and the laser range finder distance measurements in millimetres.

Is there any algorithm in scikit-image that I could use to train a predictor that could estimate the distance at each pixel in an image?

I've gone through all the examples, and none of them seemed to directly apply. The image segmentation example seemed to be the closest, but that didn't use supervised learning, so I wasn't sure how I could adapt it's code.

Can this goal be accomplished with sckit-image? If not, is there another library and algorithm you could recommend?

Regards,
Chris

Stefan van der Walt

unread,
Aug 31, 2016, 7:12:27 PM8/31/16
to scikit...@googlegroups.com
Hi Chris

On Sun, Aug 28, 2016, at 17:31, Chris Spencer wrote:
> Is there any algorithm in scikit-image that I could use to train a predictor that could estimate the distance at each pixel in an image?

> I've gone through all the examples, and none of them seemed to directly apply. The image segmentation example seemed to be the closest, but that didn't use supervised learning, so I wasn't sure how I could adapt it's code.

Could you explain what you mean by "estimate the distance"?

Stéfan

Chris Spencer

unread,
Aug 31, 2016, 9:29:39 PM8/31/16
to scikit...@googlegroups.com
Given a JPG image of a scene, convert that into a depth map, where each pixel is associated with a discrete distance estimate.


--
You received this message because you are subscribed to a topic in the Google Groups "scikit-image" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scikit-image/qvGm0zOv2rc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scikit-image+unsubscribe@googlegroups.com.
To post to this group, send an email to scikit...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/scikit-image/1472685144.113590.712117217.1B48040B%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.

Chris Spencer

unread,
Aug 31, 2016, 9:30:21 PM8/31/16
to scikit...@googlegroups.com
Essentially, what's described here:

http://www.cs.cornell.edu/~asaxena/learningdepth/

Emmanuelle Gouillart

unread,
Sep 1, 2016, 3:29:05 AM9/1/16
to scikit...@googlegroups.com
Hi Chris,

the short version is no, there is no function in scikit-image that can do
what the Stanford paper does. However, you can find some useful building
blocks in scikit-image and scikit-learn, that you can put together to
build your own version of the algorithm (from what I figured out after
a quick reading of
http://www.cs.cornell.edu/~asaxena/reconstruction3d/saxena_iccv_3drr07_learning3d.pdf)

- Felzenswalb superpixels are available in skimage.segmentation
(http://scikit-image.org/docs/dev/auto_examples/segmentation/plot_segmentations.html)
- Local features can be computed using several functions of scikit-image,
such as color transforms (color.ycbcr) and edge filters
(filters.sobel_h, filters.sobel_v, ...)
- A logistic regression algorithm is available in scikit-learn
(http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html)

The trickiest part to code would be the MAP inference on the MRF, where I
guess you would have to code it yourself (I think).

So, it is feasible to assemble these different blocks, but it's not a
small project either.

As for other libraries, I'm afraid nothing comes to my mind. OpenCV does
have a depth estimation function, but only from stereo images.

Hope this helps,
Emma

Chris Spencer

unread,
Sep 1, 2016, 11:41:26 AM9/1/16
to scikit...@googlegroups.com
Thanks, that's what I was looking for.

--
You received this message because you are subscribed to a topic in the Google Groups "scikit-image" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scikit-image/qvGm0zOv2rc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scikit-image+unsubscribe@googlegroups.com.
To post to this group, send an email to scikit...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages