🚀 Olympus: コンピュータビジョンタスクのための汎用タスクルーター
(CVPR 2025, Highlight)
Olympusは、コンピュータビジョンタスクを効率的に処理するための汎用タスクルーターです。CVPR 2025でHighlightとして発表されました。

🚀 クイックスタート
このセクションでは、Olympusを使用するための基本的な手順を説明します。
🛠️ 環境のインストール
環境を構築するには、シェルで以下のコードを実行します。
git clone https://github.com/yuanze-lin/Olympus.git
cd Olympus
conda create -n olympus python==3.10 -y
conda activate olympus
pip install -r requirements.txt
これにより、使用する環境 olympus
が作成されます。
モデルとデータのダウンロード
収集したOlympusデータセットを以下のように共有しています。
Olympus_20tasks_all
: 20個の個別タスク
フォルダの下に20個のJSONファイルがあり、それぞれが特定のタスクに対応しています。論文のルーティングトークン定義を参照することで、各JSONファイルに関連付けられたタスクを特定できます。また、coa.json
に提供されているアクションチェーンデータも参照できます。これら21個のJSONファイルには、トレーニングデータとテストデータの両方が含まれています。
Olympus.json
: 最終的な微調整データです。
(1) Olympusモデルをダウンロードします。
python download_olympus.py
これにより、Olympus
モデルが ckpts
フォルダの下に保存されます。
(2) 微調整用のOlympusデータをダウンロードします。
python download_olympus_json.py
JSONデータは、train_data
フォルダ内に Olympus.json
として保存されます。なお、Olympus.json
には、20個のタスクから収集したデータと llava_v1_5_mix665k.json
が結合されています。
手動でデータを結合する場合は、まず mkdir jsons
で jsons
フォルダを作成し、Olympus_20tasks_all と llava_v1_5_mix665k.json からすべてのJSONファイルを jsons
フォルダにダウンロードしてから、結合スクリプトを実行します。
python scripts/merge_data.py
(3) 微調整用のMipha-3Bモデルをダウンロードします。
python download_mipha_3b.py
これにより、Mipha-3B
モデルが ckpts
フォルダの下に保存されます。
推論
以下のコードを実行して推論を行います。
model_name=Olympus
MODELDIR=ckpts/$model_name
python predict.py \
--prompt "Generate an image of a fluffy orange cat lounging on a windowsill, \
with sunlight streaming through the glass and casting soft shadows to create a cozy atmosphere. \
Next, would it be possible to change the cat's color to white? This change will make it more eye-catching. \
In the following step, produce a high-resolution 3D model based on the modified image. \
At the next point, please show a video of a cat and a dog running on a playground." \
--model-path $MODELDIR \
--temperature 0 \
--conv-mode v0
あるいは、bash predict.sh
を実行することもできます。
予測結果は以下のようになります。
Input Prompt: Generate an image of a fluffy orange cat lounging on a windowsill,
with sunlight streaming through the glass and casting soft shadows to create a cozy atmosphere.
Next, would it be possible to change the cat's color to white? This change will make it more eye-catching.
In the following step, produce a high-resolution 3D model based on the modified image.
At the next point, please show a video of a cat and a dog running on a playground.
Output: <image_gen>a fluffy orange cat lounging on a windowsill, with sunlight streaming
through the glass and casting soft shadows to create a cozy atmosphere.</image_gen>
<image_edit>change the cat's color to white.</image_edit>
<3D_gen_image>produce a high-resolution 3D model based on the modified image.</3D_gen_image>
<video_gen>a cat and a dog running on a playground.</video_gen>
--prompt
を変更することで、必要に応じて入力プロンプトをカスタマイズできます。
視覚命令微調整
命令微調整データを準備するには、こちら を参照してください。特に、異なるデータセットからの画像を train_data
フォルダの下に保存してください。
以下のコードを実行してモデルを微調整します。
bash scripts/mipha/finetune.sh
評価
モデルの性能をさまざまなベンチマークで評価するには、Evaluation.md を参照してください。
評価データは eval
フォルダの下に配置してください。評価スクリプトは scripts/mipha/eval/
の下に配置されています。
たとえば、VQAv2データセットでモデルの性能をテストするには、以下のコマンドを実行します。
bash scripts/mipha/eval/vqav2.sh
✨ 主な機能
- 汎用タスクルーティング: コンピュータビジョンタスクを効率的にルーティングします。
- 多様なタスク対応: 20種類のコンピュータビジョンタスクをサポートします。
- 柔軟な微調整: モデルを特定のタスクに合わせて微調整できます。
🔮 サポートされる機能 (20のタスクをカバー)
🏂 多様なアプリケーション
📄 ライセンス
このプロジェクトは、Apache-2.0ライセンスの下で公開されています。
引用
Olympusがあなたの研究やアプリケーションに役立つ場合、以下のBibTeXを使用して引用してください。
@article{lin2024olympus,
title={Olympus: A Universal Task Router for Computer Vision Tasks},
author={Lin, Yuanze and Li, Yunsheng and Chen, Dongdong and Xu, Weijian and Clark, Ronald and Torr, Philip HS},
journal={arXiv preprint arXiv:2412.09612},
year={2024}
}
謝辞
このプロジェクトは、以下の基礎の上に構築されています。
- Mipha: 軽量な視覚言語アシスタントのための印象的なオープンソースプロジェクト
- LLaVA: 強力なオープンソース視覚言語アシスタントプロジェクト