Skip to content

anxiangsir/urban_seg

Repository files navigation

🌆 Urban Segmentation Project | 城市分割项目

LICENSE

🚀 项目概述 | Project Overview

中文

这是一个面向新手的遥感图像语义分割项目。我们使用了在4亿张图像上预训练的 unicom模型,该模型在遥感分割任务中表现出色。令人惊讶的是,仅使用4张遥感图像进行训练即可获得优异效果。

English

This is a beginner-friendly semantic segmentation project for remote sensing images. We employ the unicom model pre-trained on 400 million images, which demonstrates outstanding performance on remote sensing segmentation tasks. Remarkably, it achieves excellent results with just 4 training images.


🌟 效果展示 | Results Showcase

预测效果 | Predictions
测试样例 | Test Samples

🛠️ 快速开始 | Quick Start

单GPU训练 | 1-GPU Training

python train_one_gpu.py  # 200行极简实现 | Minimal 200-line implementation

多GPU训练 | Multi-GPU Training

torchrun --nproc_per_node 8 train_multi_gpus.py  # 高性能多卡支持 | High-performance multi-GPU

📦 安装指南 | Installation

git clone https://github.com/anxiangsir/urban_seg.git
cd urban_seg
pip install -r requirements.txt

📁 数据准备 | Data Preparation

数据集结构 | Dataset Structure

dataset
├── origin       # 5张带标注的原始图像 | 5 annotated originals
├── test         # 3张无标注测试图像(本项目未使用)| 3 unlabeled test images (unused)
└── train        # 通过预处理生成的训练数据 | Generated by preprocess.py
    ├── images   # 训练图像 | Training images
    └── labels   # 对应标签 | Corresponding labels

数据预处理 | Preprocessing

python preprocess.py  # 随机采样生成训练集 | Generate training set via random sampling

预训练模型 | Pretrained Models

请从这里下载:
https://github.com/deepglint/unicom/releases

FP16-ViT-B-32.pt
FP16-ViT-B-16.pt
FP16-ViT-L-14.pt
FP16-ViT-L-14-336px.pt

数据集下载 | Dataset Download

CCF卫星影像的AI分类与识别提供的数据集初赛复赛训练集,一共五张卫星遥感影像 百度云盘,密码:3ih2

📜 引用我们 | Citation

@inproceedings{anxiang_2023_unicom,
  title={Unicom: Universal and Compact Representation Learning for Image Retrieval},
  author={An, Xiang and Deng, Jiankang and Yang, Kaicheng and Li, Jiawei and Feng, Ziyong and Guo, Jia and Yang, Jing and Liu, Tongliang},
  booktitle={ICLR},
  year={2023}
}

💬 交流社区 | Community

QQ群: 679897018 | QQ Group: 679897018 欢迎提交Issue或加群讨论! | Welcome to submit issues or join our group!