Markdownで表示

Perception Encoder

Perception Encoderは、画像、テキスト、有限長の動画クリップを共通の埋め込み空間に変換します。

タスク
classification, embeddings
インストール
pip install "libreyolo[clip]"
サポートティア
姉妹ティア、v1.6.0以降。独自のファクトリと契約を持つ、独立した製品インターフェースです。
アップストリーム
Meta AIのPerception Encoder、Apache-2.0。論文、ソース
ライセンス
コード:MIT、重み:Apache-2.0。商用利用

インストール

bash
pip install "libreyolo[clip]"

推論

Python
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibrePEt16-cls.pt", device="cpu")model.set_classes(["person", "building"])result = model(SAMPLE_IMAGE)print(result.probs)

ゼロショット分類の前にクラスを設定してください。埋め込みベクトルを取得する場合は、読み込み時にtask="embed"を指定します。動画の埋め込み処理では、デフォルトでclip_frames=8フレームを抽出し、そのベクトルを平均してL2正規化します。学習には対応していません。エクスポートした動画用グラフは、ランタイムへの直接入力を受け付けます。

エクスポート

タスクONNXTorchScriptExecuTorchTensorRTOpenVINOPaddleMNNRKNNncnnTFLiteCoreMLCore AI
ClassificationClassification to ONNX:対応Classification to TorchScript:対応Classification to ExecuTorch:対応Classification to TensorRT:対応Classification to OpenVINO:対応Classification to Paddle:非対応Classification to MNN:非対応Classification to RKNN:非対応Classification to ncnn:非対応Classification to TFLite:非対応Classification to CoreML:非対応Classification to Core AI:非対応
EmbeddingsEmbeddings to ONNX:対応Embeddings to TorchScript:対応Embeddings to ExecuTorch:対応Embeddings to TensorRT:対応Embeddings to OpenVINO:対応Embeddings to Paddle:非対応Embeddings to MNN:非対応Embeddings to RKNN:非対応Embeddings to ncnn:非対応Embeddings to TFLite:非対応Embeddings to CoreML:非対応Embeddings to Core AI:非対応
Python
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibrePEt16-cls.pt", device="cpu")model.export(format="onnx")

形式ごとの依存関係とエクスポートしたファイルの読み込みについてはエクスポートの設定を参照してください。

チェックポイント

ファイル重みのライセンス
Classification
LibrePEt16-cls.ptapache-2.0
LibrePEs16-cls.ptapache-2.0
LibrePEb16-cls.ptapache-2.0
LibrePEl14-cls.ptapache-2.0
LibrePEg14-cls.ptapache-2.0

上記のすべてのファイルは現在LibreYOLO orgにあり、初回使用時にダウンロードされます。

ライセンス

ダウンロードする特定の重みについて、Hugging Faceリポジトリのライセンスを確認してください。LibreYOLO orgの各チェックポイントにはライセンスが付与されており、同じファミリー内でも常に同一とは限りません。そのリポジトリが正式な情報源です。以下の概要は、このページを最後に検証した時点で適用されていた内容を示します。

これは関連するライセンスの説明であり、法的助言ではありません。商用上重要な場合は、自分でライセンスを読み、専門家の助言を受けてください。

原著作物
Perception Encoder, Meta AI
アップストリームのライセンス
Apache-2.0
アップストリームのソース
github.com/facebookresearch/perception_models
LibreYOLOのコード
MIT
重み
Apache-2.0、huggingface.co/LibreYOLOで再公開
解釈
The publisher declares Apache-2.0 for the encoder weights.

引用

@article{bolya2025PerceptionEncoder,
  title={Perception Encoder: The best visual embeddings are not at the output of the network},
  author={Daniel Bolya and Po-Yao Huang and Peize Sun and Jang Hyun Cho and Andrea Madotto and Chen Wei and Tengyu Ma and Jiale Zhi and Jathushan Rajasegaran and Hanoona Rasheed and Junke Wang and Marco Monteiro and Hu Xu and Shiyu Dong and Nikhila Ravi and Daniel Li and Piotr Doll{\'a}r and Christoph Feichtenhofer},
  journal={arXiv:2504.13181},
  year={2025}
}

著者によるraw.githubusercontent.com/facebookresearch/perception_models/main/README.mdの引用ブロックからコピーしています。

LibreYOLO v1.6.0で検証済みです。このページのサポート表、チェックポイント、ベンチマーク値は手作業で記述したものではなく、リリース済みライブラリと公開済みの重みから生成されています。

PE Core のアーキテクチャ

バリアントまたはファミリー概要を選び、ブロックを選択すると詳細を確認できます。図全体を開くと、拡大や SVG、PNG のダウンロードができます。図のラベルは英語です。