Inspiration

As an active Instagram user, I found it tedious to add the 'obvious' hash tags in the caption of every photo I post. This inspired me to create an app that would automatically generate the hash tags for me based on the image context. I also wanted a method of posting to Instagram through a different platform (not only restricted to my IPhone Instagram App).

What it does

InstaVision is a web application that allows users to upload a photo, automatically generate hash tags with the click of a button and post the photo to their Instagram account.

How I built it

I used Microsoft Cognitive Services Computer Vision API to analyse the uploaded image and return a list of keywords which are converted into hashtags that are inserted into the caption. I built the back-end using PHP and various third party APIs such as Imgur API for uploading an image to cloud temporarily and NXS API for posting to Instagram. For the front-end, I used Javascript/JQuery and AJAX for submitting form data to the API endpoint and handling image uploads, and I used HTML/CSS and the Bootstrap framework for the basic user interface.

Challenges I ran into

  • Debugging in PHP
  • AJAX errors
  • Uploading the image file: I initially uploaded the image directly to the server using the PHP command: move_uploaded_file, but in the end I resorted to uploading to Imgur due to various problems including read-only structure of Heroku.
  • Deleting the image file from Imgur after posting to Instagram
  • Handling and parsing the Computer Vision API JSON response

Accomplishments that I'm proud of

  • Making use of the Microsoft Cognitive Services API
  • Building the full web application alone in the limited time frame

What I learned

I learnt a lot about the Microsoft Cognitive Services and it's various APIs and how to utilise them in PHP. I also learnt how to handle file uploads and send requests to the API using AJAX.

What's next for InstaVision

  • Add a new feature to allow users to 'choose' an accuracy level for the hash tag generation.
  • Implement security using public key encryption for login details
  • Implement validation checks and security for image uploads
  • Improve usability and user-friendliness of the application

Built With

Share this project:

Updates