Comments (7)
如果是测试的话,使用test.jsonl
格式应该是这样的:
{"image": "图片路径", "bbox": [[279, 134, 358, 231], [28, 93, 121, 221], [0, 371, 99, 497]], "height": 512, "width": 512}
关于测试使用的Prompt,可以在evaluate_grounding.py找到Prompt设置
from qwen-vl.
@danjuan-77 感谢回复,我还有两个问题想要请教您~
第一个就是关于grounding微调是否也需要加上 "height": 512, "width": 512,我之前微调没有加上这个参数
第二个想询问下关于evaluate_vqa.py的测试数据格式
感激不尽!
from qwen-vl.
@danjuan-77 感谢回复,我还有两个问题想要请教您~ 第一个就是关于grounding微调是否也需要加上 "height": 512, "width": 512,我之前微调没有加上这个参数 第二个想询问下关于evaluate_vqa.py的测试数据格式 感激不尽!
关于数据格式,可以参考这个文件中的说明:eval_mm/EVALUATION.md
里面有Qwen测试数据的下载地址可以参考一下,grounding微调是需要加入图片的宽高参数,因为Qwen需要对坐标进行归一化,在evaluate_grounding.py大约246行可以看到。
由于我只做了目标检测相关的任务微调,vqa我不太了解,eval_mm/EVALUATION.md
里面应该会有相关数据下载地址,可以下载下来看看。
from qwen-vl.
@danjuan-77 好嘞感谢!我刚刚正在看
from qwen-vl.
你好,请问您在使用Qwen-VL\eval_mm\evaluate_grounding.py进行测试试的命令是什么呢?
我在evaluate_caption.py测试格式是:
ds="nocaps"
checkpoint=/data/checkpoint/qwen/Qwen-VL-Chat
python -m torch.distributed.run
--nproc_per_node 1
--nnodes 1
--node_rank 0
--master_addr ${MASTER_ADDR:-127.0.0.1}
--master_port 12345
evaluate_caption.py
--checkpoint $checkpoint
--dataset $ds
--batch-size 8
--num-workers 2
数据集也已经下载好但是会出现没有图片地址的报错:
Traceback (most recent call last):
File "/data/checkpoint/qwen/Qwen-VL-Chat/eval_mm/evaluate_caption.py", line 143, in
pred = model.generate(
File "/root/.cache/huggingface/modules/transformers_modules/Qwen-VL-Chat/modeling_qwen.py", line 1058, in generate
return super().generate(
File "/root/conda/envs/llm/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/root/conda/envs/llm/lib/python3.9/site-packages/transformers/generation/utils.py", line 1722, in generate
return self.beam_sample(
File "/root/conda/envs/llm/lib/python3.9/site-packages/transformers/generation/utils.py", line 3350, in beam_sample
outputs = self(
File "/root/conda/envs/llm/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/root/.cache/huggingface/modules/transformers_modules/Qwen-VL-Chat/modeling_qwen.py", line 848, in forward
transformer_outputs = self.transformer(
File "/root/conda/envs/llm/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/root/.cache/huggingface/modules/transformers_modules/Qwen-VL-Chat/modeling_qwen.py", line 565, in forward
images = self.visual.encode(images)
File "/root/.cache/huggingface/modules/transformers_modules/Qwen-VL-Chat/visual.py", line 422, in encode
image = Image.open(image_path)
File "/root/conda/envs/llm/lib/python3.9/site-packages/PIL/Image.py", line 3247, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'data/nocaps/val/0013ea2087020901.jpg'
请问您有遇到过吗?
from qwen-vl.
这个错误FileNotFoundError: [Errno 2] No such file or directory: 'data/nocaps/val/0013ea2087020901.jpg',文件地址你得对应上,修改为自己下载保存的路径
from qwen-vl.
@yihp 地址是已经修改好的,在evaluate_caption.py的ds_collections部分,按照mkdir -p data/nocaps && cd data/nocaps的,地址已经设置为:/data/checkpoint/qwen/Qwen-VL-Chat/data/nocaps/nocaps_val.json。。但是报错的是data/nocaps/val/0013ea2087020901.jpg。下载好的nocaps文件夹下是没有val这个子文件。只有一个nocaps_val.json。
from qwen-vl.
Related Issues (20)
- [BUG] <title>api 请求报错
- [BUG] <调用qwen_vl_max>接口,传入图片后报下载图片错误
- 训练数据中对一张图片如果存在100轮QA,应如何制作训练数据集
- [BUG] <title> Qwen-VL-Chat-Int4 load进入infer时提示有很多weights没有使用 HOT 1
- 拉了一个多模态大模型技术交流群,大家可以加入进来进行技术交流 HOT 1
- [BUG] <title>ReadMe好像有笔误
- [BUG] 重置位置操作有误
- Qwen2的VL版本是否能提供一个0.5B的模型💡
- 求助:微调多目标标注方法 HOT 9
- [Question] Does the model support Document analysis?
- [BUG] <title>本地下载了模型,也检查了模型文件完整性,但是导入的时候还是会从网上下载 HOT 1
- [BUG] <title><.cache/huggingface/modules/transformers_modules/Qwen-VL-Chat/modeling_qwen.py,每次运行会被刷新,请问怎么不刷新呢? HOT 1
- safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooSmall
- 💡 [REQUEST] - <title>
- [BUG] <title>Using RTX 4000 series doesn't support faster communication broadband via P2P or IB. HOT 1
- SFT or Instruction Tuning
- [BUG] merge lora checkpoint;合并lora权重之后报错:'QWenTokenizer' object has no attribute 'IMAGE_ST'
- [BUG] <title>IsADirectoryError: [Errno 21] Is a directory: '/data/data/sxj/qwenvlchat_model'
- [BUG] <title> 在微调过程中,是否可以在value中规定json?
- 基于下游视觉任务微调,是否可以在value固定json输出,这样我就可以去获取指定的信息。 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qwen-vl.