Code Monkey home page Code Monkey logo

canconv's Introduction

Content-Adaptive Non-Local Convolution for Remote Sensing Pansharpening

Yule Duan, Xiao Wu, Haoyu Deng, Liang-Jian Deng

Static Badge Static Badge

The overall workflow of CANConv.

Abstract: Currently, machine learning-based methods for remote sensing pansharpening have progressed rapidly. However, existing pansharpening methods often do not fully exploit differentiating regional information in non-local spaces, thereby limiting the effectiveness of the methods and resulting in redundant learning parameters. In this paper, we introduce a so-called content-adaptive non-local convolution (CANConv), a novel method tailored for remote sensing image pansharpening. Specifically, CANConv employs adaptive convolution, ensuring spatial adaptability, and incorporates non-local self-similarity through the similarity relationship partition (SRP) and the partition-wise adaptive convolution (PWAC) sub-modules. Furthermore, we also propose a corresponding network architecture, called CANNet, which mainly utilizes the multi-scale self-similarity. Extensive experiments demonstrate the superior performance of CANConv, compared with recent promising fusion methods. Besides, we substantiate the method's effectiveness through visualization, ablation experiments, and comparison with existing methods on multiple test sets. The source code is publicly available.

Getting Started

Environment Setup

Please prepare a Docker environment with CUDA support:

Using the Repo

  1. Clone the repo and its submodules:

    git clone --recurse-submodules https://github.com/duanyll/CANConv.git
  2. Edit mount point for datasets in .devcontainer/devcontainer.json:

    • Locate the .devcontainer/devcontainer.json file within the cloned repo.
    • Specify the path to your datasets on your host machine by adjusting the mounts configuration in the file.
  3. Reopen the repo in VS Code devcontainer:

    • Open the cloned repo in VS Code.
    • When prompted, select "Reopen in Container" to activate the devcontainer environment.
    • It may take serval minutes when pulling the base PyTorch image and install requirements for the first time.
  4. Build native libraries:

    bash ./build.sh
  5. Train the model:

    python -m canconv.scripts.train cannet wv3
    • Replace cannet with other networks available in the canconv/models directory.
    • Replace wv3 with other datasets defined in presets.json.
    • Results are placed in the runs folder.

Additional Information

Pretrained weights:

  • Pre-trained weights can be found in the weights folder.

Datasets:

Metrics:

  • Metrics are obtained using tools from liangjiandeng/DLPan-Toolbox (specifically, the 02-Test-toolbox-for-traditional-and-DL(Matlab) directory).

canconv's People

Contributors

duanyll avatar

Stargazers

Xiaobing Han avatar Sang avatar  avatar  avatar Jason Wong avatar Qiang Zhang avatar  avatar  avatar An-zhi WANG avatar  avatar  avatar ZhangXian avatar  avatar Frank-Cai0709 avatar zhouchuan avatar  avatar Ridger Zhu avatar  avatar Yongchuan Cui avatar  avatar Runlong Liao avatar ็†ต avatar

Watchers

Kostas Georgiou avatar  avatar  avatar

Forkers

dl-cnn whuhxb

canconv's Issues

About get_cluster_centers

In the canconv.py file, there is a reference to "from.kmeans import KMeans, get_cluster_centers", but I couldn't find the get_cluster_centers function. How can I solve this issue?

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.