Writing

We Used One AI to Paint the Room and Another to Inspect It

One AI paints the room. Another inspects the painting. All so you can tap an imaginary sofa and buy a real one.

By Sagi Chizik10 min read

ai · product engineering · architecture

A painting of a living room on an easel, with the sofa marked by a detection box and linked to a real product card with a price tag

The product idea sounded almost suspiciously simple.

Take a photo of your living room, choose a style, set a budget, and get back a beautiful redesign using furniture you can actually buy.

Great product pitch. Easy to understand. The sort of thing you can explain to an investor before the coffee arrives.

Unfortunately, somebody then has to build it.

And somewhere between "make my room look like this" and "where can I buy that sofa?" lies an impressive collection of computer vision, product search, generative AI, orchestration, and the usual software engineering problems pretending they weren't invited.

We ended up with a system that examines your room, finds the furniture, searches real product catalogs, generates a redesign, and then hands the resulting image to another AI model to identify the objects it just helped create.

One AI paints the room. Another inspects the painting.

There are cheaper ways to offer someone a sofa.

The Sofa Doesn't Exist. That's a Problem.

AI interior-design demos are ridiculously easy to make impressive.

Upload a photograph, ask for Japandi, and shortly afterward you're looking at a beautiful living room with tasteful lighting, expensive-looking furniture, a perfectly coordinated rug, and absolutely none of the clutter you spent the previous decade accumulating.

Amazing. You want that room.

So you tap the sofa.

Nothing happens.

You ask where to buy it, and discover a minor inconvenience: the sofa doesn't exist.

The AI invented it. Along with the lamp, the coffee table, and possibly a few architectural details that weren't there when you took the photograph.

This is where the demo ends and the product begins.

A generated image can inspire someone, but our goal was different. We wanted the things inside that image to connect to real products, real prices, and somewhere the customer could actually buy them.

The imaginary living room needed a supply chain.

Which meant we had to stop treating the image as the final result and start treating it as one stage of a much larger system.

First, Establish That This Is Actually a Room

Before redesigning anything, we need to understand what the customer uploaded.

This brings us to one of the oldest laws of consumer software: if you give people an upload button, they will upload things.

Write "Upload a clear photograph of your living room" in enormous letters, and someone will upload a selfie. Someone will upload their dog. Someone else will upload something so dark that neither AI nor human civilization can confidently determine whether there's a sofa in it.

So the first challenge is validation. Is this an interior? Is the image usable? What objects can we identify? Which parts are furniture, and which are permanent features of the room?

Computer vision gives us a useful starting point. It can recognize sofas, tables, chairs, lamps, windows and doors.

Excellent.

Except recognizing an object doesn't mean we should offer to replace it.

A model might correctly identify a window. That doesn't mean the customer should be able to tap it and order a Scandinavian replacement for $299.

This is an important product-engineering distinction. Perception tells us what the model believes is present. Product rules decide what we're willing to do with that information.

“Sometimes the best use of AI in an AI product is deciding not to use more AI.”

Not every decision needs another model call. Sometimes a well-defined rule is more predictable, cheaper, and considerably less likely to develop creative opinions about your load-bearing walls.

The trick is knowing where AI's flexibility is useful and where ordinary software should take over.

A Budget, a Catalog, and Increasing Desperation

Once we understand the room, we need to find furniture that matches the requested style and budget.

Sounds straightforward. Search a catalog, pick some products, and send them to the image generator.

Except people don't distribute their furnishing budgets equally. A sofa and a table lamp have different price expectations, however mathematically elegant it might be to allocate them both 20% of the budget.

And product catalogs are not magical inventories containing precisely the furniture you imagined.

Sometimes the perfect sofa isn't available. Sometimes the color is wrong, the dimensions don't fit, the retailer doesn't deliver to your location, or the beautiful armchair costs more than the entire room budget.

So we need more than a search box.

We need to rank real products against what we're trying to create, considering factors such as category, style, visual similarity, price, and suitability. And when an exact match doesn't exist, we need a sensible way to relax the requirements.

Our search strategy evolved into several levels of increasingly forgiving matches. In engineering language, progressive relaxation.

In less formal language:

Perfect → very good → good → acceptable → related → for the love of God, find me a sofa.

A staircase of matches getting worse step by step: a perfect sofa at the top, then a close one, a different colour, a loveseat, an armchair, and a single cushion on the bottom step.
From the perfect sofa to a single cushion. Search relaxation has its limits.

Of course, there's a limit. A cushion isn't a sofa, no matter how desperately the retrieval system wants to declare success.

The system needs to know when to offer a reasonable alternative and when to admit that it couldn't find one.

Demos assume the answer exists.

Products need a Plan F.

Building a Bridge While Someone Moves the River

Meanwhile, we had another complication: AI image models kept getting better.

Tools like Nano Banana made image generation and editing dramatically easier. Things that previously demanded complicated engineering pipelines were increasingly becoming built-in model capabilities.

Which creates a strange situation when you're responsible for building an actual product.

You look at a problem and estimate two or three months of engineering. Then you look at the rate of progress in the models and quietly wonder whether the same problem will take two or three days by the time you're finished.

It's not a particularly comfortable way to plan a roadmap.

