GithubHelp home page GithubHelp logo

guanyuezhen / a2net Goto Github PK

View Code? Open in Web Editor NEW
58.0 1.0 10.0 129.82 MB

Lightweight Remote Sensing Change Detection with Progressive Aggregation and Supervised Attention (IEEE TGRS 2023)

Python 99.49% Shell 0.51%

a2net's Introduction

Lightweight Remote Sensing Change Detection with Progressive Aggregation and Supervised Attention (IEEE TGRS 2023)

Authors: Zhenglai Li, Chang Tang, Xinwang Liu, Wei Zhang, Jie Dou, Lizhe Wang, Albert Zomaya

This repository contains a simple Python implementation of our paper A2Net.

🔥 We extend A2Net for the semantic change detection task.
🔥 We provided the pre-computed change maps of FC-diff, FC-ef, FC-cat, STANet, L-Unet, SNUNet, DSIFN, BIT, TFI-GR, A2Net on LEVIR, BCDD, and SYSU datasets.

1. Overview


A framework of the proposed A2Net. The temporal features are extracted from a registered pair of images by weight-shared MobileNetV2. Then, we use NAM to merge the temporal features within neighbor stages of the backbone to enhance their feature representation capability. PCIM is designed to capture the temporal change information from bi-temporal features at their corresponding feature levels. We stack SAM on each fusion of low-level and high-level features to polish the details of changed objects. Finally, a change map is obtained by gradually aggregating temporal difference features.

2. Usage

  • Prepare the data:

    • Download datasets LEVIR, BCDD, and SYSU
    • Crop LEVIR and BCDD datasets into 256x256 patches. The pre-processed BCDD dataset can be obtained from BCDD_256x256.
    • Generate list file as ls -R ./label/* > test.txt
    • Prepare datasets into the following structure and set their path in train.py and test.py
    ├─Train
        ├─A        ...jpg/png
        ├─B        ...jpg/png
        ├─label    ...jpg/png
        └─list     ...txt
    ├─Val
        ├─A
        ├─B
        ├─label
        └─list
    ├─Test
        ├─A
        ├─B
        ├─label
        └─list
    
  • Prerequisites for Python:

    • Creating a virtual environment in the terminal: conda create -n A2Net python=3.8
    • Installing necessary packages: pip install -r requirements.txt
  • Train/Test

    • sh ./tools/train.sh
    • sh ./tools/test.sh

3. Change Detection Results


Quantitative comparisons in terms of $\kappa$, IoU, F1, OA, Rec, and Pre on three remote sensing change detection datasets. The best and second best results are highlighted in red and blue, respectively.

4. Acknowledgment

This repository is built with the help of the projects BIT_CD, CDLab, and MobileSal for academic use only.

5. Citation

Please cite our paper if you find the work useful:

@article{Li_2023_A2Net,
     author={Li, Zhenglai and Tang, Chang and Liu, Xinwang and Zhang, Wei and Dou, Jie and Wang, Lizhe and Zomaya, Albert Y.},
    journal={IEEE Transactions on Geoscience and Remote Sensing}, 
    title={Lightweight Remote Sensing Change Detection With Progressive Feature Aggregation and Supervised Attention}, 
    year={2023},
    volume={61},
    number={},
    pages={1-12},
    doi={10.1109/TGRS.2023.3241436}
    }

a2net's People

Contributors

guanyuezhen 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

Watchers

 avatar

a2net's Issues

Training weights for other networks

I think your work is very good. Like you, I have done similar work on these three public datasets. Can you provide me with the training weights of several networks you compared on these three datasets? Because it takes a lot of time to repeat this work. I will be very grateful!

list

作者,你好!你可以具体展示以下list文件夹下面的.txt文件的内容吗,我不是特别理解ls -R ./label/* > test.txt,是把A,B,label这三个文件夹里的图片的名称都放入这一个txt文件里面吗

About loss and F1 for an image pair which has exact same image

Thanks for your great work!

I prepared a image dataset for training and testing. Besides the change dataset, which contains many changed image pairs. It also contains some image pair without changes, the label of which is all black pixels because there isn't any change. I did this in order to let the net to learn both changing and non-changing situations.

But! I found that the all black pixel label will cause F1 become 0, and big loss. This is not out expectation! We thought the images are the same, the ground thuth label image is black, then the output should be black either.

Is there something wrong with the Loss function? Sorry for my misunderstanding!

Thanks!

batchsize

Why as the batch_size decreases, the training time also decreases, shouldn't it be that the larger the batch_size, the smaller the training time?The time cost is 2.118h when the batch_size is 16 and 3.926h when the batch_size is 32.

文章

作者你好,文章可以发我一下吗

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.