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

Automate screenshots extraction from PDF exams #10

Open
lgabs opened this issue Nov 12, 2024 · 2 comments
Open

Automate screenshots extraction from PDF exams #10

lgabs opened this issue Nov 12, 2024 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@lgabs
Copy link
Owner

lgabs commented Nov 12, 2024

Objective

To automate the process of solving exam questions using gpt-resolve, it would be much more efficient to extract each question as a separate image from a PDF exam. Exams with many questions make the process of extracting questions manually very slow and subject to mistakes.

Some Approaches

OpenCV

  1. Convert PDF to Images: Use tools like pdf2image to transform each page of the PDF into an image.
  2. Segment Questions with OpenCV: Apply OpenCV to detect and isolate individual questions through contour or edge detection techniques.
  3. Save and Name Output: Store each extracted question as a separate image file, naming them sequentially (e.g., q1.png, q2.png).

This method may encounter challenges with questions spanning multiple pages but should effectively process the majority of exams, especially those with numerous pages.

Docling

Consider using Docling, a tool designed to parse documents and export them into various formats, which may assist in extracting questions from PDFs. This can be quite good, since it seems to use advanced models for many kind of document extractions.

@lgabs lgabs added enhancement New feature or request help wanted Extra attention is needed labels Nov 12, 2024
@lgabs lgabs changed the title Extract Screenshots from PDF Exam Using OpenCV Extract Screenshots from PDF Exams Nov 14, 2024
@Thomas-Ver
Copy link

Hi, i can recommand you this project : https://github.com/opendatalab/MinerU. It's really the top of the top to get informations from a pdf.

@lgabs
Copy link
Owner Author

lgabs commented Nov 15, 2024

Thanks for the recommendation, @Thomas-Ver ! I'll definitely going to check out that project too.

@lgabs lgabs changed the title Extract Screenshots from PDF Exams Automate screenshots extraction from PDF exams Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants