DEV Community

Voor AI
Voor AI

Posted on

How to Edit Body Shape in a Photo Without Bending the Background

Real consented body-edit before and after pair with stable background geometry

Generative body edits often fail outside the body. A waist changes—and a doorframe curves. A shoulder narrows—and wallpaper slides. The most useful QA artifact is therefore not a beauty score; it is a change mask over the full frame.

This workflow uses a consented photo and the current Voor AI Body Editor, whose live Seedream 4.5 workspace exposes an image input, prompt, aspect ratios, Public, and Generate. The before/after pair in this post is a real example from that exact route.

1. Set an edit boundary

Write the request as a small delta:

Make a subtle, anatomically plausible adjustment to the jacket waist only. Preserve the person's face, identity, hands, pose, clothing texture, camera crop, floor line, wall edges, and every background object. No skin exposure and no new accessories.

Do not ask for a vague “perfect body.” It has no measurable boundary and encourages the model to redesign the whole photograph.

Check consent and the Public control. During verification, the current default one-image request estimated 14 credits; inspect the live estimate before Generate.

2. Normalize the images

Save the source as before.png and the candidate as after.png. They should have the same dimensions. This Python script creates an amplified change mask and a checker overlay:

from PIL import Image, ImageChops, ImageEnhance, ImageDraw

before = Image.open("before.png").convert("RGB")
after = Image.open("after.png").convert("RGB")
assert before.size == after.size, "Compare equal-size images"

diff = ImageChops.difference(before, after)
mask = ImageEnhance.Contrast(diff).enhance(4.0)
mask.save("change-mask.png")

review = after.copy()
draw = ImageDraw.Draw(review, "RGBA")
w, h = review.size
step = max(32, min(w, h) // 12)
for x in range(0, w, step):
    draw.line((x, 0, x, h), fill=(0, 255, 255, 95), width=1)
for y in range(0, h, step):
    draw.line((0, y, w, y), fill=(0, 255, 255, 95), width=1)
review.save("grid-review.png")
Enter fullscreen mode Exit fullscreen mode

The mask answers “where did pixels change?” The grid answers “did straight structures stay straight?” Neither decides whether an edit is appropriate; they expose drift for a human reviewer.

Real edit pair prepared as a change-mask and straight-line grid review

3. Define the allowed region

Create a rectangle around the intended edit and calculate how much difference lies outside it:

import numpy as np
from PIL import Image, ImageChops

before = Image.open("before.png").convert("RGB")
after = Image.open("after.png").convert("RGB")
d = np.asarray(ImageChops.difference(before, after), dtype=np.float32).mean(2)

# Replace with the permitted x1, y1, x2, y2 region.
x1, y1, x2, y2 = 420, 260, 760, 820
allowed = np.zeros_like(d, dtype=bool)
allowed[y1:y2, x1:x2] = True

changed = d > 12
outside_ratio = (changed & ~allowed).sum() / max(changed.sum(), 1)
print(f"changed pixels outside allowed region: {outside_ratio:.1%}")
Enter fullscreen mode Exit fullscreen mode

This threshold is diagnostic, not universal. Compression, relighting, and resampling can change many pixels. Compare several candidates under the same settings rather than declaring one magic pass/fail value.

4. Run a human geometry review

At 200% zoom, follow every nearby straight edge through the edited zone: doorframes, shelves, tiles, horizons, table legs. Then inspect hands, elbows, garment seams, repeated textures, shadows, and contact with furniture.

Finally, blink between before and after at fit-to-screen size. If the entire scene appears to “breathe,” the edit escaped its boundary.

5. Reject, narrow, or disclose

If background changes dominate, reject the candidate. If one edge drifts, tighten the prompt around the exact garment region. Keep the untouched source and label the exported version as edited. Never use body edits to bully, sexualize, or deceive a subject.

The real pair shown here demonstrates the correct review target: the intended change is only one part of the frame; stable background geometry is the acceptance criterion.

Try the method in the exact Voor body editor, then let the change mask—not wishful viewing—tell you where the model wandered.

Top comments (0)