autodistill gpt 4v
1.0.0
このリポジトリには、AutoDistillで使用するGPT-4Vベースモデルをサポートするコードが含まれています。
OpenAIによって開発されたGPT-4Vは、マルチモーダル言語モデルです。 GPT-4Vを使用すると、自然言語の画像について質問することができます。 autodistill-gpt4vモジュールを使用すると、GPT-4Vを使用して画像を分類できます。
このモデルでは、2023年11月6日にOpenaiによって発表されたGPT-4-Vision-Preview APIを使用しています。
注記
このプロジェクトを使用すると、Openai GPT-4 Vision APIへのAPI呼び出しに対して請求料がかかります。詳細については、予想される価格設定を計算するには、OpenAI価格ページを参照してください。このパッケージは、ラベル付けする画像ごとに1つのAPI呼び出しを作成します。
完全なAutoDistillドキュメントを読んでください。
GPT-4V AutoDistillドキュメントをお読みください。
AutoDistillでGPT-4Vを使用するには、次の依存関係をインストールする必要があります。
pip3 install autodistill-gpt-4v from autodistill_gpt_4v import GPT4V
# define an ontology to map class names to our GPT-4V prompt
# the ontology dictionary has the format {caption: class}
# where caption is the prompt sent to the base model, and class is the label that will
# be saved for that caption in the generated annotations
# then, load the model
base_model = GPT4V (
ontology = CaptionOntology (
{
"person" : "person" ,
"a forklift" : "forklift"
}
),
api_key = "OPENAI_API_KEY"
)
base_model . label ( "./context_images" , extension = ".jpeg" )このプロジェクトは、MITライセンスの下でライセンスされています。
私たちはあなたの入力が大好きです!開始するためのCore Autodistill Contributing Guideをご覧ください。すべての貢献者に感謝します!