- [2025/11/05] β¨β¨ Update Pre-Training && Classification Code.
- [2025/11/17] β¨β¨ Init Repo.
- β submit to arxiv
- β upload training code
- β upload model weights
We add mmpretrain, mmsegmentation, and open-cd as our repository submodule .
So, one should clone this repository use the script as follows:
clone repository
git clone --recurse-submodules https://github.com/woldier/GeoadIf one already cloned the project and forgot --recurse-submodules,
# cloned the project and forgot clone submodules π₯²π₯² git clone https://github.com/woldier/Geoad # initialize and update each submodule in the repository π₯°π₯° git submodule update --init
after that, we link
submodules/mmpretrain/mmpretrain mmpretrain
submodules/mmsegmentation/mmseg mmseg
submodules/open-cd/opencd opencd
:
soft link
ln -s sumodules/mmpretrain/mmpretrain/ mmpretrain
ln -s sumodules/mmsegmentation/mmseg/ mmseg
ln -s sumodules/open-cd/opencd/ opencdThis repo use python-3.8, for nvcc -v with cuda >= 11.6.
torch 2.1.1, cuda 12.1, mmcv 2.1.0, mmengine 0.9.1
Install script
conda create -n peft-mmpretrain python==3.8 -y
conda activate peft-mmpretrain
pip install torch==2.1.2+cu121 torchvision==0.16.2+cu121 -f https://download.pytorch.org/whl/torch_stable.html
# for CN user use follow script
pip install torch==2.1.2+cu121 torchvision==0.16.2+cu121 -f https://mirrors.aliyun.com/pytorch-wheels/cu121/
pip install mmcv==2.1.0 mmengine==0.9.1 -f https://download.openmmlab.com/mmcv/dist/cu121/torch2.1/index.html
pip install -r submodules/mmpretrain/mmpretrain/requirements/runtime.txt
pip install -r submodules/mmsegmentation/mmseg/requirements/runtime.txt
pip install -r submodules/open-cd/opencd/requirements/runtime.txtInstallation of the reference document refer:
Torch and torchvision versions relationship.
Geoad relies on model weights from DINOv2 and MAE as an initialization to begin continual pre-training. We have organized them here for your convenience.
| Model | ViT-L |
|---|---|
| DINOv2 | ViT-L/14 |
| MAE | ViT-L/16 |
Download the MillionAID dataset. The data structure should be as follows:
file structure
βββ data/MillionAID
β βββ train
β β βββ agriculture
β β β βββ arable_land
β β β β βββ dry_field
β β β β β βββ P0011232.jpg
β β β β β βββ ...
β β β β βββ ...
β β β βββ ...
β β βββ ...
β βββ test
β β βββ xxx.jpg
β β βββ xxx.jpg
β β βββ ...
β βββ ...
We use all the images in the training and test sets for pretraining.
To pre-train Geoad with multi-gpu distributed training, run the following on 1 nodes with 8 GPUs each:
pretraining script
# Geoad-DINOv2
tools/dist_train.sh config/geoad/frms_dinov2_vit-large-p14_8xb512-amp-coslr-100k_million-aid.py 8\
--launcher pytorch --auto-scale-lr
# Geoad-MAE
tools/dist_train.sh config/geoad/frms_mae_vit-large-p16_8xb128-amp-coslr-300e_million-aid.py 8\
--launcher pytorch --auto-scale-lr| Dataset | Link | Split |
|---|---|---|
| NWPU-RESISC45 | Link | resisc45.zip |
| EuroSat (RGB) | Link | eurosat-split.zip |
file structure
βββ data/NWPU-RESISC45
β βββ airplane
β β βββ airplane_001.jpg
β β βββ airplane_002.jpg
β β βββ ...
β βββ airport
β βββ ...
β βββ ratio_0.5_train.txt
β βββ ratio_0.5_test.txt
βββ data/EuroSAT_RGB
β βββ AnnualCrop
β β βββ AnnualCrop_1.jpg
β β βββ AnnualCrop_2.jpg
β β βββ ...
β βββ Forest
β βββ HerbaceousVegetation
β βββ ...
β βββ eurosat-train.txt
β βββ eurosat-test.txt
β βββ eurosat-val.txt
classification script
# 1. fine-tune
# Geoad-DINOv2
tools/dist_train.sh config/classification/resisc45/frms_dinov2_vit-large-p16_8xb128-coslr-100e_resics45.py 8\
--launcher pytorch --auto-scale-lr
# Geoad-MAE
tools/dist_train.sh config/classification/resisc45/frms_mae_vit-large-p16_8xb128-coslr-100e_resics45.py 8\
--launcher pytorch --auto-scale-lr
# 2. linear prob
# Geoad-DINOv2
tools/dist_train.sh config/classification/resisc45/frms_dinov2_vit-large-p16_8xb1024--linear-coslr-100e_resics45.py 8\
--launcher pytorch --auto-scale-lr
# Geoad-MAE
tools/dist_train.sh config/classification/resisc45/frms_mae_vit-large-p16_8xb1024--linear-coslr-100e_resics45.py 8\
--launcher pytorch --auto-scale-lr
classification script
# 1. fine-tune
# Geoad-DINOv2
tools/dist_train.sh config/classification/eurosat/frms_dinov2_vit-large-p16_8xb128-coslr-100e_eurosat.py 8\
--launcher pytorch --auto-scale-lr
# 2. linear prob
# Geoad-DINOv2
tools/dist_train.sh config/classification/eurosat/frms_dinov2_vit-large-p16_8xb1024-linear-coslr-100e_eurosat.py 8\
--launcher pytorch --auto-scale-lr
Coming Soon ...
Coming Soon ...
This project is built upon OpenMMLab. We thank the OpenMMLab developers.
If you use Geoad in your research, please cite:
@article{,
title={},
author={},
journal={},
year={}
}