Skip to content
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

Image loading in dataloader code #108

Open
jshtok opened this issue Sep 6, 2023 · 5 comments
Open

Image loading in dataloader code #108

jshtok opened this issue Sep 6, 2023 · 5 comments

Comments

@jshtok
Copy link

jshtok commented Sep 6, 2023

Hello, and thank you very much for the contribution of the code.
While running your I have noticed that only the first page of a PDF file is loaded (as image). Indeed, in your class PregeneratedDatasetBase, the add_images() routine features the line
im = convert_from_path(im_path)[0]
While in the original DUE code the _get_page_img() routine uses the page_no field to fetch the relevant page.

Can you please explain this situation?
Thank you!

@Coobiw
Copy link

Coobiw commented Sep 6, 2023

Hello, I also busy with it! I'm curious about how can we get the images and corresponding Q-A pairs. Do you have any experience?

@jshtok
Copy link
Author

jshtok commented Sep 6, 2023 via email

@Coobiw
Copy link

Coobiw commented Sep 7, 2023

Thanks for your reply! So I thought that you first generate the memmaps. After that, you use the memmaps to build the dataloader, and save the results(image-QA pairs) into a format file just like json?

@jshtok
Copy link
Author

jshtok commented Sep 9, 2023 via email

@Coobiw
Copy link

Coobiw commented Sep 9, 2023

Thank you very much!!! I want convert the memmaps into png files because I want to use the images as inputs. I want to ask that what process repo did you use? The benchmarker in UDOP repo or the original one in DUEBenchmark/baselines?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants