Exploring the possibilities of Generative AI for Real Estate: use cases at Casavo.

Alberto Bellini
Casavo
Published in
8 min readMar 30, 2023
Variations of a Bedroom generated using Stable Diffusion — Credit

Introduction

Casavo is on a journey to change the way people sell, live, and buy homes in Europe. Our innovative approach to real estate is disrupting the traditional market by leveraging advanced technology to streamline the process and make it more transparent and efficient for everyone involved.

To achieve this goal, we harness the power of Machine and Deep Learning techniques to tackle numerous challenges in the real estate industry. With AI, we can predict the value of a property and analyse home images to gain insights into their contents, anonymise them, and detect NSFW material to share images safely with potential buyers. However, with the recent advent of generative AI, we cannot help but consider the potential applications of this technology in our company. That’s why we conducted a study to explore how diffusion models could accelerate some of our internal processes and enhance our services even further.

Generative AI

Images Generated by Stable Diffusion — Credit

Generative AI is a fast-developing field that utilises deep learning models to create new data, including images and text. Over the past two years, we’ve witnessed a surge in the use of these models and their increasing presence in our lives. Notably, the emergence of ChatGPT, which took just two months to reach 100 million users, has demonstrated the potential of AI-generated text. Similarly, advancements in image-generation models like Midjourney, DALL-E, and Stable Diffusion have shown that these models are capable of creating images with a high degree of fidelity and creativity.

Among the different generative AI models available, Stable Diffusion has emerged as a promising model that could potentially help Casavo take its services to the next level. This model, developed by the startup Stability AI, is based on the principles of diffusion processes in physics and mathematics. It operates by iteratively refining an initial noise signal to generate images with a high degree of realism and creativity. What’s great about this model is that the denoising process, which leads to the generation of the image itself, can be guided using a textual prompt. These features make the model versatile and suitable for various tasks, including text-based image generation, image inpainting, image-to-image variation generation, and super resolution.

Image Inpainting using Stable Diffusion — Credit | Credit

For instance, these images were created using Stable Diffusion and text-guided inpainting, starting with a dog on a bench and the famous Windows XP wallpaper, respectively. In both images, we masked a portion that was then translated into noise. We then let Stable Diffusion remove the noise while guiding the process with textual prompts, such as “some sheeps on the grass”

If you are curious about the inner workings of Stable Diffusion, this great article titled “The Illustrated Stable Diffusion” by Jay Alammar is a good place to start.

How Casavo could leverage this technology

By incorporating generative AI into its operations, Casavo can improve its internal processes and provide clients with a more immersive and interactive experience. The possibilities of using generative AI in our business are numerous, and we’ll explore some of the most promising ones here, including property renovation, organic traffic generation, and property image enhancements. Let’s take a closer look at each of these use cases and provide some examples.

Renovation — One of the key aspects of our iBuyer business model is acquiring properties, renovating them, and then selling them on the market. However, the process of renovating an apartment and furnishing it to appeal potential buyers is a labor-intensive and time-consuming task. By using generative AI, we can potentially speed up this process and boost the creativity of our team.

With the help of Stable Diffusion, we can select a picture of an apartment and generate a renovated version of the property with a completely different style and furniture. By adjusting the amount of noise added to the original image, we can control the level of creativity in the output and the preservation of the original key features. To illustrate this, we have generated some variations of a property by adding 25% noise to one of its images and used different prompts to guide Stable Diffusion in imagining the same property renovated in multiple styles. Here are the results.

A picture of a bedroom in an apartment — Credit
Image and Noise combined are fed to Stable Diffusion, with guidance text prompts
Stable Diffusion de-noises the input image following the textual guidance

As demonstrated, generating multiple variations of an image with different and attractive furnishing styles is relatively straightforward. The most significant effort is required in the text prompt engineering, which can produce vastly different results. We had to carefully adjust both the amount of noise added to the input image and the text-guidance weight while generating the results to obtain relevant outcomes. It is essential to note that, despite its potential benefits, Stable Diffusion technology is not yet advanced enough to entirely replace the manual process of renovating a house, including selecting and arranging furniture that was not present during training. Nevertheless, this technology can undoubtedly aid our team in generating creative ideas to renovate apartments.