“Right now, sometimes you're halfway through building the bridge when somebody announces that the river has moved.”

But you still have to build the bridge.

Customers exist today. They don't want to hear that you're waiting for a hypothetical model release because someone posted a suspiciously perfect demo on X.

You work with the capabilities you have, solve the messy edge cases, and design the system so individual steps can be replaced when better options appear.

Some beautifully engineered component may become unnecessary six months later. A model may suddenly handle in one call what previously required five services and several unpleasant debugging sessions.

Fine. Delete it.

That doesn't mean the original work was wasted. It delivered value when it was needed, and a modular architecture makes it easier to replace without dismantling everything around it.

Still, it's mildly irritating when the river eventually gets an API.

Please Don't Move the Walls

Eventually, we have a validated room, a style, a budget, and a collection of actual furniture products.

Now for the part everybody wanted in the first place: generating the redesign.

This is where generative AI is both spectacularly useful and occasionally concerning.

Ask an image model to replace your old sofa and coffee table, and it might produce a beautiful result. It might also move the window to the ceiling, remove a doorway, expand the living room by three meters, and invent a coffee table with geometry that would fascinate mathematicians and injure children.

Two versions of the same living room. The original, marked with a check, is normal. The AI redesign has a window moved to the ceiling, the door on the wrong wall and an impossible coffee table.
Same room, allegedly. The window and door appear to have relocated.

Generative models are wonderfully creative.

Unfortunately, we're redesigning somebody's living room, not submitting an architectural proposal to Blade Runner 2049.

The challenge is controlled creativity.

We want to preserve the room's structure, perspective, doors, windows, and recognizable geometry while changing the furniture and design elements the customer actually wants to change.

And because the result is supposed to lead to real purchases, we also want the generated furniture to remain reasonably faithful to the actual products we've selected.

That's a very different requirement from producing a beautiful picture.

The customer should look at the result and think, "That's my room. I want it to look like that."

Not, "That's a lovely room. I wonder whose apartment it is."

The Image Becomes the Interface

Now comes my favorite part of the entire architecture.

We've examined the original room, identified replaceable furniture, searched real catalogs, selected products, and asked an image model to redesign the space.

We have a beautiful image.

Then we send that image to another AI model and ask it to find the furniture.

Yes. Again.

Except this time, the objective is different.

The first vision stage helps us understand what exists in the customer's original room. The second examines the generated result and determines where the furniture appears in the final image.

A bounding box gives us an object's location. We can then associate that detected object with the appropriate product from the catalog selection.

Suddenly, the imaginary sofa has coordinates.

And those coordinates point to a real sofa, with a real price, from a real retailer.

Tap the sofa, see the product. Tap the table, see the table.

The generated image has stopped being merely a picture.

It's the interface.

Traditional ecommerce gives us grids, filters, sorting controls, product cards, recommendations, and, when civilization has exhausted all other options, another carousel.

But in this case, we already have a more intuitive interface: the customer's own room, redesigned around products they can buy.

There's an important engineering detail hiding inside that pleasant interaction. Detecting a sofa in an image doesn't automatically prove which catalog item it represents. We need to maintain the relationship between the selected products, the generation process, and the objects detected afterward.

Otherwise, we could happily show someone a product card for a sofa that only vaguely resembles the one they're tapping.

The mapping needs to be good enough to be useful, and uncertain matches need to be handled rather than quietly invented.

Pixels become objects. Objects become coordinates. Coordinates connect to products.

Imagination gets foreign keys.

All This for a Sofa

Of course, none of this is free.

Behind that innocent "Redesign my room" button is a pipeline involving vision models, product retrieval, ranking, image generation, more computer vision, background processing, storage, retries, and enough compute to make you briefly reconsider the economics of furniture retail.

All so we can eventually say:

How about this sofa?

I find that both ridiculous and rather wonderful.

We've assembled extraordinary amounts of computing power so a machine can examine your living room, develop opinions about it, imagine an alternative universe in which you have better taste, inspect its own imagination, and suggest something close enough that you can actually buy it.

But a convincing demo isn't a reliable product.

Image generation takes time. External services fail. Models return unexpected results. Product catalogs change. Jobs time out. Sometimes a step needs retrying without restarting the entire process, and sometimes we need to tell the customer that the attempt didn't work.

So the futuristic AI experience eventually meets its old friends from ordinary software engineering: queues, workers, persistent state, timeouts, recovery, observability, and the deeply unglamorous art of making things work on a Tuesday afternoon.

AI gets the demo.

Distributed systems get it home safely.

And some of this architecture will inevitably become obsolete. Models will improve. Capabilities will merge. Pipelines will shrink. Something we spent weeks engineering may eventually become a checkbox in a model API.

Good.

That's the deal when you build products on top of technology moving this quickly. You have to make useful things with what exists today while remaining willing to replace your own clever solutions tomorrow.

For January 2026, this was what it took.

One AI paints a room. Another AI inspects the result. Between them sits enough product engineering to turn an attractive hallucination into something a customer can interact with.

And after all the models, embeddings, image processing, product matching, queues, and carefully controlled creativity, we've managed to reinvent one of humanity's oldest commercial interactions:

Would you like to buy this chair?

← More writing