We thought representing the history of MLH and all of the competitions that have happened over the past 7 years somehow would have been really cool. By putting together some slideshows, videos, and images together, all of which are based on scraped data from MLH, there's a nice nostalgic feeling.

What it does:

Hack to RSVP uses a combination of technologies to watch previous memories and create new ones! The project produces videos and photo mosaics with programming and pictures from past hackathons. Hack to RSVP handles heavy data scraping, video clip rendering, image manipulation, and even includes a Wi-Fi camera created with Google AIY hardware.

How I built it:

We split the responsibilities of the project among the team surrounding the following elements:

1. Scraping

Several UiPath processes were used to get hackathon names, find facebook albums, find picture links, and save all the pictures locally. The entire process took around 2:30hrs and generated 57000 pictures.

2. Image Mosaic

Using the scraped images, as well as a base image from the actual hackathon, we were able to make an image mosaic comprised of scaled-down versions of the scraped images. This works by splitting the base image into a grid and getting the average color of each grid section and then mapping that grid section to one of the smaller photos with a similar average color. The averages were done using NumPy, and the actual image manipulation was done using the Pillow module for python.

3. Word Cloud (Logo Style)

Using the scraped list of competition names from the MLH website along with a base image made in photoshop, we were able to use python to: create a dictionary of the most common words in each competition, scale each term based on frequency, and apply each word onto the outline of a base image. This ended up becoming one of the parts of our logo.

4. Video Slideshow

Going back to the scraped images, we opted for the Moviepy module to sort through the pictures and use them to do produce videos, all through pure code. With the region detection and masking functionality of Moviepy, we wrote the code to take images appropriate for both a background (outside the MLH duck) and a foreground (inside the MLH duck) and assembled them into slideshows. The slideshows are entirely unique and are generated with any of the 50,000+ images at runtime.

5. WiFi Camera Hardware

We wanted to create a project that leverages all the technology available to us. Therefore, we decided it would be a really cool idea to build a camera that instantly sends the picture taken to the computer for a video to be processed. This was done with a Raspberry Pi Zero W connected to Google's AIY Bonnet. The Pi communicated with the computer via SSH & FTP for file transfer.

Challenges I ran into

  • The pages scraped using UiPath used a rendering strategy called "lazy loading", which limited the content showed. After some experimenting with RPA, we were able to develop a solution to simulate user interaction by sending hotkeys to scroll to the bottom of the page.

  • The process to scrape all the images was very long and inefficient. A few errors during the execution of the automation delayed us from getting all the pics.

  • Since UiPath is a robotic tool, Facebook blacklisted the accounts as Spam/Bots. To fix this, we implemented delays between the actions.

  • Having a clear image mosaic means a lot of images. Although we had 57 thousand images, running everything took an extremely long time to process.

  • Creating videos through pure code means we had to fully render the video each time to really confirm it was doing what we wanted it to do. Since we had to do a lot of positioning adjustments, this took away from our total project time.

  • Corrupted MicroSD issues on the Raspberry Pi that required to format the drive and reconfigure the entire device delayed us.

  • The WiFi Camera Hardware requires a power supply to be connected to the device so it can function. However, we wanted to make something more "remote". To overcome that, we had the great idea to use a portable charger to power the device. However, the amperage conducted on the device was not enough. Therefore, we had to connect 2 portable chargers and then cut both cables and connect them into one to provide double the amperage. This made it work really well!

Accomplishments that I'm proud of

We are proud of revisiting MLH's history with photos, videos, hardware, and much more! We were able to build this awesome project by helping out each other as a team with different levels of experience. We are proud of being part of MLH and working on a project that attempts to use all the technology provided.

What I learned

  • How to use UiPath: create DataTables, variables in VB, Data Scraping using CSS selectors, "If" statements, loops, creation of CSV files, reading CSV files, making HTTP requests, downloading pictures.

  • How to use Moviepy: How to create different types of clips, usage of advanced masking, region detection, cropping, resizing, adding music, stacking clips, and multiple clip rendering.

  • How to use Raspberry Pi, SSH, FTP to connect hardware with software.

  • How to manipulate photos with Numpy & PIL.

  • How to double the amperage!

What's next for Hack to RSVP

We want to put Hack to RSVP in the cloud for others to utilize our service to see past memories and create new ones! Submission (Domain bought, but no DNS configuration at the moment)

Built With

Share this project: