-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
['ViDoSeek','SlideVQA'] 这两个数据集应该怎么准备? #9
Comments
步骤: 2、解压下载的videoseek_pdf_document.zip和slidevqa_pdf_document.zip 3、将ViDoSeek文件夹和SlideVQA文件夹的pdf文件夹中的pdf文件转换为图片,并以img文件夹的形式分别保存在各自文件夹中,也就是pdf文件夹和img文件夹同等级关系。使用python ./scripts/pdf2images.py命令可以实现。但是需要注意: 另外,/scripts/pdf2images.py需要创建img文件夹,否则报错找不到文件夹;另外,为了加快转换pdf为图片的速度, convert_from_path(filepath)函数中可以添加参数 thread_count=16或者8,根据cpu的个数而定,pdf2image转换时使用cpu,非GPU,可以比默认值1时快2-3倍。 datasets = ['ViDoSeek','SlideVQA'] for dataset in datasets:
4、Dependencies按照最新版本的要求即可,需要注意的是,需要能够访问huggingface,代码才能自动下载需要的base_model和adapter_model. Dependencies Create environmentconda create -n vidorag python=3.10 Clone projectgit clone https://github.com/alibaba-nlp/ViDoRAG.git Install requirementspip install -r requirements.txt 5、python ./llms/vl_embedding.py中需要修改if name == "main"中的image_embeddings的地址,否则找不到项目中的文件,代码如下。并且可以添加几行代码,打印看看结果。代码如下: if name == "main":
6、python ./ingestion.py 就可以执行相应的操作,这个部分使用GPU,如果对上文中的ViDoSeek文件夹和SlideVQA文件夹进行操作,则耗时较长,代码中使用datasets = ['ExampleDataset', 'SlideVQA']进行测试,主要处理SlideVQA文件夹,V100-32G需要跑4个多小时,占用显存17G左右。 以上为个人操作经验分享,部分使用了deepseek r1帮忙解决问题,可大幅降低操作难度。 |
test |
mark |
./scripts/pdf2images.py中的datasets = ['ViDoSeek','SlideVQA'] 这两个数据集应该怎么准备?
huggingface上可以找到https://huggingface.co/datasets/autumncc/ViDoSeek/tree/main 这个ViDoSeek数据集,
具体怎么使用,还请详细给说明一下。
The text was updated successfully, but these errors were encountered: