Get the code
View the demo
by Nick Kasten | Published October 25, 2018
Artificial intelligenceData ScienceDeep LearningMachine Learning
Use an open source image segmentation deep learning model to detect different types of objects from within submitted images, then interact with them in a drag-and-drop web application interface to combine them or create new images.
Most images that are shared online depict one or many objects, usually in some setting or against some kind of backdrop. When editing images, it can take considerable time and effort to crop these individual objects out, whether they are to be processed further elsewhere or used in some new composition. This application uses a deep learning model from the Model Asset eXchange (MAX) to automate this process and spark creativity.
In this application, the MAX Image Segmenter model is used to identify the objects in a user-submitted image on a pixel-by-pixel level. These categorized pixels are then used to generate a version of the image with each unique type of object highlighted in a separate color, called a colormap. Each segment is then split into its own image file that can be downloaded for use elsewhere. As subsequent images are uploaded, they are added to the carousel in the lower portion of the screen and saved in the browser, using PouchDB. From this carousel, images can be reviewed, deleted, or loaded into the “Studio.”
In the Studio section of the app, two images can be loaded into an interface that allows for drag-and-drop combinations of any two objects within them. Any new images you create here can also be downloaded.
When you have completed this code pattern, you’ll understand how to:
Find the detailed steps for this pattern in the README file. The steps show you how to:
Get the Code »
Artificial intelligenceDeep Learning+
Back to top