Skip to content

about the python top level api #2

@yxdragon

Description

@yxdragon

predict(path, framework, model)
I think it is beter to split it in two step, because new the predictor and predict is two step.

  1. 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.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions