You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
predict(path, framework, model)
I think it is beter to split it in two step, because new the predictor and predict is two step.
modelo = predictor_factory.getPredictor(framework, model), in this step, the h5file, and json file should be downloaded, not when predict. That means everything is ok, I can work anytime.
predict( ndarray ), ndarray is the standard format in python image processing.
if you mix these in one method, when predict multi times, the model would be built again and again, (just my guess, right?), And the most important is, It is not friendly for user when predict first time, I did not known it is downloading file, but I think why it predicts so slow!
could you modify like this? then I will give a pr to imagepy plugin, which split build model and predict. And add the batch supporting in predict, then generate and show a result list.
The text was updated successfully, but these errors were encountered:
Hi @yxdragon,
the process of predicting and loading the model is separated. When you classify an image, the model is first loaded and the weights are downloaded, in case they are not already downloaded; using the ModelFactory. Once the model is loaded, we use the predict method to classify the image.
For this reason, when a user predict multi times, the model is only loaded the first time and then the model is used several times. The first time you predict with a new model it have to be downloaded (I will add a message or a progress bar indicating that) and that makes the process so slow.
predict(path, framework, model)
I think it is beter to split it in two step, because new the predictor and predict is two step.
if you mix these in one method, when predict multi times, the model would be built again and again, (just my guess, right?), And the most important is, It is not friendly for user when predict first time, I did not known it is downloading file, but I think why it predicts so slow!
could you modify like this? then I will give a pr to imagepy plugin, which split build model and predict. And add the batch supporting in predict, then generate and show a result list.
The text was updated successfully, but these errors were encountered: