Skip to main content

No project description provided

Project description

Scale2Pdf

A library made at LAION to scale the parsing of PDFs on CPUs. We tested our pipeline on 44-page pdf and on cheap 2 thread CPU with 12GB ram, it took us 3 mins 22 seconds to parse the pdf, save its content both structure, bulk and its images. We provide following results through our framework

  1. Table extraction
  2. Equation extraction
  3. Image Captions
  4. Page extraction
  5. Keyword extraction
  6. Section extraction
  7. Authors extraction
  8. Bibliography extraction
  9. Paragraph extraction
  10. Image extraction
  11. Abstract extraction

At the moment, we support one pdf in a moment. Because we are still experimenting with the framework. Next, we plan to expand it with Ray and other distributed system with NUM-of-WORKERS. We plan this to be scalable and one function call library. Because we are planning to use it for 100M pdfs.

Installation

pip install scale2pdf

then install

sudo apt install poppler-utils

from scale2pdf import scalablepdf 
from scale2pdf import extractimages

pdf_path = "/content/2408.06257v3.pdf"
scalablepdf(pdf_path, extract_images=True) # folder is automatically created and results are saved
extractimages("2408.06257v3.pdf", "/path/to/output/folder")

CRAP CPU (NO GPU): 3 min 22 seconds to finish parsing and saving it to JSON.

A Sleeping AI framework made for friends at LAION AI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scale2pdf-0.0.4.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scale2pdf-0.0.4-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file scale2pdf-0.0.4.tar.gz.

File metadata

  • Download URL: scale2pdf-0.0.4.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.8

File hashes

Hashes for scale2pdf-0.0.4.tar.gz
Algorithm Hash digest
SHA256 07f6dba5930e7dec97ec0270b3577229f9b6bc5d6e1275fa9e467749aca8bc01
MD5 ead2e9630259299f1b7057534c5be40b
BLAKE2b-256 38240eb0faad61707d50978b683285670b7f590fe08c350f62a87b5e55910f31

See more details on using hashes here.

File details

Details for the file scale2pdf-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: scale2pdf-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.8

File hashes

Hashes for scale2pdf-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 865ce616dc2264c6a03976e819e942cb6257c6f9ac5f1f7131be5268c316f1a6
MD5 040a4d2bc036defebdda7f6474f87ccd
BLAKE2b-256 6daf9dd8076eaa406c73a2ef7c6036bb63bc997430807fc4f308fbb2bf1838d1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page