To make this classification of images I used teacheable machine, which is used to train certain images and this application allows you to get the code in both p5.js and Javascript so we are talking about tensorflow.js, to get the images that later I used ImageAssistant Batch Image Downloader which is a google extension that is used to download many images at once.
You can only make a classification with 15 different countries of the world:
Argentina
Brazil
China
France
Germany
India
Italy
Japan
Mexico
Norway
South Africa
Spain
Switzerland
United Kingdom
Usa
Steps to be able to classify an image:
Make sure your camera of the device you are using is in proper working order.
Search from a different device for an image from a country I have named above.
Put the image close to the camera and make sure it is well positioned.
You will now have the result.
Steps to do it yourself:
Install the google extension (ImageAssistant Batch Image Downloader).
Use the extension to collect a lot of images and download them.
Once downloaded, save them all in a folder, but first check the pictures for any incorrect ones.
Look for https://teachablemachine.withgoogle.com/train/image , that's where you start to put the different image folders.
Click on train the images, it may take a while depending on the folders.
Once the images are trained, click Export Model and you get the code in Tensorflow.js and click Upload Model.
Finally, you can copy the code and upload it to neocities.org as in my case.