ScenePredictor#
- class ScenePredictor[source]#
Bases:
objectClass for making predictions on a scen using a model-bundle.
- __init__(model_bundle_uri: str, predict_options: str | dict | rastervision.core.rv_pipeline.rv_pipeline_config.PredictOptions | None = None, tmp_dir: str | None = None)[source]#
Creates a new Predictor.
- Parameters:
model_bundle_uri (str) – URI of the model bundle to use. Can be any type of URI that Raster Vision can read.
predict_options (str | dict | rastervision.core.rv_pipeline.rv_pipeline_config.PredictOptions | None) – Either a URI to a serialized
PredictOptionsor a dict representing a serializedPredictOptionsor aPredictOptionsinstance.tmp_dir (str | None) – Temporary directory in which to store files that are used by the Predictor.
Methods
__init__(model_bundle_uri[, ...])Creates a new Predictor.
build_scene(scene_config)predict(scene_config)Generate predictions for the given image.
predict_scene(scene)Generate predictions for the given scene.
- __init__(model_bundle_uri: str, predict_options: str | dict | rastervision.core.rv_pipeline.rv_pipeline_config.PredictOptions | None = None, tmp_dir: str | None = None)[source]#
Creates a new Predictor.
- Parameters:
model_bundle_uri (str) – URI of the model bundle to use. Can be any type of URI that Raster Vision can read.
predict_options (str | dict | rastervision.core.rv_pipeline.rv_pipeline_config.PredictOptions | None) – Either a URI to a serialized
PredictOptionsor a dict representing a serializedPredictOptionsor aPredictOptionsinstance.tmp_dir (str | None) – Temporary directory in which to store files that are used by the Predictor.
- build_scene(scene_config: str | dict | SceneConfig) Scene[source]#
- Parameters:
scene_config (str | dict | SceneConfig) –
- Return type:
- predict(scene_config: str | dict | rastervision.core.data.scene_config.SceneConfig) None[source]#
Generate predictions for the given image.
- Parameters:
scene_config_uri – URI to a serialized
ScenConfig.scene_config (str | dict | rastervision.core.data.scene_config.SceneConfig) –
- Return type:
None