autodistill gpt 4v
1.0.0
該存儲庫包含支持GPT-4V基本模型的代碼,可與AutoDistill一起使用。
由OpenAI開發的GPT-4V是一種多模式語言模型。使用GPT-4V,您可以詢問有關自然語言圖像的問題。 autodistill-gpt4v模塊使您可以使用GPT-4V對圖像進行分類。
該型號使用OpenAI於2023年11月6日宣布的GPT-4-Vision-Preiview API。
筆記
使用此項目將對OpenAI GPT-4 Vision API的API呼叫收取費用。有關更多信息,請參閱OpenAI定價頁面,併計算您的預期定價。此軟件包可以通過您要標記的圖像進行一個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許可證的許可。
我們愛您的投入!請參閱《核心自動賽貢獻指南》的入門指南。感謝我們所有的貢獻者!