-
Notifications
You must be signed in to change notification settings - Fork 748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Document Understanding] Can we support a new task on document understanding? #218
Comments
Those do sound like quite interesting use-cases! Do you mind sharing example code for how you would use the models, as well as the inputs and expected outputs? |
Here's an example code using detectron2 and DiT on document layout analysis. DiT Doc: https://huggingface.co/docs/transformers/v4.31.0/en/model_doc/dit |
The repo you shared is private, but I assume I can use this one: https://huggingface.co/spaces/nielsr/dit-document-layout-analysis |
Oh yes sorry! I forgot it's my private repo. But you're correct, I am using that one as well. How do you think we can include this to transformer.js? Seems like there is a dependency issue of detectron2... |
Hmm, that might complicate things somewhat... Perhaps there is a JS library out there which is a suitable substitute? |
I don't see a JS library out there could do similar stuffs. But I found something that's worth checking out: ^^^ This is a working example of detectron2 using ONNXRuntime... |
Just an update on this:
The other tasks (Key Information Extraction and Document Layout Analysis) might be slightly more difficult to add (due the their additional dependencies)... but we'll get there eventually :) |
Dear @xenova :) I'm trying to implement https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.DocumentQuestionAnsweringPipeline while importing transformers.js from cdn as described in https://huggingface.co/docs/transformers.js/main/en/tutorials/vanilla-js#step-2-javascript-setup. I get error below
Wondering how to circumvent this issue.. Thanks and best regards |
Thanks @martinsomm for the report - this will be fixed by #987. |
Hi @xenova and wow, thanks for the swift turnaround, very much appreciate your effort :) now I'm wondering when the change will be available on jsdelivr as I still get the same exception, even after "empty cache and hard refresh" in browser. Best regards, Martin |
@martinsomm We've now published https://www.npmjs.com/package/@huggingface/transformers/v/3.0.1, so you can import it from jsdelivr using: import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/[email protected]'; |
@xenova thanks again :) now I get updated version from jsdelivr.. this is probably the wrong channel to address another question.. I was wondering what it would take to make batch processing possible, so we can ask multiple questions per image. I can see a comment that currently only batch size of 1 is supported for the |
Document Understanding
Some example models:
Reason for request
Document understanding is a very popular task which I couldn't find any supports for the web environment.
Some tasks include:
The text was updated successfully, but these errors were encountered: