Rebel Locate

A team project for my machine learning course. Rebel Locate reads a photo's GPS metadata to work out which UNLV building it was taken near, then identifies what kind of room it shows. My KNN model picked the right building 98.01% of the time, and my CNN labeled the room correctly 91.83% of the time.

Python · PyTorch · scikit-learn · NumPyTeam of 5
98.01%accuracy for my KNN building model
91.83%accuracy for my CNN room model
6,000+images in the team's dataset

We split the main campus between the five of us, and each person photographed every building in their section. After agreeing on a shared design, we each built our own version and compared results.

  • A K-nearest neighbors classifier predicts the building from the latitude and longitude in each photo's EXIF data. I chose K with 10-fold cross-validation.
  • A CNN then looks only at that building's photos. It fine-tunes the last layer of a ResNet-18 pre-trained on Places365 (a scene-recognition dataset), with one output per room type, such as hallway, lounge or stairwell.
  • Photos taken at the same spot, like burst shots, stay together on one side of every train/test split, so near-duplicates can't inflate the accuracy.
  • For a new photo, it prints up to three likely buildings and rooms, each with its probability.
  • Python
  • PyTorch
  • torchvision
  • scikit-learn
  • NumPy
  • Pillow