The latest GenAI-powered feature from Cloudinary is here: the Generative Background Replace transformation. Seamlessly replacing or adding backgrounds in images is now faster, far less expensive, and an amazingly scalable way to enhance and customize visuals at scale. It’s perfect for an application that includes enhancing product listings and online store visuals for e-commerce, website content, and social media.
Cloudinary’s GenAI-based advanced editing capabilities are making manual, time-consuming editing work a thing of the past.
Advanced generative AI models power the Generative Background Replace feature. Core capabilities include:
- Auto background detection and removal. Detect background elements about the core subject and remove the unnecessary pixels.
- Auto background generation. Auto-generate a background based on LLM interpretation of the foreground elements without prompting.
- Guiding via prompts. User-provided prompts auto-generate a background based on your hints and on the imagery in the foreground.
- Seeding and variations. Generate background variations or return to previously generated variations using a seed parameter.
- Flexibility and scale. This transformation works with all Cloudinary transformations. An explanation, with examples, of all Cloudinary transformations is available here.
Cloudinary’s Background Replace feature is intelligent enough to recognize the foreground subjects and build a new background around them. The powerful LLM and Diffusion models running behind the scenes make this possible.
In this short video made from actual examples, you’ll see how the model detects the watch and builds the surrounding background, even including reflections, when appropriate.
- Integrate a subject into any background that suits your needs without the manual effort or expensive reshoots.
- Test multiple versions of Background Replace using the seed parameter; creating variations at scale – a massive time saver when you need to get creative approval quickly.
- Background Replace virtually “scouts” locations as part of a pre-production workflow.
Example: A fashion retailer can use Generative Background Replace to create different seasonal backgrounds for product photos. A winter collection can be showcased with snowy, festive backgrounds, while the same products can be re-photographed with a summer theme without additional cost of a separate photo shoot. Quick adaptation to marketing campaigns and promotions throughout the year is another bonus.
- Switch out the backgrounds in existing images to breathe new life into old assets for new campaigns or audiences.
- Change the tone of existing assets by creating new backgrounds that match the foreground subject or product.
Example: A travel agency with a library of destination photos can update its promotional materials by changing the backgrounds to reflect different times of the year or specific themes. Meaning a beach scene can be transformed into a sunset image or a lively beach party background, making the images fresh and relevant for various marketing campaigns.
Replace your image’s background with an AI-generated one. If no prompt is specified, the background is based on the image’s contents. Otherwise, it’s generated based on the specified natural language prompt. It also works with images with transparent backgrounds.
In this example, you’ll see what happens when you transform the image with and without a prompt.
Original
https://res.cloudinary.com/demo/image/upload/pm/group-2.jpg
Code language: JavaScript (javascript)
Transformed
https://res.cloudinary.com/demo/image/upload/e_gen_background_replace/pm/group-2.jpg
Code language: JavaScript (javascript)
Original
https://res.cloudinary.com/demo/image/upload/pm/object-4.jpg
Code language: JavaScript (javascript)
Transformed
https://res.cloudinary.com/demo/image/upload/e_gen_background_replace/pm/object-4.jpg
Code language: JavaScript (javascript)
Let’s look at the same image, but this time with a custom prompt. Let’s try “fashion show.”
Original
https://res.cloudinary.com/demo/image/upload/pm/group-2.jpg
Code language: JavaScript (javascript)
Transformed
https://res.cloudinary.com/demo/image/upload/e_gen_background_replace:prompt_fasion%20show/pm/group-2.jpg
Code language: JavaScript (javascript)
Original
https://res.cloudinary.com/demo/image/upload/e_gen_background_replace:prompt_fasion%20show/pm/group-2.jpg
Code language: JavaScript (javascript)
Transformed
https://res.cloudinary.com/demo/image/upload/e_gen_background_replace:prompt_granite/pm/object-4.jpg
Code language: JavaScript (javascript)
As noted above, for images without transparency, the effect first determines the foreground elements and leaves those areas intact while replacing the background.
Transparent backgrounds aren’t a problem, as the feature will contextualize the generated background based on the subject provided. Let’s take a look:
Original
https://res.cloudinary.com/demo/image/upload/pm/furniture-4.jpg
Code language: JavaScript (javascript)
Transformed
https://res.cloudinary.com/demo/image/upload/e_gen_background_replace/pm/furniture-4.jpg
Code language: JavaScript (javascript)
You can also regenerate a background using different seeds if you’re not satisfied with the result. You can also use seeds to return a previously generated result if any other preceding transformation parameters are the same. See the following examples using the same prompts and original image but with different seed parameter values:
Original
https://res.cloudinary.com/demo/image/upload/e_gen_background_replace/docs/luxury_car.png
Code language: JavaScript (javascript)
Transformed
https://res.cloudinary.com/demo/image/upload/e_gen_background_replace:seed_1/docs/luxury_car.png
Code language: JavaScript (javascript)
Original
https://res.cloudinary.com/demo/image/upload/e_gen_background_replace/docs/luxury_car.png
Code language: JavaScript (javascript)
Transformed
https://res.cloudinary.com/demo/image/upload/e_gen_background_replace:seed_2/docs/luxury_car.png
Code language: JavaScript (javascript)
Cloudinary’s Generative Background Replace is available for you try on our AI Playground.
For more detailed information on usage, please see the documentation.
Cloudinary’s Generative Background Replace revolutionizes background editing and customization. Leveraging the power of generative AI technology, users can replace and enhance backgrounds, making their visuals more engaging and professional. Whether for e-commerce, marketing, or creative projects, this feature enables high-quality, scalable image transformations that save time and resources and breathe new life into old images.
Interested in the feature? Create an account for free and test it out.