Code Monkey home page Code Monkey logo

aet's Introduction

Introduction

We introduce an extra visual transformer as the alignment-ware image encoder and an extra text transformer as the alignment ware text encoder before multimodal fusion. We consider alignment in the following three aspects: 1) document-level alignment by leveraging the cross-modal and intra-modal contrastive loss; 2) global-local alignment for modeling localized and structural information in document images; and 3) local-level alignment for more accurate patch-level information. For more details, please refer to our paper: Alignment-Enriched Tuning for Patch-Level Pre-trained Document Image Models[pdf]

Finetuned Model

Model F1 Link
FUNSD 91.55 download
CORD 97.04 download
Model Acc Link
RVL-CDIP 96.30 download

Train

git clone https://github.com/MAEHCM/AET.git && cd AET

Finetune LayoutLMv3 model

First set up the required dataset under the appropriate path ,Select the corresponding model in { },funsd,cord or cdip

cd preprocess
python preprocess_{}.py

Then execute the corresponding finetune file to fine tune the model ,Select the corresponding model in { },funsd,cord or cdip

python -m torch.distributed.launch --nproc_per_node=2 --use_env python finetune_{}.py --config Pretrain.yaml --output_dir

Acknowledgements

We referenced the code of ALBEF and TCL when implementing AET in github, In this repository, we used three public benchmark datasets, FUNSD , CORD , RVL-CDIP.

How to Cite

If you find this repo is useful, please consider to cite our paper:

TBD

aet's People

Contributors

demoleiwang avatar maehcm avatar

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.