Git Product home page Git Product logo

Comments (9)

NielsRogge avatar NielsRogge commented on July 21, 2024

Hi,

Please use the official "microsoft/table-transformer-detection" checkpoint instead of the legacy "nielsr/detr-table-detection".

The command to run to export DETR to ONNX is very easy now thanks to 🤗 Optimum, see this guide: https://huggingface.co/docs/optimum/exporters/onnx/usage_guides/export_a_model.

from detr.

jprorikon avatar jprorikon commented on July 21, 2024

Hi,

Please use the official "microsoft/table-transformer-detection" checkpoint instead of the legacy "nielsr/detr-table-detection".

The command to run to export DETR to ONNX is very easy now thanks to hugs Optimum, see this guide: https://huggingface.co/docs/optimum/exporters/onnx/usage_guides/export_a_model.

Hi
I follow the guide page you mentioned. But optimum returns me an error like
KeyError: "table-transformer is not supported yet. Only {'mbart', 'marian', 'groupvit', 'xlm', 'unispeech-sat', 'electra', 't5', 'resnet', 'nystromformer', 'donut-swin', 'segformer', 'gpt-neox', 'mt5', 'deberta-v2', 'hubert', 'splinter', 'layoutlm', 'wav2vec2', 'data2vec-audio', 'bart', 'sew-d', 'mpnet', 'perceiver', 'flaubert', 'bert', 'gptj', 'roberta', 'clip', 'levit', 'sew', 'bloom', 'squeezebert', 'gpt2', 'mobilevit', 'albert', 'mobilebert', 'convnext', 'poolformer', 'detr', 'distilbert', 'camembert', 'codegen', 'deberta', 'convbert', 'mobilenet-v2', 'opt', 'data2vec-text', 'roformer', 'whisper', 'beit', 'xlm-roberta', 'blenderbot-small', 'blenderbot', 'swin', 'regnet', 'yolos', 'llama', 'vit', 'data2vec-vision', 'audio-spectrogram-transformer', 'm2m-100', 'wav2vec2-conformer', 'deit', 'imagegpt', 'speech-to-text', 'longt5', 'mobilenet-v1', 'gpt-neo', 'layoutlmv3', 'unispeech', 'ibert', 'pegasus', 'wavlm', 'vision-encoder-decoder'} are supported. If you want to support table-transformer please propose a PR or open up an issue."

version info

  • optimum version: 1.8.8
  • transformers version: 4.30.2
  • Platform: Linux-5.19.0-41-generic-x86_64-with-glibc2.34
  • Python version: 3.8.0
  • Huggingface_hub version: 0.15.1
  • PyTorch version (GPU?): 2.0.1+cu117 (cuda availabe: True)
  • Tensorflow version (GPU?): not installed (cuda availabe: NA)

How can I deal with it?
Thanks

from detr.

jprorikon avatar jprorikon commented on July 21, 2024

ok
I've solved it by editing the config.json file.
Setting model_type from "table-transformer" to "detr" makes Optimum works well for me.

from detr.

nissansz avatar nissansz commented on July 21, 2024

Can you help provide the exported model for table detect and structure recognition?
How to use above onnx models?

from detr.

nissansz avatar nissansz commented on July 21, 2024

nielsr/detr-table-detection

Cannot run optimum in win10 command line?
Any converted onnx models for tale detection and recognition for download? How to use these onnx models?

from detr.

jprorikon avatar jprorikon commented on July 21, 2024

Finally, In my application, I use OpenCV to extract table grids.
another candidate I considered is Paddleocr.
Paddle2ONNX can easily translate the models to onnx models.

I am sorry that I developed my applications on Ubuntu, So I have no idea about models working on win10 now.

from detr.

nissansz avatar nissansz commented on July 21, 2024

Thank you. I find paddleocr result is hard to train. It even fails for very clear tables.

from detr.

NielsRogge avatar NielsRogge commented on July 21, 2024

Hi,

It seems that DETR is already supported by Optimum, but Table Transformer isn't yet. So one would need to open an issue on the Optimum repo for that.

from detr.

nissansz avatar nissansz commented on July 21, 2024

I don't know how to convert to onnx, cli is invalid after pip install Optimum.
Can you help provide an onnx model and a sample code for detection and recogniztion with onnx models?

from detr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.