-1

I need to label a given image with an Image Recognition solution, and then skim the results based on another parameter. For example, I may pass the photo of the the City Hall of a certain city, and the algorithm would return me labels identifying the possible halls, for example Bologna City Hall, Modena City Hall, ecc..., and then, based on another parameter, the location, it would give me the correct label, like if the parameter is Modena select the Modena City Hall as the correct solution.

In a case where performance is very important how would you structure this?
Have a huge model trained with all the photos and then skim based on the result?
Have a different model for every city and select the correct one thanks to the parameter?
I also talked about this with my professor and he said to me to create an Image Recognition model which also takes the parameter as input so that it automatically considers only the photo of that city, but I haven't found any way to do this.
My first solution was to train a model using the Firebase AutoML API, but if this can't be done I can do a custom solution from scratch using Python or F#.

desertnaut
  • 57,590
  • 26
  • 140
  • 166
A.Lugini
  • 37
  • 3
  • if you know the location, feed it (as some encoding, look at what people do for NLP/text processing networks, or use a "positional encoding" of GPS coordinates) into the network besides the image. the network's graph will be a little less trivial because the network doesn't _only_ take a picture. – Christoph Rackwitz Dec 16 '21 at 15:12
  • 2
    I’m voting to close this question because it is not about programming as defined in the [mre] but about ML theory and/or methodology - please see the intro and NOTE in https://stackoverflow.com/tags/machine-learning/info – desertnaut Dec 16 '21 at 22:07

1 Answers1

1

You can build a classification model using neural network algoritm using "sklearn" library. In this case photos (witch are your input values) are some nparrays for example a 8Ɨ8 image is a numpy array with 8 columns and 8 rows. Then for your labels you add the cities. After that just train the MLPClassifier model from sklearn.neural_network with those data.

ASH
  • 31
  • 5