Case study

AI Sky Replacement and Lawn Repair for Listing Photos

PropTexx wanted two fixes for exterior listing photos: replace dull skies without putting sky inside white or snow-covered roofs, and turn patchy, brown lawns green without covering the house, people, paths or shadows.
  • Client: PropTexx
  • Industry: Real Estate & PropTech
  • AI capability: Computer Vision & Generative AI
Visit PropTexx (opens in a new tab)
Two before and after pairs: a snowy stucco house whose pale sky is replaced with blue sky and clouds while the snow-covered roofs stay intact, and a back yard where bare, patchy lawn is turned into green grass while the path, fence and house are unchanged
Sky replacement per image on GPU, within the 40 s target
~10-12 s
Pixel-annotated failure images in the sky evaluation set
30
Grass replacement step per image on GPU
~1.5 s

The challenge

White roofs look like sky, and lawns sit under everything

PropTexx's existing sky model put sky inside white or snow-covered roofs and left halos around branches, antennas and fences, errors buyers notice. Processing had to stay under 40 seconds for a 3 MB image. The lawn fix had to replace all visible bad grass with a realistic lawn, with no halo at the edges and nothing on the grass covered: furniture, steps, handrails, people, plants. Existing shadows had to stay, and PropTexx could supply only around 1,000 sample images, with no before/after pairs.

What we built

Segment first, then replace only what should change

Masks decide which pixels are new; everything else is copied from the original photo.

  1. Stage 1

    Sky: evaluation set

    We collected 30 failure images, including the client's bad enhancements, annotated them at pixel level and scored the model on pixel accuracy, Jaccard and Dice.
  2. Stage 2

    Sky: pre-processing and a second model

    Denoising, sharpening, contrast and edge enhancement help find the sky, which is then replaced in the original photo. A second segmentation model, stronger on roofs and houses, runs in parallel with the original model.
  3. Stage 3

    Sky: contour corrections

    Contour methods find objects above a minimum size, which are preserved in the final composite.
  4. Stage 4

    Lawn: segmentation

    A MaskFormer semantic segmentation model, trained on the open ADE20K dataset, separates lawn from everything else in the photo.
  5. Stage 5

    Lawn: grass replacement

    An unpaired image-to-image translation model (CUT), trained on PropTexx's brown and green lawn photos, turns poor grass into healthy grass while keeping shadows and texture. The mask copies every non-grass pixel back from the original.
  6. Stage 6

    Lawn: testing and hand-over

    A web test interface on AWS let the PropTexx team run their own photos through segmentation, replacement and the combined output, with each model's time per image. The code and model links went to PropTexx's repository.
  • Sky replacement on a hard case from the March 2022 test set: a white, snow-covered roof against a white sky.

The impact

Two photo fixes ready for PropTexx's API

  • Sky replaced in about 10-12 s per image on GPU
  • Better roof handling, as reported by PropTexx
  • Lawn repaired without touching the house, paths or shadows

PropTexx reported a "significant improvement in the quality of replacements for roofs". Sky replacement runs in about 10-12 seconds per image on GPU, within the 40-second target, and became a module of PropTexx's v2 computer-vision API, where scene classification routes outdoor photos to it. Skies behind fine tree branches remained the hardest case. Lawn repair takes about 10 seconds for segmentation and 1.5 seconds for replacement on GPU. PropTexx used the repaired photos in its marketing material, and the model was later packaged as a Dockerised FastAPI service for its v2 model API.

Keep exploring

All case studies

Book a strategy session

Talk to an AI engineer about your project

Tell us what you want to automate. The first call is a 30-minute working session with an engineer, not a sales pitch.

  • Send the form, it takes 2 minutes
  • We reply within 1 business day, under NDA if you need it
  • A 30-minute call to scope feasibility and next steps

Tell us about your project

By submitting, you agree to our Privacy Policy. We never share your details.