HumanSignal / HumanSignal/label-studio

PDF support through an OCR such as Tesseract

Open
#502 1 comment 5 reactions 1 assignee Claimed by @makseq View on GitHub
feature ML
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

**Is your feature request related to a problem? Please describe.**
I often need to treat pdf files, when the service is deployed within a docker environment. (for named entity recognition)
A Tesseract service is also available (OCR) within my environment. A pipeline between the two would be really convenient. (But in a more general case, it should be possible to any type of OCR)
Such as :
- When we upload a pdf file, it is directly converted through a request call to the OCR_SERVER if the server exists within the environment variables. (or more globally OCR_SERVER)

- Afterwards, the task is generated just like if it was a .txt file.

**Describe the solution you'd like**
Perform a requests.post within the "uploader.py" file in order to treat pdf files.
It will take the .pdf file as an input, convert it into .txt through a requests.post, and save it as a .txt file.

**Describe alternatives you've considered**
- Monkey patching from an external application (but the feature might be useful for other people so it does not seem to be the best choice)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.