GithubHelp home page GithubHelp logo

mp-docvqa-framework's People

Contributors

rubenpt91 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mp-docvqa-framework's Issues

Each page has all the page tokens

I'm not sure this is an issue or a misunderstanding on my part, but during the data preparation phase, each page contains all the page_tokens

page_tokens = ''.join([f"[PAGE_{i}]" for i in range(self.page_tokens)]) # Multiple representation
input_text = [f"{page_tokens}: question: {question[batch_idx]} context: {c}" for c in context[batch_idx]]

Why not just:
page_tokens = [f"[PAGE_{i}]" for i in range(self.page_tokens)] # Multiple representation
input_text = [f"{page_tokens[i]}: question: {question[batch_idx]} context: {c}" for i, c in enumerate(context[batch_idx])]

https://github.com/rubenpt91/MP-DocVQA-Framework/blob/master/models/HiVT5.py#L649

Bug(?) in the SPDocVQA class

Hi,
Maybe I misused the SDK or misunderstood something, but I think there are some bugs in the SPDocVQA class.

First,

context = ' '.join([word.lower() for word in record['ocr_tokens']])

Should the context be a list here?

context = [' '.join([word.lower() for word in record['ocr_tokens']])]

Second, consequentially change

start_idx = context.find(answer)

to

            start_idx = context[0].find(answer)

Regards,
Cat

Slow training - Partial solution ?

Hello,

If you want partially improve the slow training: data preparation (tokenization and image feature extraction) should be done at the beginning once outside of the training loop
Just like how they do it for layoutlmv2/3 https://huggingface.co/docs/transformers/main/en/model_doc/layoutlmv3#transformers.LayoutLMv3Processor

On a different task (not VQA) by implementing those changes (writing the dataset script as a huggingface dataset so I can use the .map function and then doing the data processing at the beginning ) I managed a 3x speedup in the training phase

Test dataset without labels of "answer_page_idx"

Test dataset without labels of "answer_page_idx". How can I use model to predict the answer page from the module of APPM? There are limitations in 20 pages limit. When I input test dataset to HiVT5, I need to prepare the test dataset as in fine-tuning stage with 20 pages limit which includes the information of answer page, But labels in test dataset is unseen. I can not upload my results to the website and get the performance of ANLS or APPA.

Mismatch of imdb names

Hi,
I am trying to do inferences on the spvqa challenge,
The model tries to load "new_imdb_test.npy" from here,

data = np.load(os.path.join(imbd_dir, "new_imdb_{:s}.npy".format(split)), allow_pickle=True)

but the downloaded imdbs [1] only provides "imdb_test.npy":
[1]https://datasets.cvc.uab.es/rrc/DocVQA/Task1/spdocvqa_imdb.zip
Are they the same files? If not, where can I find the new_imdb_test.npy file?

Thanks,
Cat.

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.