cd /news/artificial-intelligence/how-we-reduced-ai-background-removal… · home topics artificial-intelligence article
[ARTICLE · art-43658] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

How We Reduced AI Background Removal Time from 18 Seconds to Nearly Instant: Lessons from Building MakeMyVisuals

The team behind MakeMyVisuals reduced AI background removal time from 18 seconds to near-instant by optimizing image preprocessing, caching, and UI responsiveness. Key improvements included adaptive resizing, offloading work from the main thread, and caching intermediate AI results. The project demonstrates that significant performance gains often come from outside the AI model itself.

read3 min views1 publishedJun 29, 2026

When we started building MakeMyVisuals, our goal wasn't just to remove image backgrounds—it was to create a tool that felt fast enough for everyday users.

No one enjoys waiting 15–20 seconds just to edit a single image.

Whether you're an e-commerce seller removing backgrounds from product photos or a designer creating transparent PNGs, speed matters just as much as accuracy.

Here's what we learned while optimizing our AI image processing pipeline.

The Initial Problem

Our first implementation worked well.

The AI accurately segmented subjects, handled complex edges like hair, and produced clean transparent backgrounds.

The downside?

Large upload times

Heavy image preprocessing

Slow AI inference

Unoptimized output generation

For high-resolution images, the complete workflow could take far longer than users expected. That wasn't acceptable for a modern web application.

Bottleneck #1 — Up Massive Images

Most smartphone photos today are between 5 MB and 20 MB.

Many users uploaded images directly from modern phones with resolutions exceeding 4000×3000 pixels.

The AI didn't actually need every single pixel.

Solution

Instead of processing the original file immediately, we:

Read image dimensions first

Generated an optimized working copy

Preserved the original for export

Sent only the required resolution to the AI model

This significantly reduced unnecessary computation.

Bottleneck #2 — Blocking the User Interface

Initially, preprocessing happened synchronously.

That meant users watched a spinner while the browser resized large images.

Not a great experience.

Solution

We moved expensive operations off the main thread.

This kept the UI responsive while background processing continued.

The result felt dramatically faster—even before total processing time changed.

Sometimes perceived performance matters as much as raw performance.

Bottleneck #3 — Processing Images Larger Than Necessary

Many uploaded photos contained far more detail than required for segmentation.

Running the AI against extremely large images wasted GPU resources.

Solution

We introduced adaptive resizing.

Instead of using a fixed resolution, we calculated an optimal size based on:

Original dimensions

Subject size

Required output quality

The AI processed fewer pixels without noticeably affecting quality.

Bottleneck #4 — Repeated Processing

Users often downloaded multiple versions of the same image.

Originally, every export triggered another processing cycle.

Solution

We cached intermediate AI results.

Only the final rendering changed.

That eliminated redundant work and reduced repeat processing times.

Bottleneck #5 — Sending Too Much Data

Large PNG files are expensive to generate and transfer.

Instead of producing oversized outputs every time, we optimized export generation by:

Compressing transparent PNGs

Optimizing metadata

Generating only required image sizes

Smaller outputs meant faster downloads.

Performance Isn't Just About AI

Most optimization came outside the AI model.

We found improvements in:

Image preprocessing

Browser rendering

Memory management

Network transfer

Export generation Caching

The AI itself was only one piece of the puzzle.

Real User Experience Matters

When people upload an image, they don't care which neural network you're using.

They care about three things:

Does it work?

Does it look good?

Does it finish quickly?

Optimizing those small steps made the biggest difference.

Building MakeMyVisuals

These optimizations are part of what powers MakeMyVisuals, an AI-powered platform for image editing, optimization, and document processing.

Besides background removal, the platform includes tools for:

AI Product Photo Enhancement

Image Compression

Image Resizing

Format Conversion

AI Portrait Editing

Document & PDF Processing

Explore the platform here:

Background Removal Tool:

👉 https://makemyvisuals.com/background-tools Image Optimization Tools:

👉 https://makemyvisuals.com/optimization-tools Format Converter:

👉 https://makemyvisuals.com/format-converter Document Tools:

👉 https://makemyvisuals.com/document-tools Product Photo Studio:

👉 [https://makemyvisuals.com/ecommerce-tools](https://makemyvisuals.com/ecommerce-tools)

Final Thoughts

Building AI products isn't only about choosing the best model.

It's about removing every unnecessary millisecond from the user journey.

Sometimes the biggest performance gains come from optimizing everything around the AI—not the AI itself.

What performance optimization had the biggest impact on your projects?

I'd love to hear your experience in the comments.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @makemyvisuals 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-we-reduced-ai-ba…] indexed:0 read:3min 2026-06-29 ·