Class Similarity Transition: Decoupling Class Similarities and Imbalance from Generalized Few-shot Segmentation
This project is used to train the base class model for ClassTrans. We suggest to skip this step and directly use this checkpoint to reimplement our results.
We use a adapted version of OpenEarthMap datasets. You can download the full .zip and directly extract it in the data/
folder.
Alternatively, you can prepare the datasets yourself. Here is the structure of the data folder for you to reproduce:
data
├── trainset
│ ├── images
│ └── labels
|
└── train.txt
We use ConvNext_large pre-trained using CLIP as backbone. You can download the weight here and move it to pretrain/
.
Data are located in data/
contains the train dataset. All the codes are provided in src/
. Testing script is located at the root of the repo.
python train.py
The weights of the model are saved in the weight/
and you can use them in ClassTrans.