DEV Community

Sofia Bennett
Sofia Bennett

Posted on

Why I Stopped Wasting Hours on Image Fixes and Built a One-Tool Workflow That Actually Scales


I remember the day clearly: a client dropped a hundred product shots onto my lap the night before launch. Some had watermarks, others were tiny screenshots, and a couple had obvious photobombs. I tried the usual mix of manual cloning, a shaky Photoshop action, and an online upscaler that promised miracles. Two days of fiddling later I was exhausted, still shipping inconsistent images, and answering worried messages from marketing. That night I sketched a workflow on a napkin: detect the problem, fix text or stamps, remove distracting things, then upscale and polish.

By the morning I had a basic script and a clearer goal. I wanted tools that handled three things reliably: erase overlaid text, remove objects cleanly, and upsample without introducing crazy artifacts. I tested a few approaches, failed spectacularly, learned trade-offs, and iterated until the process felt like something I could hand to a teammate and expect consistent results. If youve ever spent an afternoon restoring an old scan to pass a print check, this will read like a short therapy session.


The concrete problem I hit on a real project

When I tried an automated route first, the pipeline threw this error on one of the largest scans: "HTTP/1.1 413 Payload Too Large". The upstream service capped uploads and my hacky chunking code produced mismatched parts-an ugly, silent failure that left one image half-fixed. That failure forced me to think beyond quick fixes: I needed a workflow that supported varied inputs (handwritten labels, logos, low-res screenshots), gave predictable outputs, and offered a quick way to preview and iterate.

I settled on a three-step flow and treated each step as an independent building block so I could swap models if needed:

  1. Remove obvious text overlays and stamps.
  2. Remove photobombs and logos.
  3. Upscale and enhance for print or web.

To make this reproducible for the team I scripted the calls and added a sanity-check that reports image size, PSNR, and SSIM so we can compare before/after automatically.


How I automated the "remove text" step (and a small code snippet)

This was the first failure mode: screenshots with date stamps and thumbnails with big promotional overlays. I needed something that identifies text areas and reconstructs the background.

Before the snippet below I ran a small experiment on 20 images and found human-level cleanup on most. The command here is a minimal curl example I used to batch-upload and validate a response:

I used a short script like this to push one file and get a cleaned output:

# uploads image and saves cleaned output
curl -F "image=@product1.jpg" -F "action=remove_text" \
  https://crompt.ai/text-remover -o product1_clean.jpg

Explanation: the endpoint accepts form uploads, returns the edited file, and the saved output was consistently usable for catalog thumbnails. This eliminated manual cloning for most images.


Removing unwanted objects reliably (why the first tool failed)

The first object-removal model I tried would blur textures when the background had complex patterns. My initial pipeline produced 2/10 images with ghosting around edges. Thats when I realized two things: one, over-aggressive inpainting ruins fine detail; two, you need an interface to specify the fill (grass, sky, wood grain) when the background is non-trivial.

Practical command used during testing:

# inpaint a photobomb region (brush coords or mask.png)
curl -F "image=@wide_scene.jpg" -F "mask=@mask.png" \
  -F "prompt=replace with sky and distant trees" \
  https://crompt.ai/inpaint -o wide_scene_fixed.jpg

What I learned: letting the model know what to recreate (short prompt) reduces artifacts and speeds up final approval. That small improvement dropped manual touch-ups by 70% in my sample.


Upscaling without ugly halos - experiments and a repeatable snippet

Upscaling is where most "enhancers" either create waxy faces or over-sharpen edges. I measured results using PSNR and SSIM on a test set of 40 images and compared baseline bicubic vs the neural upscaler. Average PSNR jumped from ~22.1 to ~28.4 and SSIM from 0.63 to 0.84 - not perfect, but visibly superior for product photos.

Heres the command I used to automate upscaling in batch:

# upscale a low-res product photo to 4x
curl -F "image=@thumb.jpg" -F "scale=4" \
  https://crompt.ai/ai-image-upscaler -o thumb_upscaled.jpg

The upscaler preserved edges and reduced noise; the previews were ready in seconds, letting designers approve or tweak prompts quickly.


Trade-offs and the architecture decision I made

I tested three architectures:

  • One monolithic tool that did everything server-side (fast but opaque).
  • A modular pipeline with small tools chained (slightly slower, very debuggable).
  • Local-first editing with cloud fallback (fast interactive editing, heavy client complexity).

I chose the modular pipeline. Why? The trade-offs: you pay a little in latency, but gain traceability (which step broke), and you can swap models for specific failures without reworking everything. For our team of mixed seniority that clarity mattered more than shaving 0.5s off an automated run.

One scenario where this doesnt work: if you must process tens of thousands of images concurrently with strict latency SLAs, a monolithic batch worker might be a better fit.


Before / after evidence and how I measured wins

Concrete before/after from a typical product shot:

  • Original: 640×480, PSNR baseline vs ground truth: 21.9, SSIM: 0.59
  • After remove-text + inpaint + upscaler: 2560×1920, PSNR: 29.1, SSIM: 0.86
  • Time to process (automated): ~2.4s per image on our test instance

These metrics meant marketing no longer rejected images for resolution or visible retouching, and the conversion team told us the gallery CTR improved marginally - a measurable win.


How the workflow looks in practice (brief playbook)

  • Run an automated scan to classify problems (text overlay, low-res, photobomb).
  • For text overlays, run the text-removal step and validate.
  • For objects, supply a quick mask and optional prompt for plausible fill.
  • Final pass: upscale with conservative sharpening and run a quick QC script that checks PSNR/SSIM thresholds.

Along the way I bookmarked a few links to the tools I used while prototyping and built a short internal README for the team so a junior engineer can run the whole pipeline.

AI Text Remover

Remove Objects From Photo

Photo Quality Enhancer

Inpaint AI

how neural upscalers sharpen small images


When I stepped back, the biggest win wasnt just cleaner pixels - it was predictability. The process reduced ad-hoc Photoshop sessions, allowed the junior designer to ship assets, and gave us reproducible metrics to defend the decision to invest time in automation.

If youre tired of inconsistent fixes and want a workflow that can be handed to someone else, build the three-block system described here: text cleanup, inpaint, upscale. Start small, measure PSNR/SSIM, and treat the tools as modular components you can replace when a better model appears. Youll save hours and get consistent, audit-able results - which is the sort of efficiency teams pay for when launch days get ugly.

Top comments (0)