Need help using rastervision with pre-classified .tiff files #1785
andrebiehl
started this conversation in
General
Replies: 1 comment 5 replies
-
Let's assume raster_source_img = RasterioSourceConfig(uris=['train.tif'], channel_order=[0, 1, 2])
raster_source_label = RasterioSourceConfig(uris=['train.tif'], channel_order=[3])
train_scene = SceneConfig(
id='train_scene',
raster_source=raster_source_img,
label_source=SemanticSegmentationLabelSourceConfig(raster_source=raster_source_label),
) |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! I'm working with a geospatial .tiff dataset where each pixel is a pre-classified value between 0-4 (5 values). For a proof of concept, I tried to train rastervision on one single .tiff file, which I split 80/20 pixel-wise into training and validation. I'm getting an error when running this cell:
Define scene configurations
train_scene = SceneConfig(
id='train_scene',
raster_source=RasterioSourceConfig(uris=['train.tif']),
label_source=RasterioSourceConfig(uris=['train.tif']),
)
val_scene = SceneConfig(
id='val_scene',
raster_source=RasterioSourceConfig(uris=['val.tif']),
label_source=RasterioSourceConfig(uris=['val.tif']),
)
Note: train.tif is includes the pixels for training and val.tif includes the pixels for validation.
The error is because I'm trying to use the RasterioSourceConfig for both the raster source and label source, which is not allowed because they are expected to be different types of data (features vs labels).
If my labels in the same geospatial TIFF file as my input data (i.e., different bands in the TIFF file represent different labels), I will probably need to use a different approach for creating my LabelSourceConfig.
Any advice?
rastervisionTest.pdf
Beta Was this translation helpful? Give feedback.
All reactions