Git Product home page Git Product logo

trimap_generator's People

Contributors

lnugraha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

trimap_generator's Issues

Non-Dominant Foreground

There might be a tiny "clump" of pixels which share the same pixel intensity as foreground.
The trimap generator will dilate those non-dominant regions.
An error-handler (either reject or convert those clumps as background) is required to anticipate this issue (see the attached image).

My temporary proposed solution is to utilize clustering method to detect the most dominant foreground.

test_image_9

Improve trimap_module with cython

Hello,

Thank you for your work, it's very useful.

I have develop a solution for the optimization part with cython.
I will share you the file to paste in folder where the trimap module is located. You need to dezip it.
And in trimap_module.py add theses lines :
from trimap.faster_remake import set_value

And replace (in trimap function) this :
for i in range(0,row):
for j in range (0,col):
if (remake[i,j] != 0 and remake[i,j] != 255):
remake[i,j] = 127
by this :
remake = np.array(set_value(remake, 127))

You can change the value if you want.

Hope that's help.

Have a good day and enjoy :)

faster_remake.cpython-36m-x86_64-linux-gnu.zip

Mask confidence and dilation operation

Hi Inugraha,

It seems that you dilate the input binary mask to generate the trimap. But what if the input mask is not confident enough to be sure foreground? E.g., masks generated by Mask RCNN segmentation sometimes extend outside the ground truth objects. So perhaps shrink the input mask a bit (e.g., erosion operation) as sure foreground before dilation?

Generate abstract base class

TODO: design an abstract class that can decide whether erosion or dilation will be used for the foreground. The derived classes deploy erosion or dilation with a kernel size decided priorhand

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.