Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup Environment

conda create -n dfc python=3.8
pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu116
pip install -U openmim
pip install timm==0.9.2
mim install mmcv-full==1.7.2
mim install mmsegmentation==0.30.0
cd ops
sh ./make.sh

Data Preparation

DFC2025

data
└── dfc2025
	└── track1
		├── test
		│   └── sar_images
		├── train
		│   ├── labels
		│   ├── rgb_images
		│   └── sar_images
		└── val
			├── labels
			└── sar_images

OpenEarthMap

data
└── OpenEarthMap
	├── images
	├── labels
	├── train.txt
	└── val.txt

训练脚本

Pretrained

During training, we used ConvNeXt Base, ConvNeXtV2 Base, and InternImage-H as pre-trained weights to initialize the model.

OpenEarthMap

./tools/dist_train.sh openearth_configs/convb_segformer_768.py 8
./tools/dist_train.sh openearth_configs/convb_uper_512.py 8
./tools/dist_train.sh openearth_configs/convbv2_uper_640.py 8

DFC2025

./tools/dist_train.sh dfc2025_configs/InternImage_h_upernet_dfc_896.py 8

Best Weigths

The trained weights can be downloaded from this link. Google Drive

推理脚本

OpenEarthMap

./tools/dist_test.sh openearth_configs/convbv2_uper_640.py  weights/best/convbv2_upernet_openerathmap_640.pth  8 --format-only --eval-options "imgfile_prefix=./outputs/convbv2_upernet_640_test"
./tools/dist_test.sh openearth_configs/convb_uper_512.py  weights/best/convb_upernet_openerathmap_512.pth  8 --format-only --eval-options "imgfile_prefix=./outputs/train/convb_upernet_512"
./tools/dist_test.sh openearth_configs/convb_segformer_768.py  weights/best/convb_segformer_openerathmap_768.pth  8 --format-only --eval-options "imgfile_prefix=./outputs/train/convb_segformer_768"

生成新的训练集标签

python generate_newlabel.py

DFC2025

./tools/dist_test.sh dfc2025_configs/InternImage_h_upernet_dfc_896.py  weights/best/InternImageH_upernet_dfc_896.pth  8 --format-only --eval-options "imgfile_prefix=./submit"
cd submit && zip -r ../submit.zip *

Acknowledgement

We built these codes based on the following:

  1. mmsegmentation
  2. InternImage

About

code for dfc2025 track1 2nd

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages