Giter VIP home page Giter VIP logo

vibertgrid-pytorch's People

Contributors

dependabot[bot] avatar zeninglin 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

Watchers

 avatar  avatar  avatar  avatar  avatar

vibertgrid-pytorch's Issues

Model Training.

Sir, I was trying to run your code and found that weights are not being saved, I found that you have used a very high values of F1_score = 0.95. Can you please explain the reason of keeping such high value. Because during our testing we were getting the maximum F1 value of 0.4328 during validation. We used the SROIE dataset.
Also the maximum epochs were 33 then why have you used the condition of (epoch % 400 == 0) in file train_SROIE.py, line 364.
Thanks

FUNSD dataset - empty key_dict

Hi,

first of all thanks for your great effort here!

I currently struggle to start a training on the FUNSD dataset. During the evaluation, I get the following error message:
Traceback (most recent call last):
File "/home/rrutmann/pycharm_projects/ViGPTgrid/train_FUNSD.py", line 422, in
train(args)
File "/home/rrutmann/pycharm_projects/ViGPTgrid/train_FUNSD.py", line 306, in train
F1 = validate(
File "/home/rrutmann/miniconda3/envs/vigptgrid/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
Traceback (most recent call last):
File "/home/rrutmann/pycharm_projects/ViGPTgrid/train_FUNSD.py", line 422, in
return func(*args, **kwargs)
File "/home/rrutmann/pycharm_projects/ViGPTgrid/pipeline/train_val_utils.py", line 506, in validate
curr_gt_str = key_dict[0][curr_class_name]train(args)

File "/home/rrutmann/pycharm_projects/ViGPTgrid/train_FUNSD.py", line 306, in train
TypeError: 'NoneType' object is not subscriptable
F1 = validate(
File "/home/rrutmann/miniconda3/envs/vigptgrid/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/home/rrutmann/pycharm_projects/ViGPTgrid/pipeline/train_val_utils.py", line 506, in validate
curr_gt_str = key_dict[0][curr_class_name]
TypeError: 'NoneType' object is not subscriptable

Indeed, key_dict is None. In the EPHOIE_DATASET and FUNSD_DATASET classes the variable full_key_dict is defined, which I assume is then later used for key_dict. But this part is missing in the FUNSD_DATASET class.

Could you please tell me how to handle this error?

About SROIE annotations

Hi,

You mentioned that you have annotated SROIE dataset to be able to use it effectively with ViBERTgrid. While annotating, what did you do with multiple occurring tokens? For example date label, there are receipts in which there are multiple occurrences of the same date. Have you annotated all of them as date or only one? Thanks.

SROIE dataset issues.

I am trying to reproduce the original paper results on the SROIE dataset and have some doubts regarding the same.

  • Please share the your method on re-labeling the dataset with coordinates or your relabeled dataset.
  • Also please tell the input format of train and test labels ( file type, order).
  • In pipeline\sroie_data_preprocessing.py what are dir_test_root and dir_processed ? If I have to run code on my devise which one should I replace with the path of data in my device ?
    Please help in these issues.

Training on custom dataset

Hi, thanks for your work and contribution. I have studied on Chargrid and especially BERTgrid. Now, I am trying to understand the ViBERTgrid paper. Could you explain how can I use your implementation on my own custom dataset? Are train scripts generalizeable to custom datasets?
Thanks.

Validation in CRF mode

Hi, thanks for your effort.

I noticed a problem in the pipeline.train_val_utils.validate when we are running on crf classifier mode such that the inference function the crf.py returns the predicted target sequence (which is actually predicted class ids), not the probabilities for each class. Then, pipeline.train_val_utils.validate function, we are getting the predicted class ids by running torch.argmax. However, as I said, we do not have the probailities here, instead we directly have the predicted class ids.

I think we can solve this by adding a is_crf argument in the pipeline.train_val_utils.validate function and an if block decides to apply the argmax or not.

Also, irrelevant but there is a type here

Thanks, sincerely.

No predictions in inference.

I have trained the CORD dataset as per the "example.yaml" file. F1 scores seem to be excellent (with the CRF network).
But when I was trying to create the predictions, It was not predicting anything.
Can you provide an example of OCR API? Currently, I am using a custom Paddleocr flask server to get the OCR results and I convert the outputs to the required format that you have mentioned in the script.

If possible please share the OCR script. or the exact format that the module needs.

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.