Skip to content

Preparing a custom geo dataset for training #1469

Closed Answered by lcoandrade
lcoandrade asked this question in Q&A
Discussion options

You must be logged in to vote

Actually there were 2 problems in my code.

The first one was using:

if stage in ["validate"]:

instead of:

if stage in ["fit", "validate"]:

I don't know why I can't only set validate as a stage in the setup override.

The second error was trying to use the code the way it is to perform a fit with 2 GPUs. It works when changing to uso one GPU.

So, summarizing. To work with a custom geodataset we need to:

1 - Subclass RasterDataset to something like this:

class NAIPImages(RasterDataset):
    filename_glob = "m_*.tif"
    is_image = True
    separate_files = False
    
class ChesapeakeLabels(RasterDataset):
    filename_glob = "m_*.tif"
    is_image = False
    separate_files = False

2 - In…

Replies: 5 comments 7 replies

This comment has been hidden.

@lcoandrade

This comment has been hidden.

Comment options

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

Comment options

You must be logged in to vote
2 replies
@adamjstewart
Comment options

@lcoandrade
Comment options

Answer selected by lcoandrade
Comment options

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

Comment options

You must be logged in to vote
2 replies
@tgoelles
Comment options

@adamjstewart
Comment options

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