First-Order Cross-Domain Meta Learning for Few-Shot Remote Sensing Object Classification
April 4, 2026 · View on GitHub
This repository includes introductions and implementation of First-Order Cross-Domain Meta Learning for Few-Shot Remote Sensing Object Classification in PyTorch.
Datasets
We conduct experiments using a benchmark covering multiple modalities, utilizing five optical remote sensing datasets: Aerial Image Dataset (Xia et al. 2017), NWPU-RESISC45 (Cheng et al. 2017), RSI-CB256 (Li et al. 2019), UC Merced Land Use (Yang et al. 2010) and PatternNet (Zhou et al. 2018), alongside newly constructed infrared dataset and SAR dataset. The infrared dataset is compiled from images sourced from MRSSC2.0, DroneVehicle, and VEDAI, while the SAR dataset integrates images from MRSSC2.0, SARDet-100K, BRIGHT, and FUSAR-Ship1.0. We reorganized the dataset categories to ensure that the categories in the test domain remain unseen during the training phase.
File Structure
1. Model Download
You can download the required model files (model_path.zip) via Baidu Netdisk:
- Link:https://pan.baidu.com/s/1KBosdFMZbBQKuKpaJAuNvg
- Extraction Code / Password:
dlut
Once downloaded and extracted, please place the model files in the following directory:
outputs/CDML_meta/
2. Dataset Preparation
Please place your prepared dataset files directly into the datasets/ directory.
CDML
.
├── dataset
│ ├── AID
│ ├── IR
│ ├── NWPU
│ ├── PatternNet
│ ├── RSI
│ ├── SAR
│ ├── UC
│ ├── my_utils
│ │ └── spearman.py
│ ├── Resnet
│ │ └── model.py
│ ├── train.py
│ └── VGG
│ └── model.py
├── outputs
│ ├── CDML_meta
│ ├── pretrain_LAT
├── LAT_utils.py
├── Option.py
├── ProtoNet.py
├── README.md
├── config.py
├── learner.py
├── requirements.txt
├── test.py
├── test_dataset.py
├── train.py
├── train_dataset.py
└──utils.py
Requirements
We recommend using Miniconda or Anaconda to manage your environment. Follow the steps below to set up the required dependencies.
1. Create a Conda Environment
First, create a new conda environment and activate it. You can replace myenv with your preferred environment name, and adjust the Python version if necessary:
conda create -n myenv python=3.9 -y
conda activate myenv
2. Install Dependencies
Once the environment is activated, install all the required packages using the requirements.txt file provided in the repository:
pip install -r requirements.txt
Train and Eval
Train
To train the model, simply run the train.py script:
python train.py
Eval
To evaluate the model's performance on the test dataset, you can run the test.py script:
python test.py