PyTorchSemanticSegmentation#
- class PyTorchSemanticSegmentation[source]#
Bases:
PyTorchLearnerBackend
- __init__(pipeline_cfg: RVPipelineConfig, learner_cfg: LearnerConfig, tmp_dir: str)#
- Parameters
pipeline_cfg (RVPipelineConfig) –
learner_cfg (LearnerConfig) –
tmp_dir (str) –
Methods
__init__
(pipeline_cfg, learner_cfg, tmp_dir)Returns a SampleWriter for this Backend.
Load the model in preparation for one or more prediction calls.
predict_scene
(scene, chip_sz[, stride, crop_sz])Return predictions for an entire scene using the model.
train
([source_bundle_uri])Train a model.
- __init__(pipeline_cfg: RVPipelineConfig, learner_cfg: LearnerConfig, tmp_dir: str)#
- Parameters
pipeline_cfg (RVPipelineConfig) –
learner_cfg (LearnerConfig) –
tmp_dir (str) –
- load_model()#
Load the model in preparation for one or more prediction calls.
- predict_scene(scene: Scene, chip_sz: int, stride: Optional[int] = None, crop_sz: Optional[int] = None) SemanticSegmentationLabels [source]#
Return predictions for an entire scene using the model.
- train(source_bundle_uri=None)#
Train a model.
This should download chips created by the SampleWriter, train the model, and then saving it to disk.