SBS Figures
收藏资源简介:
SBS Figures数据集包含100万张图和420万个问答对,可以通过Hugging Face下载。该数据集用于预训练图问答模型,支持从阶段合成的图像中生成多样化的主题和外观。
The SBS Figures Dataset contains 1 million images and 4.2 million question-answer pairs, which can be downloaded via Hugging Face. This dataset is designed for pre-training visual question answering (VQA) models, and supports generating diverse themes and appearances from stage-synthesized images.
SBS Figures 数据集概述
数据集简介
- 数据集名称: SBS Figures
- 数据集规模: 包含100万张图表和420万对问答对
- 下载地址: Hugging Face Dataset
数据集生成流程
数据集生成流程包括以下步骤:
- 生成图表主题: 使用
data_topic.py脚本生成图表主题。 - 生成JSON文件: 使用
json_make.py脚本生成表示数据点的JSON文件。 - 添加颜色信息: 使用
add_color.py脚本为JSON文件添加颜色信息。 - 生成图表PNG文件: 使用
create_chart.py脚本生成图表PNG文件。 - 生成问答对: 使用
qa.py脚本生成问答对。
模型
- 预训练模型:
- 微调模型:
- Donut (ChartQA): omron-sinicx/sbsfigures-chartqa-donut
- Pix2Struct (ChartQA): omron-sinicx/sbsfigures-chartqa-pix2struct
代码与工具
-
Docker 设置: bash docker build -t sbsfigures:latest -f SBSFigures/Dockerfile SBSFigures docker run -it --rm -v SBSFigures:/app SBSFigures:latest /bin/bash
-
预训练代码:
- Donut:
cd donut && bash pre-train_sbsfigures.sh - Pix2Struct:
cd pix2struct && bash pre-train_sbsfigures.sh
- Donut:
-
微调代码:
- Donut:
cd donut && bash finetune_chartqa.sh - Pix2Struct:
cd pix2struct && bash finetune_chartqa.sh
- Donut:
-
测试代码:
- Donut:
cd donut && bash test_chartqa.sh - Pix2Struct:
cd pix2struct && bash test_chartqa.sh
- Donut:
自定义与扩展
- 自定义字体: 编辑
data_gen/gpt/font.txt文件以添加或删除字体。 - 生成特定领域的图表: 修改
data_gen/gpt/data_topic.py中的提示以生成特定领域的图表。 - 添加新的图表类型: 在
data_gen/code_format中定义code_format,并在data_gen/example/data_point/中添加示例。
引用
如果您在研究中使用了本数据集,请引用以下论文: bibtex @article{shinoda2024sbsfigurespretrainingfigure, title={SBS Figures: Pre-training Figure QA from Stage-by-Stage Synthesized Images}, author={Risa Shinoda and Kuniaki Saito and Shohei Tanaka and Tosho Hirasawa and Yoshitaka Ushiku}, year={2024}, journal={arXiv preprint arXiv:2412.17606}, url={https://arxiv.org/abs/2412.17606} }




