LayoutLMv3 transformers.onnx

Hi,

Thanks for your interest in that model :slight_smile: the reason was that the repo on the hub didn’t contain a preprocessor_config.json file. I’ve uploaded it to the repo.

Also note that, in order to convert the model that includes the token classification head, you need to provide --feature token-classification to the script. Without this, it would just convert the base LayoutLMv3Model, not LayoutLMv3ForTokenClassification:

!pip install -q transformers[onnx]
!python -m transformers.onnx --model=nielsr/layoutlmv3-finetuned-cord onnx/ --feature token-classification
1 Like