Skip to content

Conversation

@Narsil
Copy link
Contributor

@Narsil Narsil commented Dec 16, 2022

What does this PR do?

Fixes #20776 better.

  • Reverts the previous PR.

  • The previous model was using a mix of LayoutLM and LayoutLMv2 leading to a bit of madness. The previous fix was wrong
    because it made other pipelines try to load the feature extractor which might not have existed :(.

This fixes differently, by using another new models, and fixing it's config too.

Narsil/layoutlmv3-finetuned-funsd is a fork of nielsr/layoutlmv3-finetuned-funsd with the tokenizer_config.json fixed (to not use a Roberta tokenizer, but it's proper LayoutLMv3Tokenizer).
Also modified the README.md to include examples in the widget, and force the pipeline_tag to be object-detection.

https://huggingface.co/Narsil/layoutlmv3-finetuned-funsd
Screenshot from 2022-12-16 11-03-23

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Dec 16, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Contributor

@NielsRogge NielsRogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks great!

Since when is LayoutLM supported by the object detection pipeline? :D

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@Narsil Narsil merged commit 3ee9582 into huggingface:main Dec 16, 2022
@Narsil Narsil deleted the fix_object_detection2 branch December 16, 2022 12:25
@Narsil
Copy link
Contributor Author

Narsil commented Dec 16, 2022

Thanks, looks great!

Since when is LayoutLM supported by the object detection pipeline? :D

#20143

gsarti added a commit to gsarti/transformers that referenced this pull request Dec 16, 2022
… add_get_encoder_decoder_fsmt

* 'main' of ssh://github.com/huggingface/transformers: (1433 commits)
  Add Universal Segmentation class + mapping (huggingface#20766)
  Stop calling expand_1d on newer TF versions (huggingface#20786)
  Fix object detection2 (huggingface#20798)
  [Pipeline] skip feature extraction test if in `IMAGE_PROCESSOR_MAPPING` (huggingface#20790)
  Recompile `apex` in `DeepSpeed` CI image (huggingface#20788)
  Move convert_to_rgb to image_transforms module (huggingface#20784)
  Generate: use `GenerationConfig` as the basis for `.generate()` parametrization (huggingface#20388)
  Install video dependency for pipeline CI (huggingface#20777)
  Fixing object detection with `layoutlm` (huggingface#20776)
  [Pipeline] fix failing bloom `pipeline` test (huggingface#20778)
  Patch for FlanT5-XXL 8bit support (huggingface#20760)
  Install vision for TF pipeline tests (huggingface#20771)
  Even more validation. (huggingface#20762)
  Add Swin backbone (huggingface#20769)
  Install `torch-tensorrt 1.3.0` for DeepSpeed CI (huggingface#20764)
  Replaces xxx_required with requires_backends (huggingface#20715)
  [CI-Test] Fixes but also skips the mT5 tests (huggingface#20755)
  Fix attribute error problem  (huggingface#20765)
  [Tests] Improve test_attention_outputs (huggingface#20701)
  Fix missing `()` in some usage of `is_flaky` (huggingface#20749)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants