CODAIT / magicat

🧙😺 magicat - Deep learning magic.. with the convenience of cat!
Apache License 2.0
26 stars 5 forks source link

Using in my nose js app #9

Open LucasBoberg opened 4 years ago

LucasBoberg commented 4 years ago

Hi!

Is it possible to use magicat in my own node js app without the cli tool. To automatically remove backgrounds from uploaded images?

Thanks in advance!

vabarbosa commented 4 years ago

@LucasBoberg my apologies, i did not see this sooner and somehow missed it.

magicat is using @codait/max-image-segmenter underneath to determine the objects in an image and then using @codait/max-vis to extract those objects from the image. you can check out the JS in this code pen (https://codepen.io/ibmcodait/pen/xvEodY) to see use you can use these two together

but if you want to try to use magicat (and bypass the cli) you can import lib/segmenter.js and call it's remove functions directly

by the way, magicat has been replaced with @codait/magicat. if you haven't done so you should upgrade and use the scoped name (@codait/magicat) moving forward.