Skip to content

Repo for 42 days project to replicate/improve Airbnb's amenity (object) detection pipeline.

Notifications You must be signed in to change notification settings

mrdbourke/airbnb-amenity-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Replicating Airbnb's Amenity Detection with Detectron2 👁 🛏

This repository contains all the code from a 42-day project to replicate Airbnb's amenity detection using Detectron2.

example of how amenities might be detected in an image

Sample image taken from: https://www.airbnb.com/rooms/2151100

What's amenity detection?

Object detection but for common and useful household items someone looking for an Airbnb rental might want to know about. For example, does this home have a fireplace?

Original inspiration was drawn from the article Amenity Detection and Beyond — New Frontiers of Computer Vision at Airbnb.

Try it for yourself

To see the major pieces of the puzzle (data downloading, preprocessing, modelling), check out the example Colab Notebook.

You can also see a live and deployed app which uses the model (note: this may have been taken down by the time you check it due to costs, an extension would be finding a way to deply the model for little to no costs).

If the deployed application doesn't work, you can watch this video to get an idea:

deploying the airbnb amenity detection machine learning app on youtube

What's in this repo?

  • Notebooks with 00-10 are all the steps I took to train the full model, largely unchanged from when I originally wrote them.
  • preprocessing.py contains the preprocessing functions for turning Open Images images & labels into Detectron2 style.
  • downloadOI.py is a slightly modified downloader script from LearnOpenCV which downloads only certain classes of images from Open Images, example:
# Download only images from the Kitchen & dining room table class from Open Images validation set
!python3 downloadOI.py --dataset "validation" --classes "Kitchen & dining room table"
  • app contains a Python script with a Streamlit app built around the model, if you can see the live version, Streamlit is what I used to build it.
  • custom_images contains a series of different images related to the project, including various rooms around my house to test the model.

See how it was done

Questions/feedback/advice is welcome: daniel at mrdbourke dot com.

Releases

No releases published

Packages

No packages published

Languages