🚀 Git-RSCLIP
[Git-RSCLIP] は、256x256サイズで、このリポジトリ で最初に公開された、グローバル規模のリモートセンシング画像-テキストペアデータセットであるGit-10Mデータセット(1000万の画像-テキストペアから構成される)で事前学習されています。このモデルは、[google/siglip-large-patch16-256] と同様の構造を採用しています。
これは ラージバージョン で、ベースバージョン はこちらにあります: [Git-RSCLIP-base]
🚀 クイックスタート
このモデルは、ゼロショット画像分類や画像-テキスト検索などのタスクに使用できます。
✨ 主な機能
- ゼロショット画像分類や画像-テキスト検索などのタスクに使用可能
- Git-10Mデータセットで事前学習された、グローバル規模のリモートセンシング画像-テキストペアモデル
📦 インストール
このモデルは transformers
ライブラリを使用して読み込むことができます。以下のコマンドでインストールできます。
pip install transformers
💻 使用例
基本的な使用法
Git-RSCLIPを使用して画像特徴量を取得する
from PIL import Image
import requests
from transformers import AutoProcessor, AutoModel
import torch
model = AutoModel.from_pretrained("lcybuaa/Git-RSCLIP")
processor = AutoProcessor.from_pretrained("lcybuaa/Git-RSCLIP")
url = "https://github.com/Chen-Yang-Liu/PromptCC/blob/main/Example/B/train_000051.png?raw=true"
image = Image.open(requests.get(url, stream=True).raw)
inputs = processor(images=image, return_tensors="pt")
with torch.no_grad():
image_features = model.get_image_features(**inputs)
高度な使用法
ゼロショット画像分類
from PIL import Image
import requests
from transformers import AutoProcessor, AutoModel
import torch
model = AutoModel.from_pretrained("lcybuaa/Git-RSCLIP")
processor = AutoProcessor.from_pretrained("lcybuaa/Git-RSCLIP")
url = "https://github.com/Chen-Yang-Liu/PromptCC/blob/main/Example/B/train_000051.png?raw=true"
image = Image.open(requests.get(url, stream=True).raw)
texts = ["a remote sensing image of river", "a remote sensing image of houses and roads"]
inputs = processor(text=texts, images=image, padding="max_length", return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
logits_per_image = outputs.logits_per_image
probs = torch.sigmoid(logits_per_image)
top5_indices = torch.argsort(probs, descending=True)[:, :5].cpu().numpy()
top1_indices = top5_indices[:, 0]
print(f"the image 0 is '{top1_indices[0]}'")
より多くのコード例については、ドキュメント を参照してください。
📚 ドキュメント
想定される用途と制限
このモデルは、ゼロショット画像分類や画像-テキスト検索などのタスクに使用できます。
トレーニング手順
トレーニングデータ
Git-RSCLIPは、Git-10Mデータセット(グローバル規模のリモートセンシング画像-テキストペアデータセットで、1000万の画像-テキストペアから構成される)で事前学習されています (Liu et al., 2024)。
前処理
画像は、同じ解像度(256x256)にリサイズ/リスケールされ、RGBチャンネル全体で平均(0.5, 0.5, 0.5)と標準偏差(0.5, 0.5, 0.5)で正規化されます。
テキストはトークン化され、同じ長さ(64トークン)にパディングされます。
評価結果
Git-RSCLIPの他のCLIPモデルとの比較評価結果は以下の通りです(論文から引用)。

BibTeX引用
@ARTICLE{10988859,
author={Liu, Chenyang and Chen, Keyan and Zhao, Rui and Zou, Zhengxia and Shi, Zhenwei},
journal={IEEE Geoscience and Remote Sensing Magazine},
title={Text2Earth: Unlocking text-driven remote sensing image generation with a global-scale dataset and a foundation model},
year={2025},
volume={},
number={},
pages={2-23},
doi={10.1109/MGRS.2025.3560455}}
📄 ライセンス
このプロジェクトは、Apache-2.0ライセンスの下で公開されています。