🚀 AdaptFormer模型在LEVIR - CD数据集上微调
AdaptFormer模型是一个用于遥感图像变化检测的模型,它能自适应地解释分层语义。本模型在LEVIR - CD数据集上进行了微调,分辨率为512x512,可有效应用于图像分割等视觉任务。
🚀 快速开始
AdaptFormer模型在LEVIR - CD数据集上进行了微调,分辨率为512x512。该模型由Pang等人在论文 AdaptFormer: An Adaptive Hierarchical Semantic Approach for Change Detection on Remote Sensing Images 中提出,并首次在 此仓库 发布。
✨ 主要特性
AdaptFormer独特地设计为能够自适应地解释分层语义。它摒弃了一刀切的方法,针对三种不同的语义深度采用不同的策略:
- 对于浅层语义,采用简单直接的操作;
- 对于中层语义,吸收空间数据以强调区域间的详细变化;
- 对于深层语义,集成级联深度注意力,专注于高级表示。
💻 使用示例
基础用法
from transformers import AutoImageProcessor, AutoModel
from PIL import Image
import requests
image_processor = AutoImageProcessor.from_pretrained("deepang/adaptformer-LEVIR-CD")
model = AutoModel.from_pretrained("deepang/adaptformer-LEVIR-CD")
image_A = Image.open(requests.get('https://raw.githubusercontent.com/aigzhusmart/AdaptFormer/main/figures/test_2_1_A.png', stream=True).raw)
image_B = Image.open(requests.get('https://raw.githubusercontent.com/aigzhusmart/AdaptFormer/main/figures/test_2_1_B.png', stream=True).raw)
label = Image.open(requests.get('https://raw.githubusercontent.com/aigzhusmart/AdaptFormer/main/figures/test_2_1_label.png', stream=True).raw)
inputs = preprocessor(images=(image_A, image_B), return_tensors="pt")
outputs = adaptfromer_model(**inputs)
logits = outputs.logits
pred = logits.argmax(dim=1)[0]
📄 许可证
此模型的许可证信息可在 这里 找到。
BibTeX引用信息
@article{huang2024adaptformer,
title={AdaptFormer: An Adaptive Hierarchical Semantic Approach for Change Detection on Remote Sensing Images},
author={Huang, Teng and Hong, Yile and Pang, Yan and Liang, Jiaming and Hong, Jie and Huang, Lin and Zhang, Yuan and Jia, Yan and Savi, Patrizia},
journal={IEEE Transactions on Instrumentation and Measurement},
year={2024},
publisher={IEEE}
}
📦 信息表格
属性 |
详情 |
模型类型 |
用于图像分割的微调AdaptFormer模型 |
训练数据 |
LEVIR - CD数据集 |