Inspiration
We all have that one moment where we are amazed by a stunning image of a monument or a historical landmark. There are cases where we may stumble to find the name of the location in the image. This becomes the idea for my ideal location prediction website using machine learning.
What it does
The website can be used to predict the name of a location or landmark from an image using a pre-trained machine learning model. The model can predict around 98949 places in ASIA.
User workflow
- The user can go to the website in something-amazing.live and click on the upload button to upload an image.
- Then click on the Predict button to predict the name of the location from the uploaded image.
- The results are displayed in a popup box starting from the highest probable answer to the lowest probable answers
How I built it
The website was built using React with typescript in the frontend and flask framework in the backend. A MongoDB database is used to store the names of 98949 locations which are mapped with the results of the machine learning model to find the name of the location predicted by the model. This website is dockerized with an Nginx web server to run on any cloud platform and is incredible and can be easily deployed using the IAAS feature of cloud computing with the help of terraform.
Challenges I ran into
Some of the challenges I ran into are,
- Making the machine learning model compatible with the flask backend.
- The machine learning model returns an array of 98949 probability values which are hard to process.
- Configuring CORS for the Nginx web server on the frontend as the frontend container uses a proxy to direct connections to the backend container.
- Configuring the terraform files for complete end-to-end automation.
Accomplishments that I'm proud of
I was able to create end-to-end automation using terraform. Anybody without prior knowledge or experience in cloud computing can easily deploy the application by following instructions in the Github repository. Everything is dockerized to deploy easily. I was able to integrate the machine learning model and backend and also process the results and get the data from MongoDB successfully.
What I learned
I learned how to use a machine learning model on a website and gained a lot of experience while building the website. I also learned how to automate the process in production environments
What's next for Untitled
The next step will be to extend the project to make the machine learning model predict locations from all over the world.
Please visit the project page on Github for complete documentation .
Built With
- docker
- flask
- react
- tensorflow
- terraform
- typescript