Skip to content

Cannot save semantic segmentation predictions as GeoJSON (rastervision+lightninig) #1741

Answered by AdeelH
aerotractjack asked this question in Q&A
Discussion options

You must be logged in to vote

It looks like you need to also specify uri in each PolygonVectorOutputConfig for it to work; otherwise, RV will just log Skipping VectorOutputConfig at index 0 due to missing uri. etc. and do nothing. I don't think this is ideal. Thanks for reporting this.

As for controlling the TIFF outputs, see the docs for SemanticSegmentationSmoothLabels.save.

Here's a snippet that should fix the issue:

from os.path import join

pred_uri = "./pred-labels-scores"
pred_labels.save(
    uri=pred_uri,
    crs_transformer=pds.scene.raster_source.crs_transformer,
    class_config=self.cc,
    # set to False to skip writing `labels.tif`
    discrete_output=True,
    # set to False to skip writing `scores.tif`

Replies: 2 comments 12 replies

Comment options

You must be logged in to vote
1 reply
@AdeelH
Comment options

Comment options

You must be logged in to vote
11 replies
@aerotractjack
Comment options

@aerotractjack
Comment options

@AdeelH
Comment options

@AdeelH
Comment options

@aerotractjack
Comment options

Answer selected by aerotractjack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants