Coder Social home page Coder Social logo

generalli95 / deepglobe_land_cover_classification_with_deeplabv3plus Goto Github PK

View Code? Open in Web Editor NEW
179.0 2.0 32.0 2.37 MB

DeepGlobe Land Cover Classification Challenge遥感影像语义分割

Home Page: https://competitions.codalab.org/competitions/18468#participate

License: MIT License

Python 100.00%
land-cover-challenge deepglobe satellite-images deeplab-v3-plus tensorflow

deepglobe_land_cover_classification_with_deeplabv3plus's Introduction

DeepGlobe Land Cover Classification Challenge

English | 简体中文

DATASET

DATA

  • The training data for Land Cover Challenge contains 803 satellite imagery in RGB, size 2448x2448.
  • The imagery has 50cm pixel resolution, collected by DigitalGlobe's satellite.
  • You can download the training data in the download page with filetype of “Starting Kit”. Testing satellite images will be will be uploaded later.

Label

  • Each satellite image is paired with a mask image for land cover annotation. The mask is a RGB image with 7 classes of labels, using color-coding (R, G, B) as follows.

    • Urban land: 0,255,255 - Man-made, built up areas with human artifacts (can ignore roads for now which is hard to label)
    • Agriculture land: 255,255,0 - Farms, any planned (i.e. regular) plantation, cropland, orchards, vineyards, nurseries, and ornamental horticultural areas; confined feeding operations.
    • Rangeland: 255,0,255 - Any non-forest, non-farm, green land, grass
    • Forest land: 0,255,0 - Any land with x% tree crown density plus clearcuts.
    • Water: 0,0,255 - Rivers, oceans, lakes, wetland, ponds.
    • Barren land: 255,255,255 - Mountain, land, rock, dessert, beach, no vegetation
    • Unknown: 0,0,0 - Clouds and others
  • File names for satellite images and the corresponding mask image are id_sat.jpg and id_mask.png. is a randomized integer.

  • Please note:

    • The values of the mask image may not be the exact target color values due to compression. When converting to labels, please binarize each R/G/B channel at threshold 128.
    • Land cover segmentation from high-resolution satellite imagery is still an exploratory task, and the labels are far from perfect due to the cost for annotating multi-class segmentation mask. In addition, we intentionally didn't annotate roads because it's already covered in a separate road challenge.

Evaluation Metric

  • We will use pixel-wise mean Intersection over Union (mIoU) score as our evaluation metric.
    • IoU is defined as: True Positive / (True Positive + False Positive + False Negative).
    • mean IoU is calculated by averaging over all classes.
  • Please note the Unknown class (0,0,0) is not an active class used in evaluation. Pixels marked as Unknown will simply be ignored. So effectively mIoU is averaging over 6 classes in total.

Result

Acknowledgment

This repo borrows code heavily from

Cite us

@INPROCEEDINGS{9064236,  
author={Y. {Li} and L. {Chen}},  
booktitle={2019 IEEE 5th International Conference on Computer and Communications (ICCC)},   
title={Land Cover Classification for High Resolution Remote Sensing Images with Atrous Convolution and BFS},   year={2019},  
volume={},  
number={},  
pages={1808-1813},}

How to implement this repo?

File Structure

  • deepglobe_land
    • dataset
      • land_train (Data we downloaded from the website )
      • onechannel_label (Generated by running rgb2label.py)
      • voc_train_all.record (Generated by running create_tf_record_all.py )
    • ini_checkpoints
      • resnet_v2_101 (resnet_v2_101.ckpt and train.graph)
    • utils
    • rgb2label.py
    • create_tf_record_all.py
    • deeplab_model.py

Code functions and excution order

  1. rgb2label.py the satellite images id_mask.png are RGB images. This code change the RGB images to onechannel images so we can use them to generate tfrecord files.

  2. create_tf_record_all.py generate tfrecord files. The input and output directory were set in the code follows.

    parser.add_argument('--data_dir', type=str, default='./dataset/',
                        help='Path to the directory containing the PASCAL VOC data.')
    
    parser.add_argument('--output_path', type=str, default='./dataset',
                        help='Path to the directory to create TFRecords outputs.')
    
    parser.add_argument('--image_data_dir', type=str, default='land_train',
                        help='The directory containing the image data.')
    
    parser.add_argument('--label_data_dir', type=str, default='onechannel_label',
                        help='The directory containing the augmented label data.')
  3. train.py

  4. inference.py To apply semantic segmentation to your images.

Other useful codes

  1. utils a toolkit

  2. deeplab_model.py the deeplabV3+ model

  3. tensorboard

    tensorboard --logdir MODEL_DIR
    

    If you want to run Tensorboard on a remote server. This stackoverflow discussion may be help

deepglobe_land_cover_classification_with_deeplabv3plus's People

Contributors

generalli95 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

deepglobe_land_cover_classification_with_deeplabv3plus's Issues

Copyright issue

Distributing DeepGlobe datasets on any platform other than Codalab is not permitted by policy. Please remove the baidu link from your intro. Also, using DeepGlobe requires referring to the original source, you should cite the paper and optionally refer to the website.

Confusion on color2label.py script

I am confused on how did you identify the values of image[:, :, :] that corresponds to each land cover class?

    cat_image[image == 3] = 0  # (Cyan: 011) Urban land
    cat_image[image == 6] = 1  # (Yellow: 110) Agriculture land
    cat_image[image == 5] = 2  # (Purple: 101) Rangeland
    cat_image[image == 2] = 3  # (Green: 010) Forest land
    cat_image[image == 1] = 4  # (Blue: 001) Water
    cat_image[image == 7] = 5  # (White: 111) Barren land
    cat_image[image == 0] = 6  # (Black: 000) Unknown

And also, why is there no image == 4 ?

SystemExit error occured

while running "create_pascal_tf_record.py" - SystemExit occurs while creating "voc_val.record"
can anybody help?

NaN loss

after install the env and download the data, when i run the code, the following error occurs :
tensorflow.python.training.basic_session_run_hooks.NanLossDuringTrainingError: NaN loss during training

How can i use your network

hi,
how can i use your network with my dataset?
and how can i get the dataset that you work with?

thank you! good luck!

Help for val dataset and corresponding label files

Hello, good work! But I only found the train set in the link you provided, do you have the val dataset and corresponding label files for the val dataset that is provided by the DeepGlobe website?
I couldn't participate in the competition as the time is kind of late now and I can't access the dataset

数据集

比赛网站上下不到数据集。。。

Dateset Requeset

hello, do you have a dataset for the deepglobe_land_cover_classification competition?Could you  share the baidu cloud or Google cloud link, thank you very much

Would you please share the dataset?

Hello,I try to get the dataset in the website, but told 'Your request to participate in this challenge has been received and a decision is pending.'.
And I try to leave a message in 'Forums' but still could not get it.
Would you please share the dataset to us ?Maybe in a link ? Thanks a lot!
Look forward to your favourable reply.

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.