Predictor#
- class Predictor[source]#
Bases:
object
Class for making predictions based off of a model bundle.
- __init__(model_bundle_uri: str, tmp_dir: str, update_stats: bool = False, channel_order: Optional[List[int]] = None, scene_group: Optional[str] = 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.
tmp_dir (str) – Temporary directory in which to store files that are used by the Predictor. This directory is not cleaned up by this class.
channel_order (Optional[List[int]]) – Option for a new channel order to use for the imagery being predicted against. If not present, the channel_order from the original configuration in the predict package will be used.
update_stats (bool) –
Methods
__init__
(model_bundle_uri, tmp_dir[, ...])Creates a new Predictor.
predict
(image_uris, label_uri)Generate predictions for the given image.
- __init__(model_bundle_uri: str, tmp_dir: str, update_stats: bool = False, channel_order: Optional[List[int]] = None, scene_group: Optional[str] = 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.
tmp_dir (str) – Temporary directory in which to store files that are used by the Predictor. This directory is not cleaned up by this class.
channel_order (Optional[List[int]]) – Option for a new channel order to use for the imagery being predicted against. If not present, the channel_order from the original configuration in the predict package will be used.
update_stats (bool) –