JEDDOREAsk AI
Reported: Jeddore's own professional record, shown with context. Not live company data.Live

AI Roof Visualization

Upload a photo of a house and see it with a new roof, while everything else in the photo stays exactly as it was.

Role
Solo designer and developer
Status
In production.
When
In production
Stack
  • Gemini image models
  • sharp
  • Cloud Functions
  • Cloud Storage
  • Cloudflare Turnstile
  • node:test

SanitizedBuilt for my employer, a North American manufacturer. Internal systems are proprietary, so this page describes the problem, approach and architecture without real data, customer names or screenshots.

Recreated demo · sample data

Change the roof, keep the photo

A simplified rebuild made for this page, with neutral branding and fictional data. It is not the production tool.

  1. 1Find the roofThe image model marks where the roof is.
  2. 2Make the maskCode turns that into an exact outline.
  3. 3Paint inside itThe model draws the new roof. Only pixels inside the mask are kept.
  4. 4Correct and blendCode fixes the colour and lays it onto the original photo.

This is a drawing that shows the idea, not a render from the tool. In the real pipeline everything outside the white mask comes from the original photo, so the walls, windows and trees cannot change.

The problem

A homeowner wants to see a new roof on their own house before paying for it. Image models can draw a convincing roof, but they also quietly change things nobody asked them to: a window moves, the brick changes colour, a tree disappears.

The opportunity

Let the model do the creative part and let ordinary code do the exact part, so the only pixels that can change are the roof.

My approach

  1. 01

    Find the roof

    The model marks up the photo to show where the roof is.

  2. 02

    Make a precise mask

    Code turns that markup into an exact mask of the roof, plane by plane.

  3. 03

    Paint only inside it

    The model generates the new roof. Only the area inside the mask is kept.

  4. 04

    Correct and blend

    Code corrects the colour on each roof plane to match the chosen product colour, then blends the result onto the original, untouched photo.

Architectural decisions

The house can't change
Everything outside the mask comes from the original photo. That is a property of the pipeline, not an instruction the model might ignore.
Colour is measured, not asked for
The colour correction happens in L*a*b* colour space, plane by plane, because a model asked for a named colour gets close but not right.
Give the model a ruler
Roof courses came out several times too large until the prompt pointed the model at things in the photo with a known size, like bricks and windows.
A public version that defends itself
The public version checks for bots, limits how often it can be used, and stores only hashed identifiers.

Capability status

Completed, experimental and planned capabilities, kept separate on purpose.

Live5

  • Roof replacement on an uploaded photo
  • Code-derived roof mask
  • Per-plane colour correction
  • Public embeddable version with bot checks and rate limits
  • Daily limits and recorded cost per render

Results & current status

  • In production, including a public version on a marketing website.
  • The image pipeline is covered by automated tests on the server.

Perspective

What brings you here?

Pick a perspective and the site reorders itself around what you care about. The facts don't change, only the emphasis. Change it any time from the top bar.

Evidence

  • Loading…