News for hackers. Stuff that matters.
Re:Show HN: Image segmentation and background removal in Jav... by secondtimeuse on Friday July 24, 2015 @04:57PM (#9945135)
This is an alpha version, I hope to improve it over the next week by incorporating ConvnetJS, to label pixels in mixed superpixels (Superpixels with both positive and negative labels). And incorporate additional functionality to such as blurring the boundary.

The current restriction on the size of canvas 640 X 640 (Instagram size) , will also be removed over next few updates.

Re:Show HN: Image segmentation and background removal in Jav... by me_bx on Friday July 24, 2015 @04:59PM (#9945156)
Congrats! Looks beautiful, makes the whole process so easy. This will save so much time to many people.
Re:Show HN: Image segmentation and background removal in Jav... by MichaelApproved on Friday July 24, 2015 @06:12PM (#9945518)
It was hard to get an idea of the final result in the demo gif because the last frame disappeared so quickly. Here it is http://imgur.com/fduYXCi
Re:Show HN: Image segmentation and background removal in Jav... by secondtimeuse on Friday July 24, 2015 @06:25PM (#9945591)
Thanks, I added it to the readme.
Re:Show HN: Image segmentation and background removal in Jav... by skstronghold on Saturday July 25, 2015 @01:10AM (#9946631)
Was working on a similar problem, to fetch color of cloths from images(including models and background) in an e-commerce website. This implementation gives the best result so far.
Re:Show HN: Image segmentation and background removal in Jav... by secondtimeuse on Saturday July 25, 2015 @01:26AM (#9946660)
Depending on the size of the object you are trying to segment relative to the image, you can adjust the size of superpixels. To segment parts such as clothes you can set large superpixel size by enabling developer option on top right corner. You can also see superpixels rendered to understand which size gives best results. This method can perform even approximate non-interactive segmentation.
Re:Show HN: Image segmentation and background removal in Jav... by MichaelApproved on Friday July 24, 2015 @06:14PM (#9945528)
In the readme file, you have "License: Copyright 2015, Cornell University. All Rights Reserved." Does that mean there isn't a public license to use it?
Re:Show HN: Image segmentation and background removal in Jav... by secondtimeuse on Friday July 24, 2015 @06:16PM (#9945541)
It will be released under Open Source compatible license, I just need to make sure since I am a PhD student.

Note that the underlying algorithm implementations are MIT licensed.

https://github.com/kyamagu/js-segment-annotator/blob/master/...

Re:Show HN: Image segmentation and background removal in Jav... by pmontra on Friday July 24, 2015 @06:03PM (#9945477)
Great demo. Out of curiosity, why not compiling the C algorithm with emcc into asm.js and probably get better performances (but a much larger js file) ?
Re:Show HN: Image segmentation and background removal in Jav... by secondtimeuse on Friday July 24, 2015 @06:11PM (#9945511)
Its actually based on https://github.com/kyamagu/js-segment-annotator which implements two algorithm SLIC and PF.

Regarding compiling C using emscripten, I wanted a pure JS implementation so that it was hackable using Chrome Developer tools, E.g. using LAB data internally produced by SLIC algorithm. Hopefully in future, I will use a emscripten implementation. It might be important for version that proceses short gifs or videos.

Also there is a developer mode on top right, enabling it allows visualization of superpixels and change parameters of the algorithm.

Re:Show HN: Image segmentation and background removal in Jav... by eonw on Friday July 24, 2015 @06:24PM (#9945586)
i tried to use it, it just crashed FireFox 39.0 on Windows 7.
Re:Show HN: Image segmentation and background removal in Jav... by dharma1 on Friday July 24, 2015 @08:48PM (#9946110)
Great stuff. Anyone aware of Android libs for this?
Re:Show HN: Image segmentation and background removal in Jav... by secondtimeuse on Friday July 24, 2015 @08:59PM (#9946141)
OpenCV has GrabCut implementation which works on android. There are numerous implementations of SLIC superpixels. Even this will work through a cordova style wrapper, but I would really not recommend it, since you can use a much faster and accurate native OpenCV on android.