modelscope / modelscope/ms-swift

多图grounding,按自定义数据集文档构建json格式数据微调后模型预测结果不对,格式也不对

Open
#6,407 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
15.7k
Forks
1.7k
Avg merge
1d 16h
Merged PRs (30d)
136

Description

{
"messages":
[
{"role": "user", "content": "<image><image><image><image>请根据提供的甲状腺超声图像,描述病灶位置:"},
{"role": "assistant", "content": "第2张图像发现<ref-object><bbox>;第4张图像发现<ref-object><bbox>。"},
{"role": "user", "content": "基于这些图像和上述回声病灶区域,详细描述检查所见:"},
{"role": "assistant", "content": "甲状腺穿刺会诊:\r\n\r\n甲状腺右叶中下部见低回声,0.7×0.8×0.8cm,形态不规则,边界不清,内可见点状强回声,CDFI:周边内部点条状血流信号。\r\n\r\n双侧颈部未见明确异常肿大淋巴结。\r\n"},
{"role": "user", "content": "基于这些图像和上述超声所见,得出检查诊断是什么?"},
{"role": "assistant", "content": "甲状腺实性结节伴钙化,C-TIRADS 4B,可行穿刺\r\n"},
{"role": "user", "content": "综合这些图像、检查所见和检查诊断,该病例的穿刺会诊结果为阳性还是阴性?请仅回答“阳性”或“阴性”。"},
{"role": "assistant", "content": "阳性"}],
"images": [
"./CS20250127465/1.2.840.113663.1500.1.341662655.3.127.20250127.113048.31.jpg",
"./CS20250127465/1.2.840.113663.1500.1.341662655.3.124.20250127.113004.656.jpg",
"./CS20250127465/1.2.840.113663.1500.1.341662655.3.126.20250127.113019.281.jpg",
"./CS20250127465/1.2.840.113663.1500.1.341662655.3.125.20250127.113012.640.jpg"
],
"objects":
{
"ref": ["甲状腺右叶中下部见低回声,内可见点状强回声", "甲状腺右叶中下部见低回声,内可见点状强回声"],
"bbox": [[512.0, 323.63963963963965, 624.6126126126126, 451.56756756756755], [596.2105263157895, 314.70175438596493, 691.8245614035087, 434.8771929824561]],
"bbox_type": "real",
"image_id": [1, 3]
}
}

基于此格式微调qwen2.5-VL-7B。模型对bbox预测结果不准确,且格式也不对。

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing fine-tuning and prediction with the supplied JSON format on Qwen2.5-VL-7B, then inspect how the custom dataset and bbox objects are processed. Done means the predicted bounding boxes are accurate and the model output matches the expected format described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.