Native Shopify Mobile App with 20 new features
Kickstart your hyperlocal marketplace in Corona pandemic with a starter guide
Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 126.96.36.199 release ready!
Owner and Founder. Opencart
There are many use cases of Machine Learning these days, one of the most usable use case of machine learning is removing background from an Image. Let’s imagine there is a person who is running his online eCommerce website, and everybody knows that product images play an important role to attract customers. But Clicking a high-quality image background less image requires a studio. And Studio costs way too much.
How about an AI-based solution that converts your ordinary, “with-background” image to “background-less image”. Yes, you heard it right for this Tensorflow provided a browser-based technique using which you can remove your image background just like that.
So let’s go and check how this can be done programmatically.
Firstly you need to have a well-trained model, there are two ways to do this.
a) Go for a pre-trained model, there are plenty out there https://github.com/tensorflow/models/blob/master/research/deeplab/g3doc/model_zoo.md
b) Train model your self.
Both of the above-mentioned ways have their own pros and cons. This topic itself is very vast, we will discuss it in another blog.
Then you need to take a camera stream pic a frame from it and use the TensorFlow js API method “model.execute()” to predict the desired object in that frame and delete or replace other pixels with some color or create a new picture from it and save it.
In the same way, you can use the HTML input type file as an input to the execute method
After that, if you want you can display the same with help of drawImage() on HTML 5 component canvas.
OK OK Let’s talk something about CODE
First, you need to load model
Then, execute the model of the source input
Finally, Utilise this result data and draw on the canvas.
I followed this but can also follow, but this is limited to video-only.
For any query mail us t [email protected]
We will love to hear from you.
Thanks and stay tuned for other ML and AI-based articles.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
When I think in getting solutions for my Ecommerce Platform, I think of Webkul. They have been such a blessing in our business. We have spent thousands of dollars in support and modules from them. We love their support team. They work very closely with us, and they always go the extra mile when we need help.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.