Be cultured

Have you ever visited a city and wanted to discover its past? Discover its history and its secrets?
But it is not your thing guided tours or group visits. Or you don't want to put money in this kind of activity. That is my case for example.
Today with our phone we can do so many things that seemed impossible a few years back.
What we can do with a simple photo ?

With a simple photo you can know how many calories there are in your dish, or even know what music is playing by simply activating the microphone on your phone.

What if our smartphone becomes our guide during our trip across new cities?

Use artificial intelligence

To develop this idea, we have to use the artificial intelligence, and more precisely we will use ml5.js.

What is ml5.js ?
It's a library which provides access to machine learning algorithms and models in the browser, building on top of TensorFlow.js with no other external dependencies. The library is supported by code examples, tutorials, and sample datasets with an emphasis on ethical computing. Bias in data, stereotypical harms, and responsible crowdsourcing are part of the documentation around data collection and usage.

How we are going to code this?

We are going to use a function called imageClassifier(). This function will allow the AI to recognize the content of an image, and us to know which monument we are visiting.
To understand and learn how AI will works and operates for recognize image, this video will help us:



What we have to remember:

  • use a pre-trained model (somebody else made a machine learning model that knows how to recognize the contents of images)
  • a pre-trained model for image classification has a fixed number of even things in the wolrd it know about
  • you may be able to download the ML5 Javascript library file itself and include it on your computer
  • make reference to the library in your index.html file
  • once your ML5 library is imported, you can start calling ML5 functions
  • create a .js file to include the code for ml5
  • create a function to display the results
  • See what happens