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许可证的许可。
我们爱您的投入!请参阅《核心自动赛贡献指南》的入门指南。感谢我们所有的贡献者!