Files
陈赣 06f1fd69a6
Some checks failed
Self-hosted runner (nightly-past-ci-caller) / Get number (push) Has been cancelled
Self-hosted runner (nightly-past-ci-caller) / TensorFlow 2.11 (push) Has been cancelled
Self-hosted runner (nightly-past-ci-caller) / TensorFlow 2.10 (push) Has been cancelled
Self-hosted runner (nightly-past-ci-caller) / TensorFlow 2.9 (push) Has been cancelled
Self-hosted runner (nightly-past-ci-caller) / TensorFlow 2.8 (push) Has been cancelled
Self-hosted runner (nightly-past-ci-caller) / TensorFlow 2.7 (push) Has been cancelled
Self-hosted runner (nightly-past-ci-caller) / TensorFlow 2.6 (push) Has been cancelled
Self-hosted runner (nightly-past-ci-caller) / TensorFlow 2.5 (push) Has been cancelled
Self-hosted runner (benchmark) / Benchmark (aws-g5-4xlarge-cache) (push) Has been cancelled
Build documentation / build (push) Has been cancelled
Build documentation / build_other_lang (push) Has been cancelled
CodeQL Security Analysis / CodeQL Analysis (push) Has been cancelled
New model PR merged notification / Notify new model (push) Has been cancelled
PR CI / pr-ci (push) Has been cancelled
Slow tests on important models (on Push - A10) / Get all modified files (push) Has been cancelled
Secret Leaks / trufflehog (push) Has been cancelled
Update Transformers metadata / build_and_package (push) Has been cancelled
Slow tests on important models (on Push - A10) / Model CI (push) Has been cancelled
Check Tiny Models / Check tiny models (push) Has been cancelled
Self-hosted runner (Intel Gaudi3 scheduled CI caller) / Model CI (push) Has been cancelled
Self-hosted runner (Intel Gaudi3 scheduled CI caller) / Pipeline CI (push) Has been cancelled
Self-hosted runner (Intel Gaudi3 scheduled CI caller) / Example CI (push) Has been cancelled
Self-hosted runner (Intel Gaudi3 scheduled CI caller) / DeepSpeed CI (push) Has been cancelled
Self-hosted runner (Intel Gaudi3 scheduled CI caller) / Trainer/FSDP CI (push) Has been cancelled
Nvidia CI - Flash Attn / Setup (push) Has been cancelled
Nvidia CI - Flash Attn / Model CI (push) Has been cancelled
Nvidia CI / Setup (push) Has been cancelled
Nvidia CI / Model CI (push) Has been cancelled
Nvidia CI / Torch pipeline CI (push) Has been cancelled
Nvidia CI / Example CI (push) Has been cancelled
Nvidia CI / Trainer/FSDP CI (push) Has been cancelled
Nvidia CI / DeepSpeed CI (push) Has been cancelled
Nvidia CI / Quantization CI (push) Has been cancelled
Nvidia CI / Kernels CI (push) Has been cancelled
Doctests / Setup (push) Has been cancelled
Doctests / Call doctest jobs (push) Has been cancelled
Doctests / Send results to webhook (push) Has been cancelled
Extras Smoke Test / Get supported Python versions (push) Has been cancelled
Extras Smoke Test / Test extras on Python ${{ matrix.python-version }} (push) Has been cancelled
Extras Smoke Test / Check Slack token availability (push) Has been cancelled
Extras Smoke Test / Notify failures to Slack (push) Has been cancelled
Self-hosted runner (AMD scheduled CI caller) / Trigger Scheduled AMD CI (push) Has been cancelled
Stale Bot / Close Stale Issues (push) Has been cancelled
first commit
2026-06-05 16:53:03 +08:00

5.5 KiB

CLIPSeg

Overview

CLIPSeg モデルは、Timo Lüddecke, Alexander Ecker によって Image Segmentation using Text and Image Prompts で提案されました。 そしてアレクサンダー・エッカー。 CLIPSeg は、ゼロショットおよびワンショット画像セグメンテーションのために、凍結された CLIP モデルの上に最小限のデコーダを追加します。

論文の要約は次のとおりです。

画像のセグメンテーションは通常、トレーニングによって解決されます。 オブジェクト クラスの固定セットのモデル。後で追加のクラスやより複雑なクエリを組み込むとコストがかかります これらの式を含むデータセットでモデルを再トレーニングする必要があるためです。ここでシステムを提案します 任意の情報に基づいて画像セグメンテーションを生成できます。 テスト時にプロンプ​​トが表示されます。プロンプトはテキストまたは 画像。このアプローチにより、統一されたモデルを作成できます。 3 つの一般的なセグメンテーション タスクについて (1 回トレーニング済み) 参照式のセグメンテーション、ゼロショット セグメンテーション、ワンショット セグメンテーションという明確な課題が伴います。 CLIP モデルをバックボーンとして構築し、これをトランスベースのデコーダで拡張して、高密度なデータ通信を可能にします。 予測。の拡張バージョンでトレーニングした後、 PhraseCut データセット、私たちのシステムは、フリーテキスト プロンプトまたは クエリを表す追加の画像。後者の画像ベースのプロンプトのさまざまなバリエーションを詳細に分析します。 この新しいハイブリッド入力により、動的適応が可能になります。 前述の 3 つのセグメンテーション タスクのみですが、 テキストまたは画像をクエリするバイナリ セグメンテーション タスクに 定式化することができる。最後に、システムがうまく適応していることがわかりました アフォーダンスまたはプロパティを含む一般化されたクエリ

描画

CLIPSeg の概要。 元の論文から抜粋。

このモデルは、nielsr によって提供されました。 元のコードは ここ にあります。

Usage tips

  • [CLIPSegForImageSegmentation] は、[CLIPSegModel] の上にデコーダを追加します。後者は [CLIPModel] と同じです。
  • [CLIPSegForImageSegmentation] は、テスト時に任意のプロンプトに基づいて画像セグメンテーションを生成できます。プロンプトはテキストのいずれかです (input_ids としてモデルに提供される) または画像 (conditional_pixel_values としてモデルに提供される)。カスタムを提供することもできます 条件付き埋め込み (conditional_embeddingsとしてモデルに提供されます)。

Resources

CLIPSeg の使用を開始するのに役立つ、公式 Hugging Face およびコミュニティ (🌎 で示されている) リソースのリスト。ここに含めるリソースの送信に興味がある場合は、お気軽にプル リクエストを開いてください。審査させていただきます。リソースは、既存のリソースを複製するのではなく、何か新しいものを示すことが理想的です。

CLIPSegConfig

autodoc CLIPSegConfig

CLIPSegTextConfig

autodoc CLIPSegTextConfig

CLIPSegVisionConfig

autodoc CLIPSegVisionConfig

CLIPSegProcessor

autodoc CLIPSegProcessor

CLIPSegModel

autodoc CLIPSegModel - forward - get_text_features - get_image_features

CLIPSegTextModel

autodoc CLIPSegTextModel - forward

CLIPSegVisionModel

autodoc CLIPSegVisionModel - forward

CLIPSegForImageSegmentation

autodoc CLIPSegForImageSegmentation - forward