Instructions to use Sennodipoi/LayoutLMv3-kleisterNDA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sennodipoi/LayoutLMv3-kleisterNDA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="Sennodipoi/LayoutLMv3-kleisterNDA")# Load model directly from transformers import AutoProcessor, AutoModelForTokenClassification processor = AutoProcessor.from_pretrained("Sennodipoi/LayoutLMv3-kleisterNDA") model = AutoModelForTokenClassification.from_pretrained("Sennodipoi/LayoutLMv3-kleisterNDA", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Kleister NDA - Training code / Example Data
Wondering if you could share the training code for this?
I have found the KleisterNDA dataset but I am unaware of the pre-processing required to transform the dataset into NER labels.
Hi Jordan, you can find the code for my experiments here: https://github.com/AleRosae/thesis-layoutlm
It includes both the pre-processing of Kleister-NDA and the training code for LayoutLMv1/v2/v3. Please notice that my code for pre-processing Kleister-NDA is based on the assumption that the .pdf files were processed using an internal software that extracts text + bounding boxes for the whole document, and not for a single page like most software do (e.g. Tesseract).
Cheers,
AR
@Sennodipoi thank for this.
I will try convert it using Tesseract and then upload the annotations and image to HF as a dataset.