Skip to content

Using the Power of Generative AI to Remove Objects From Images

If you and your creative or technical team frequently handle image editing, you know the time and effort it takes to remove unwanted elements from images, especially at scale. Whether you work in real estate, travel and hospitality, advertising, or any other industry, the demand for image editing is constant, and more complex tasks like object removal can significantly slow down your team’s workflow. Hence, we’re excited to present Cloudinary’s latest innovations in generative Ahttps://cloudinary.com/documentation/user_generated_contentI.

Try out Generative Remove and other cutting edge-features at our new Generative AI Playground.

Our Programmable Media product now includes the experimental Generative Remove feature, which uses state-of-the-art technology such as open-set object detection and powerful generative AI capabilities through stable diffusion. 

Using Generative Remove, you can effortlessly remove unwanted objects, text, and specific user-defined regions from your images. Technical and creative teams with repetitive object removal tasks can now accomplish this at scale using Cloudinary’s APIs.

Note:

For more information please check out the documentation or try the demo.

The Intelligent Generative Remove feature has a wide range of applications across industries. 

  • Real Estate. Remove unwanted items to enhance a listing’s imagery. Example: Remove a car from an otherwise perfect property photo.
  • E-commerce and fashion. Remove unwanted accessories or props to focus on the primary product. Example: A shot of a model wearing multiple jewelry pieces, remove a bracelet and focus on earrings.
  • Social media. Get rid of distracting or unwanted elements from user-generated content. Example: Photobombers in the background of a great selfie.
  • Ad agencies. Remove logos or other branding elements when reusing your images for other clients. Example: Remove a logo from a billboard in the background of another brand’s banner photo.
  • Travel and hospitality. Enhance scenic imagery by removing unwanted elements such as vehicles, litter, and even people. 

Using the Intelligent Generative Remove feature is easy. First, upload your images to your Cloudinary product environment. Once an image is uploaded, you can utilize our URL-based API (or any of our SDKs) to build the transformation using the e_gen_remove command.

For more information, check out the documentation page for the feature or look at the examples below.

Loading code examples
Loading code examples

When Programmable Media receives a remove command for a given image, our technology attempts to detect the object supplied in the prompt. If we find the suggested element, we will remove it. Next, our inpainting generative AI will fill the now-blank area based on its surroundings.

Let’s get technical for a moment!

Cloudinary’s Intelligent Generative Remove feature utilizes open-set object detection. This technology helps software recognize and understand different objects in an image without being specifically trained to find them. 

This method offers our Generative Remove feature much more flexibility in detecting anything a user can mark for removal.

For example, the feature can adapt and recognize new objects and variations of known objects that may have a variety of shapes and dimensions. 

This adaptability makes Generative Remove robust in various real-world scenarios where the appearance of objects of the same type (cars, for example) may vary significantly.

By using open-set object detection, Cloudinary’s Generative Remove feature can be more flexible and adaptable in recognizing and removing different objects from images. Once the object is identified, the popular Stable Diffusion model is applied to remove and then fill the newly blank area to match the context of its surroundings, also known as inpainting. 

By analyzing the nearby image information, Stable Diffusion ensures that the inpainted area blends seamlessly with the rest of the image. 

This level of quality is critical for teams who want to maintain the integrity of the image while also creating an aesthetically pleasing result, primarily when the Remove feature is utilized at scale.

We’re working on Generative AI Transformation features and improving functionality to Programmable media. Coming soon:

  • Generative Fill. Outpainting can pad an existing image with new contextually-aware image fills. This will be extremely useful for teams who must create adaptations for various devices in various aspect ratios and extend the image instead of adding a pad. This feature will also leverage Stable Diffusion to achieve esthetically pleasing results.
  • Generative Replace. The next iteration of the remove feature, where a detected object can be replaced with another. This would again make use of open-set detection and stable diffusion. A sample use case here is replacing one object with another based on your audience, for example, replacing a can of beer with a bottle of juice if an image is meant to be used in a campaign targeted to those under the legal drinking age.

Cloudinary’s experimental Generative Remove feature empowers users to remove unwanted elements from images effortlessly, leveraging state-of-the-art technology for object detection and inpainting technologies through our Programmable Media product. This feature further strengthens Cloudinary’s goal of intelligent automation: where eliminating time-consuming tasks enhances productivity and frees creative teams to focus on more strategic endeavors.

We’re committed to ongoing innovation and introducing advanced functionalities like intelligent element erasing, element replacement, and outpainting. Incorporating generative AI features such as erase and replace ensures a comprehensive and versatile image editing experience within our Programmable Media platform. Try it out today and see the difference for yourself!

Back to top

Featured Post