As a travel lover, have you ever came across a random city picture while scrolling your Instagram, Facebook or Twitter feed and wondered : “Wow, this place is so beautiful, I wanna go there ! Where is it ??”. Well, I have.
I want people to stop wondering and start wandering, this is why I have chosen to work on Artificial Intelligence with a Machine Learning system recognizing any city in the world and providing its name and location to globetrotters, so that they know where to go next !
To create this machine learning system, we need to use ml5.js, a JavaScript library which provides access to machine learning algorithms and models in the browser, as well as MobileNets. Image classification is a machine learning problem where we define a set of targets, then train a model to recognize them using sample images. In our case, targets are cities : we need to establish a large dataset containing multiple images of different cities and let the AI learn from that data. Indeed, each city has a pattern based on its specific characteristics, such as monuments, architecture, famous places and so on. The more images the AI sees, the better its gets in its prediction.
To summarize :
1. We give the AI a broad image database with various cities and different places for each city.
2. The AI analyzes each image and integrates the patterns of each city to know how they look like.
3. The AI can recognize a city by comparing the image which has been uploaded to similar images in its database.
![]() ![]() ![]() |
|
![]() ![]() |
Here are some examples of the final result :