question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ETCI2021 Img/Label pairing

See original GitHub issue

I think there might be a bug based on visualizing some of the training patches. Shown below are VV, VH, Water mask, Flood mask for some sample:

image

Run the following a few times to reproduce:

from torchgeo.datasets import ETCI2021

import numpy as np
import matplotlib.pyplot as plt

ds = ETCI2021("data/", split="train", download=False)

for i in np.random.choice(len(ds), size=10, replace=False):
    
    img1 = np.rollaxis(ds[i]["image"][:3].numpy(),0,3)
    img2 = np.rollaxis(ds[i]["image"][3:].numpy(),0,3)
    mask1 = ds[i]["mask"][0].numpy()
    mask2 = ds[i]["mask"][1].numpy()
        
    fig, axs = plt.subplots(1,4,figsize=(12,3))
    axs[0].imshow(img1)
    axs[0].axis("off")
    axs[1].imshow(img2)
    axs[1].axis("off")
    axs[2].imshow(mask1)
    axs[2].axis("off")
    axs[3].imshow(mask2)
    axs[3].axis("off")
    plt.tight_layout()
    plt.show()
    plt.close()

@adamjstewart – this is another example of a dataset that will need a custom trainer. You can interpret the imagery as a 6 band input, however there are two label masks (you want to predict the flood mask, and you are always given the water mask).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
calebrob6commented, Nov 9, 2021

Moving forward, let’s visualize what comes out of a dataset before we merge them. These semantic bugs are the real killers. Like, this dataset is fully tested but takes me several hours of debugging to actually use – not a great experience for any users.

2reactions
calebrob6commented, Nov 9, 2021

The problem above is caused by glob.glob not returning files in sorted order and is fixed by putting sorted(...) everywhere. I’m going to commit this fix directly to main.

Read more comments on GitHub >

github_iconTop Results From Across the Web

torchgeo - bytemeta
Switch ETCI2021 to use MLHub when it is released on MLHub. adamjstewart ... ETCI2021 Img/Label pairing. adamjstewart ... Auto download of ETCI2021 is...
Read more >
Manage Domain Aliases - Hashicorp/Terraform-Provider ... - IssueHint
This issue has been created since 2021-05-18. Add functionality to manage domain aliases (resource and data source). resource "googleworkspace_domain_alias" " ...
Read more >
robmarkcole / satellite-image-deep-learning - Новости
So improtant this pair gets their own section. GDAL is THE command line tool for reading and writing raster and vector geospatial data...
Read more >
satellite-image-deep-learning - GitHubTrending
Generally speaking, change detection methods are applied to a pair of images ... streamlit-img-label -> a graphical image annotation tool using streamlit.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found