Giter VIP home page Giter VIP logo

cnn_enhanced_gcn's Introduction

CEGCN

CNN-Enhanced Graph Convolutional Network with Pixel- and Superpixel-Level Feature Fusion for Hyperspectral Image Classification

has been accepted by IEEE Transactions on Geoscience and Remote Sensing (TGRS)

Abstract: Recently, the graph convolutional network (GCN) has drawn increasing attention in hyperspectral image (HSI) classification. Compared with the convolutional neural network (CNN) with fixed square kernels, GCN can explicitly utilize the correlation between adjacent land covers and conduct flexible convolution on arbitrarily irregular image regions; hence, the HSI spatial contextual structure can be better modeled. However, to reduce the computational complexity and promote the semantic structure learning of land covers, GCN usually works on superpixel-based nodes rather than pixel-based nodes; thus, the pixel-level spectral-spatial features cannot be captured. To fully leverage the advantages of the CNN and GCN, we propose a heterogeneous deep network called CNN-enhanced GCN (CEGCN), in which CNN and GCN branches perform feature learning on small-scale regular regions and large-scale irregular regions, and generate complementary spectral-spatial features at pixel and superpixel levels, respectively. To alleviate the structural incompatibility of the data representation between the Euclidean data-oriented CNN and non-Euclidean data-oriented GCN, we propose the graph encoder and decoder to propagate features between image pixels and graph nodes, thus enabling the CNN and GCN to collaborate in a single network. In contrast to other GCN-based methods that encode HSI into a graph during preprocessing, we integrate the graph encoding process into the network and learn edge weights from training data, which can promote the node feature learning and make the graph more adaptive to HSI content. Extensive experiments on three data sets demonstrate that the proposed CEGCN is both qualitatively and quantitatively competitive compared with other state-of-the-art methods.

Environment: Python 3.6 PyTorch 1.5

Early Access is available now at https://ieeexplore.ieee.org/document/9268479

If this work is helpful to you, please citing our work as follows:

Q. Liu, L. Xiao, J. Yang and Z. Wei, "CNN-Enhanced Graph Convolutional Network With Pixel- and Superpixel-Level Feature Fusion for Hyperspectral Image Classification," in IEEE Transactions on Geoscience and Remote Sensing, doi: 10.1109/TGRS.2020.3037361.

Or

@ARTICLE{9268479, author={Q. {Liu} and L. {Xiao} and J. {Yang} and Z. {Wei}}, journal={IEEE Transactions on Geoscience and Remote Sensing}, title={CNN-Enhanced Graph Convolutional Network With Pixel- and Superpixel-Level Feature Fusion for Hyperspectral Image Classification}, year={2020}, volume={}, number={}, pages={1-15}, doi={10.1109/TGRS.2020.3037361}}

Note that the code is stinky and long.

cnn_enhanced_gcn's People

Contributors

qichaoliu 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

cnn_enhanced_gcn's Issues

SGsN module on IP data set

Hi, hope you are doing great!
When I remove the PAsN module and test on PU data set, it is still effective and get a high OA. But when I conducted this ablation experiment on IP data set, I found that training process cannot converge and get poor performance.

the components of LDA

Thanks for your innovative and interesting work!
Could you please tell me why you choose (n_classes-1) components in LDA?
And can sklearn.SLIC() accept a multichannel image? (for PaviaU data set, there supposed to be 8 channels)

Link about paper

Could you please provide a link to this paper? I can't find it on the Internet.

The adjacency mask set to 1 when Si and Sj share a common boundary. How to check if these two share a common boundary?

Thank you so much for your code.
I don't understand this line: sub = self.segments[i:i + 2, j:j + 2]
Could you please explain how to judge if the two superpixels share a common boundary?
`
def get_A(self, sigma: float):
'''
根据 segments 判定邻接矩阵
:return:
'''
A = np.zeros([self.superpixel_count, self.superpixel_count], dtype=np.float32)
(h, w) = self.segments.shape
for i in range(h - 2):
for j in range(w - 2):
sub = self.segments[i:i + 2, j:j + 2]
sub_max = np.max(sub).astype(np.int32)
sub_min = np.min(sub).astype(np.int32)
# if len(sub_set)>1:
if sub_max != sub_min:
idx1 = sub_max
idx2 = sub_min
if A[idx1, idx2] != 0:
continue

                pix1 = self.S[idx1]
                pix2 = self.S[idx2]
                diss = np.exp(-np.sum(np.square(pix1 - pix2)) / sigma ** 2)
                A[idx1, idx2] = A[idx2, idx1] = diss 

`

How to call a dataset in DrawGraph.py

Hello author, first of all thank you very much for the code, but I am having some problems running the file ‘DrawGraph.py’, I have downloaded the MAT file about these datasets, but I am getting FileNotFoundError: [Errno 2] No such file or directory: ' Indian_pinesSeg.npy' is not generating npy files, can you give me some advice?

How to draw Figure 9 and Figure 10 in your paper

Hello, thank you very much for your hard work, I think it is very meaningful.
How do you draw Figure 9 (Visualization of graphs on different data sets) and Figure 10(a) (Visualization of feature fusion) in your paper. I think this representation is very intuitive.Could you share it, thank you very much!

Visualization of classification results

Hello author, after carefully reading your paper, I successfully ran through the code for your paper. However, the visualization of the classification image results is different from some other papers. How can I convert this classification result graph in your paper into a regular classification result graph

Memory issues

Hello author, I saw in your paper that the experimental device was 1080ti. I rented a server with 3060 12G graphics memory online to run your program. However, when running the PaviaU dataset, an error was suddenly reported indicating that there was not enough graphics memory. May I ask if you were using only one 1080ti or merging several graphics cards to run your program together

RuntimeError

hello,when i run the Main.py in this line loss.backward(retain_graph=False), this error appear "RuntimeError: cuDNN error: CUDNN_STATUS_NOT_SUPPORTED. This error may appear if you passed in a non-contiguous input." Can you help me to solve this problem? Thanks you very much!

The training data is set to the number of samples

Hello author, I would like to know how your code sets the definite training samples.

for (FLAG, curr_train_ratio) in [(1,5),(1,10),(1,15),(1,20),(1,25),

(2,5),(2,10),(2,15),(2,20),(2,25),

(3,5),(3,10),(3,15),(3,20),(3,25)]:

训练在这改

for (FLAG, curr_train_ratio,Scale) in [(1,0.05,100)]:

for (FLAG, curr_train_ratio,Scale) in [(2,0.01,100),(3,0.01,100)]:

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.