简体   繁体   中英

Pass parameters along image for Image Recognition


I'm in a situation where 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#.
Thanks in advance!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM