Skip to content

official implement of Multi-Granularity Aggregation Network for Remote Sensing Few-Shot Segmentation

Notifications You must be signed in to change notification settings

sfengpeng/MGANet

Repository files navigation

Multi-Granularity Aggregation Network for Remote Sensing Few-Shot Segmentation

This repository is for the paper "Multi-Granularity Aggregation Network for Remote Sensing Few-Shot Segmentation"

Framework

framework

Requirements

Environment

git clone https://github.com/sfengpeng/MGANet.git
cd MGANet

conda create -n MGANet python=3.9
conda activate MGANet

pip install -r requirements.txt

Dataset and Weights

Download the datasets from here and the put them in the data directory.

MGANet
└─data
    └─iSAID
        ├─ train
        ├─ val
    └─LoveDA
    	├─ train
    	├─ val

Download the ImageNet pretrained backbone from here and put them in the pretrained_model directory.

MGANet
└─pretrained_model
	├─ resnet50_v2.pth
	├─ ....

We also provide the trained models weights for evaluation. vgg16, resnet50, resnet101, Non-BAM.

You need to pre-configure the script file with settings such as GPU, backbone network, and other parameters., and run the following code for training and testing:

bash train.sh
bash test.sh

Non-BAM settings

To switch to the non-BAM setting, simply copy the contents of dataset-BAM.py and replace the existing dataset.py

MGANet
└─utils
   ├─ dataset.py
   ├─ dataset-BAM.py

Related Repositories

This repository is built upon the foundations of MSANet, Slot Attention, and DMNet. We are very grateful for their work!

About

official implement of Multi-Granularity Aggregation Network for Remote Sensing Few-Shot Segmentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published