匿名用户2024年07月31日
65阅读

技术信息

开源地址
https://modelscope.cn/models/xiajinpeng123/BLIP2-Chinese
授权协议
Apache License 2.0

作品详情

BLIP2-Qformer

简介 Brief Itroductio

首个开源的中文BLIP2模型。我们遵循BLIP2的实验设置,采用itc、itm、lm损失,基于2亿中文图文对训练5个epoch,得到第一个中文版本的blip2模型。

The first ope source Chiese BLIP2. We follow the experimetal setup of BLIP2, we adopted itc, itm ad lm losses, traied 5 epochs based o 200 millio Chiese image pairs, ad obtaied the first Chiese versio of BLIP2.

下游效果 Performace

Zero-Shot image-to-text-retrieval

model COCO-CN Flickr30k-CN
c_clip 60.4 80.2
c_blip2(ours) 70.3 85.7

Zero-Shot text-to-image-retrieval

model COCO-CN Flickr30k-CN
c_clip 64.0 68.0
c_blip2(ours) 71.4 70.46

使用 Usage

from modelscope.hub.sapshot_dowload import sapshot_dowload
model_path = sapshot_dowload('xiajipeg123/BLIP2-Chiese',revisio='v1.0.0')
import os
os.chdir(model_path)
import sys
sys.path.isert(0, model_path)
import ms_wrapper
from modelscope.pipelies import pipelie
img = [f"{model_path}/test1.jpg",f"{model_path}/test3.jpg"]
txt=["两台汽车","白色标记","两辆汽车停在公路上","两只小鸟在树上"]
iput_dict=dict()
iput_dict['img']=img
iput_dict['text']=txt
weight_path = f"{model_path}/checkpoit_04.pth"

iferece = pipelie('image-text-retrieval', model='xiajipeg123/BLIP2-Chiese',model_revisio='v1.0.0', weight_path=weight_path,device="cuda") # GPU环境可以设置为True
output = iferece(iput_dict)

prit(output)
 git cloe https://www.modelscope.c/xiajipeg123/BLIP2-Chiese.git

使用方式及场景

使用方式:

  • 对输入的图像、文本数据进行特征提取

使用场景:

  • 通用的图文跨模态检索任务
  • 通用图文特征提取器

模型局限性以及可能的偏差

  • 训练数据集自身有局限,有可能产生一些偏差,请用户自行评测后决定如何使用。

如果喜欢,敬请下载收藏!

功能介绍

BLIP2-Qformer 简介 Brief Introduction 首个开源的中文BLIP2模型。我们遵循BLIP2的实验设置,采用itc、itm、lm损失,基于2亿中文图文对训练5个epoch,

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论