Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Image segmentation and background removal in JavaScript (github.com/akshayubhat)
60 points by secondtimeuse on July 24, 2015 | hide | past | favorite | 13 comments



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.


Congrats! Looks beautiful, makes the whole process so easy. This will save so much time to many people.


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


Thanks, I added it to the readme.


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.


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.


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?


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


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


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.


i tried to use it, it just crashed FireFox 39.0 on Windows 7.


Great stuff. Anyone aware of Android libs for this?


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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: