Coder Social home page Coder Social logo

sidgan / etci-2021-competition-on-flood-detection Goto Github PK

View Code? Open in Web Editor NEW
159.0 5.0 28.0 4.55 MB

Experiments on Flood Segmentation on Sentinel-1 SAR Imagery with Cyclical Pseudo Labeling and Noisy Student Training

Home Page: https://arxiv.org/abs/2107.08369

License: Apache License 2.0

Jupyter Notebook 60.38% Python 39.62%
deep-learning noisy-student pseudo-labeling floods segmentation semi-supervised-learning pytorch python arxiv-papers

etci-2021-competition-on-flood-detection's Issues

Unable to visualize images in Data_Viz notebook

I was going through your repository to understand visualization of data in ETCI20201 competition.And I have few queries
1.On executing the cells related to downloading the data,when i execute the below code the number of image paths comes out to be 66812.But in your text cell,the number of images is 33406.Any reason why this is happening?

all_image_paths = list(paths.list_images("train"))
print(f"Total images: {int(len(all_image_paths)/2)}")

Secondly,on executing the below code in the data_viz notebook

def show_all_four_images(filenames, titles):
    plt.figure(figsize=(20, 10))
    images = []
    for filename in filenames:
        images.append(mpimg.imread(filename))
        
    plt.suptitle(get_image_id(filenames[0]), size=16)
    columns = 4
    
    for i, image in enumerate(images):
        ax = plt.subplot(len(images)/ columns + 1, columns, i + 1)
        ax.set_title(titles[i])
        plt.imshow(image)

    plt.show()
`
import random

titles = ["V V","V H" , "Land or water before flood/Water body image" ,"After Flood/flood image"]

random_index =  random.sample(range(0, len(vv_image_paths)), 10) 
for i in random_index:
    # The assertions make sure we are operating on the right pairs
    assert  get_intensity(vv_image_paths[i]) == get_intensity(flood_image_paths[i])
    assert  get_intensity(vh_image_paths[i]) == get_intensity(water_body_label_paths[i])
    show_all_four_images([vv_image_paths[i], vh_image_paths[i],  
                          water_body_label_paths[i], flood_image_paths[i] ] , titles  throws exception error 

Using random indices when you call show_all_four_images,the following error is encountered

Number of rows must be positive integer not 2.0 
the exception is raised in show_alL_four_images when you run ax.subplot(len(images)/columns+1,columns,i+1)

The issue can be resolved when I convert it to int,but then the visualization is not good.
As such,I feel that there is some issues in the all_image_path section,because the number of images must be 33406 according to torch-rs but when I execute your code it comes out to be 4 times that amount.
thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.