InstaVision

http://wingfelder.ca/instavision

I was recently very interested in learning about computer vision and AI since it is all the rage today and has been upvoted to buzzword heaven in the media. I decided to dive in head first and create some software that utilized this budding new technology. After some thought I came up with an idea that to my knowledge hasn’t been done before and would be easy enough to implement.

sample-cloud

Concept: Create a “wordcloud” using a person’s Instagram pictures as the input.

This was the concept that I came up with after a few iterations and pivoting because of some technical roadblocks along the way. The original idea was to give the user a personality assessment based on the Instagram media that they “liked” or “hearted.” This proved to be too difficult based on Instagram’s insanely strict API terms of service. This may be something I look at in the future.

How it works:

I decided to write the backend of the app in python, mostly because I have never used python before and wanted to get a handle on it. I’m very glad that I did. Python is super easy to pick up and the community is so big that you can find documentation on anything you need. Coming from a background in java, python proved to be super simple and “just worked.”

The first step was to get the pictures from Instagram. I decided not to use the legit Instagram API at all because of the ridiculous restrictions.
I ended up finding a python based instagram scraper that doesn’t use the API at all. After a few tweaks I was able to get it to scrape all the images I wanted and download them to my server. You can find it here https://github.com/rarcega/instagram-scraper

Next was the actual AI and Computer Vision portion. I used the Google Vision API to analyze the pictures. This works by sending the pictures that we scraped above to Google and they send back a list of words that their Cloud AI “saw” in them.

Now that we have the list of words in the picture the last part was to create a wordcloud based on these words. Of course there was already a python built API for this. It can be found here https://github.com/amueller/word_cloud

This was all relatively easy and now the backend was complete. Presenting this to the users turned out to be the hardest part of the project mostly because I have little to no experience in web development. After some research I decided to use a python web framework called Flask to create the web app. I used apache2 to serve the HTML5 template and then Flask to handle all of the backend calls on my VPS.

The final product looks exactly how I envisioned it; simple, sleek and functional.

ivweb

Check it out yourself!

http://wingfelder.ca/instavision

Share

Leave a Reply

Your email address will not be published. Required fields are marked *