The image transform allows users to extract text from image files. Autolabel uses optical character recognition (OCR) to read the images. To use this transform, follow these steps:
Use the following command to download all dependencies for the image transform.
The tesseract engine is also required for OCR text extraction. See the tesseract docs for installation instructions.
Parameters for this transform¶
- file_path_column: the name of the column containing the file paths of the pdf files to extract text from
- lang: a string indicating the language of the text in the pdf file. See the tesseract docs for a full list of supported languages
Using the transform¶
Below is an example of an image transform to extract text from an image file:
Run the transform¶
This runs the transformation. We will see the content in the correct column. Access this using
ds.df in the AutolabelDataset.