Skip to content

So2Sat getitem TypeError: img should be PIL Image. Got <class 'dict'> #1293

Discussion options

You must be logged in to vote

The simpler way of doing this would be:

from torchgeo.datasets import So2Sat

class So2Sat_Index(So2Sat):
    def __getitem__(index):
        sample = super()[index]
        sample["index"] = index
        return sample

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
3 replies
@Akshatha-Mohan
Comment options

@adamjstewart
Comment options

@Akshatha-Mohan
Comment options

Comment options

You must be logged in to vote
3 replies
@Akshatha-Mohan
Comment options

@adamjstewart
Comment options

Answer selected by Akshatha-Mohan
@Akshatha-Mohan
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