Organic Traffic Generation — Another use case relates to how this technology could potentially enhance the organic traffic for buyers on our listing platform. For instance, buyers could use this technology to visualise how an empty apartment for sale would look like with furniture simply by invoking Stable Diffusion through a web interface. This feature might bridge the gap between viewing a listing and visiting the property, as it allows users to imagine how an empty space could look like with furniture. This would be possible by the Stable Diffusion inpainting functionality, which translates to adding 100% noise to a portion of the image (a mask) and have the model reconstruct it from scratch using a text prompt as guidance.

While experimenting, we pretended to have this tool already deployed and tested it on a property for sale on our platform. We masked portions of the space and used text-prompts to add furniture pieces at each iteration. The results are impressive, and we would like to share some of them with you.

An empty listing for sale on our platform

We selected one of the pictures of this lisiting and iteratively masked a portion of it, added a prompt, and asked the model to inpaint with new furniture. We briefly highlight the process for a single prompt, and then showcase a collage of images with a summary of each step.

Process of Inpainting using Stable Diffusion with prompt “An empty kitchen”Credit

As you can see, the model flawlessly performs inpainting on the masked area of the image, reconstructing the background scenery while retaining the original blur effect and erasing the person. Undoubtedly, this technique can prove beneficial in various other contexts, which we shall explore later. Nevertheless, for this particular use case, we will utilise inpainting solely to augment the appearance of a property by adding furniture, as demonstrated in the subsequent pictures.

Iterative Image Inpainting to furnish an empty room

And just like that, we generated two simple concepts for furniture in our apartment (please don’t judge my design skills 😅). A potential buyer could have fun using this tool on our platform if it’s served in an intuitive and user-friendly manner. In the future, we could even combine the previous ideas to generate variations of the apartment furnished by the buyer, after they’ve decided on the key aspects they’d like to see in the room. Sticking with the Scandinavian and Industrial styles, these images depict possible variations which preserve the concepts of a room furnished with a bed, a carpet and a painting.

Scandinavian and Industrial variations of a furnished room

Image Enhancements — Lastly, this technology can be useful for automatically anonymising pictures or documents that we collect from our clients for downstream tasks, such as showing apartment previews to potential buyers. In this scenario, we can use a simple pipeline with object or text detectors to automatically mask “sensitive” portions of the image. With the help of Stable Diffusion, we can then ask the model to reconstruct the image without the sensitive content. However, this approach has the drawback of potentially generating artefacts in the images, so it is not yet reliable enough to be implemented in production. Future versions of such generative models may allow for this task to be carried out autonomously. Currently, we do not integrate Stable Diffusion into our anonymisation pipelines and prefer to blur out content flagged as sensitive or NSFW. Regardless of this, here are a few images that depict what we could possibly build in the future.

Possible Stable Diffusion Anonymisation Pipeline — Credit

Impressive, isn’t it? It’s worth noting that all of these images were processed using Stable Diffusion, rather than being manually edited with tools like Adobe Photoshop. This technology could prove to be extremely useful not only for actual images, but also for documents such as floor plans. As an example, the following image demonstrates how our anonymisation pipeline detects and removes text. However, due to the technique we use (blurring and color replacement), the outputs can be quite noisy. By implementing Stable Diffusion, we could potentially improve this anonymisation process even further.

Our current document anonymisation pipeline, without SD. As you can see from the rightmost image, results are quite noisy. SD could improve the outputs. (Sensitive information have been manually brushed away with an orange brush in the leftmost image for obvious reasons)

Conclusion

In conclusion, Casavo’s commitment to revolutionising the real estate industry using advanced technology is evident in our use of Machine and Deep Learning to simplify the process of buying and selling a home. However, we’re not content with stopping there. Generative AI is an exciting and promising field that could enhance Casavo’s services even further. Stable Diffusion, in particular, has shown remarkable results in creating images that are both realistic and creative. Incorporating generative AI into our operations could improve our internal processes, provide clients with a more interactive experience, and assist our internal employees. While generative AI may not replace manual work entirely, it has the potential to generate creative ideas and expedite processes.

Casavo is always looking for innovative ways to improve our services and provide our clients with the best possible experience. If you share our vision for transforming the way people sell, live, and buy homes, we invite you to check out our open positions and join us on this exciting journey. Together, we can create a more transparent and efficient real estate marketplace using cutting-edge technology 🏠 🚀

--

--

Alberto Bellini
Casavo
Writer for

Machine Learning Engineer @ DocuSign | Applied Science