Git Product home page Git Product logo

aj1365 / polsarformer Goto Github PK

View Code? Open in Web Editor NEW
35.0 3.0 9.0 11.73 MB

This code is for the paper "Local Window Attention Transformer for Polarimetric SAR Image Classification" that is published in the IEEE Geoscience and Remote Sensing Letters journal.

License: Apache License 2.0

Jupyter Notebook 100.00%
classification cnn deep-learning image-classification polsar remote-sensing vision-transformer

polsarformer's Introduction

PolSARFormer: Local Window Attention Transformer for Polarimetric SAR Image Classification

Ali Jamali, Swalpa Kumar Roy, Avik Bhattacharya, and Pedram Ghamisi


This Keras code is for the paper A. Jamali, S. K. Roy, A. Bhattacharya and P. Ghamisi, "Local Window Attention Transformer for Polarimetric SAR Image Classification," in IEEE Geoscience and Remote Sensing Letters, doi: 10.1109/LGRS.2023.3239263 [https://ieeexplore.ieee.org/document/10024822].


Dataset

Flevoland dataset: NASA/JPL AIRSAR recorded the data of Flevoland, situated in the Netherlands, on August 16, 1989. The Flevoland image is $750\times1024$ pixels in size.

San Francisco dataset: The San Francisco illustrates a NASA/JPL AIRSAR L-band image of the San Francisco area. The resolution of the data of the San Francisco is $900\times1024$ pixels.

Appreciation from Geoscience and Remote Sensing Society (GRSS)

Citation

Please kindly cite the papers if this code is useful and helpful for your research.

@article{jamali2023local,
    title={Local window attention transformer for polarimetric SAR image classification},
    author={Jamali, Ali and Roy, Swalpa Kumar and Bhattacharya, Avik and Ghamisi, Pedram},
    journal={IEEE Geoscience and Remote Sensing Letters},
    volume={20},
    pages={1--5},
    year={2023},
    publisher={IEEE}
}

Acknowledgement

Part of the local window attention (LWA) block is implementated from Neighborhood Attention Transformer.

License

Copyright (c) 2023 Ali Jamali. Released under the MIT License. See LICENSE for details.

polsarformer's People

Contributors

aj1365 avatar swalpa 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

Watchers

 avatar  avatar  avatar

polsarformer's Issues

Problems with the code

Thanks for your very nice code.
I met a problem with your code:
At the end of the PolSARFormer model, the code below just takes the x as the input, thus the output nn of the PolSARFormer is just the results of the output_block, and the attention operation is unused.
'nn = output_block(x, num_classes=num_classes, drop_rate=dropout, classifier_activation=classifier_activation)'

So I wonder if there is a mistake, and if the 'x' in the code should be takeplaced by other variable.

Code question

Thanks for your very nice code.I met a problem with your code:

According to my calculations, the shape of the patchesData returned from the ImageCube function should be (H*W, 12, 12, 9). However, I noticed that you are reshaping x to have a shape of (X1.shape[0], windowSize, windowSize, 12, 1) based on the setting of windowSize=12 in your paper, which translates to (H, 12, 12, 12, 1). This shape doesn't match my calculated shape of H*W, 12, 12, 9. Therefore, I have the following doubts:

  1. Should the first dimension of the reshape operation be H*W? If my understanding is incorrect, I would like to know how you performed this step.

  2. For the third dimension of my data, which represents the scattering dimension and has a size of 9, I am curious about the fourth dimension in your reshape operation, which is the last 12. Is this 12 related to the scattering dimension in your dataset? If not, I would like to understand the significance of this 12.

  3. After running the code, I noticed that our data shapes do not seem to match. Could you please confirm the dimensionality of the scattering data in your San Francisco dataset? This information would be extremely helpful for my research.
    Thank you very much.

Problems with datasets

Hello, I am very happy to see your research results, I am a graduate student, also working on polarized SAR Landcover classification problems。But I haven't been able to find these open source dataset to downloadcan you share the dataset you used in this article: Flevoland dataset, San Francisco dataset. If you can, thanks for sending me [email protected] email, 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.