🚀 微調圖像描述模型
這是一個經過微調的BLIP模型,用於對零售產品圖像進行視覺問答。該模型在自定義數據集上進行了微調,這些數據集包含來自在線零售平臺的圖像,並配有產品描述註釋。
這個實驗性模型可用於回答零售行業產品圖像相關的問題。產品元數據豐富、驗證人工生成的產品描述等都是可能的應用場景。
🚀 快速開始
模型信息
屬性 |
詳情 |
模型類型 |
用於零售產品圖像視覺問答的微調版BLIP模型 |
訓練數據 |
phiyodr/coco2017以及來自在線零售平臺的自定義圖像數據集,並配有產品描述註釋 |
評估指標 |
BLEU |
庫名稱 |
transformers |
許可證 |
Apache-2.0 |
模型預測示例
輸入圖像 |
預測結果 |
 |
kitchenaid artisann stand mixer |
 |
a bottle of milk sitting on a counter |
 |
dove sensitive skin lotion |
 |
bread bag with blue plastic handl |
 |
bush ' s best white beans |
💻 使用示例
基礎用法
import requests
from PIL import Image
from transformers import BlipProcessor, BlipForConditionalGeneration
processor = BlipProcessor.from_pretrained("quadranttechnologies/qhub-blip-image-captioning-finetuned")
model = BlipForConditionalGeneration.from_pretrained("quadranttechnologies/qhub-blip-image-captioning-finetuned")
img_url = 'https://storage.googleapis.com/sfr-vision-language-research/BLIP/demo.jpg'
raw_image = Image.open(requests.get(img_url, stream=True).raw).convert('RGB')
text = "a photography of"
inputs = processor(raw_image, text, return_tensors="pt")
out = model.generate(**inputs)
print(processor.decode(out[0], skip_special_tokens=True))
inputs = processor(raw_image, return_tensors="pt")
out = model.generate(**inputs)
print(processor.decode(out[0], skip_special_tokens=True))
📚 詳細文檔
BibTex和引用信息
@misc{https://doi.org/10.48550/arxiv.2201.12086,
doi = {10.48550/ARXIV.2201.12086},
url = {https://arxiv.org/abs/2201.12086},
author = {Li, Junnan and Li, Dongxu and Xiong, Caiming and Hoi, Steven},
keywords = {Computer Vision and Pattern Recognition (cs.CV), FOS: Computer and information sciences, FOS: Computer and information sciences},
title = {BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation},
publisher = {arXiv},
year = {2022},
copyright = {Creative Commons Attribution 4.0 International}
}