-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1740 from AdeelH/label_source_extent
Ensure `RasterSource` and `LabelSource` extents match up in `Scene`
- Loading branch information
Showing
26 changed files
with
484 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 16 additions & 2 deletions
18
rastervision_core/rastervision/core/data/label_source/label_source_config.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,26 @@ | ||
from typing import TYPE_CHECKING, Optional | ||
|
||
from rastervision.pipeline.config import Config, register_config | ||
|
||
if TYPE_CHECKING: | ||
from rastervision.core.box import Box | ||
from rastervision.core.data import (ClassConfig, CRSTransformer, | ||
LabelSource, SceneConfig) | ||
from rastervision.core.rv_pipeline import RVPipelineConfig | ||
|
||
|
||
@register_config('label_source') | ||
class LabelSourceConfig(Config): | ||
"""Configure a :class:`.LabelSource`.""" | ||
|
||
def build(self, class_config, crs_transformer, extent, tmp_dir): | ||
def build(self, | ||
class_config: 'ClassConfig', | ||
crs_transformer: 'CRSTransformer', | ||
extent: Optional['Box'] = None, | ||
tmp_dir: Optional[str] = None) -> 'LabelSource': | ||
raise NotImplementedError() | ||
|
||
def update(self, pipeline=None, scene=None): | ||
def update(self, | ||
pipeline: Optional['RVPipelineConfig'] = None, | ||
scene: Optional['SceneConfig'] = None) -> None: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.