Home

Awesome

ALPS

This is the offical implement of our ALPS framwork.

Paper: "ALPS: An Auto-Labeling and Pre-training Scheme for Remote Sensing Segmentation With Segment Anything Model"

Paper Link

Usage

Environment

Install Segment Anything:

git clone git@github.com:facebookresearch/segment-anything.git
cd segment-anything; pip install -e .

Click the links below to download the checkpoint for the corresponding model type.

Getting Started

  1. Follow the structure below to organize the dataset:
├──dataset_path
│   ├── img_dir
│   │   ├── train
│   │   │   ├── xxx{img_suffix}
│   │   │   ├── yyy{img_suffix}
│   │   │   ├── zzz{img_suffix}
│   │   │   ├── ....
│   │   ├── val
│   │   │   ├── xxx{img_suffix}
│   │   │   ├── yyy{img_suffix}
│   │   │   ├── zzz{img_suffix}
│   │   │   ├── ....
│   │   ├── test
│   │   │   ├── xxx{img_suffix}
│   │   │   ├── yyy{img_suffix}
│   │   │   ├── zzz{img_suffix}
│   │   │   ├── ....
  1. First, download the pre-trained SAM model checkpoint. Then, you can use the command line below to perform automatic labeling on your own datasets:
python main.py --root_dir .../dataset_path --image_suffix .png --sam_checkpoint .../sam_vit_h_4b8939.pth --model_type vit_h --number_clusters xx --vis True
  1. Additionally, our framework supports more customized parameter settings: