/Document_layout_analysis

Implementation code for document layout analysis (Hackathon 2020 in Suzhou)

Primary LanguageJupyter Notebook

Document_layout_analysis

Implementation code for document layout analysis

This work is implemented by "Machine fancy behavour Lab" Team

Presentation(Chinese):

link: https://pan.baidu.com/s/1qk9LP3zi6xX4V2sB-3PBiQ code: dumw

PPT(Chinese):

link: https://pan.baidu.com/s/1kgwZ5_-apCpG-W_EnuPW-g code: q1kv

contect us:

Contents

  1. Environment Setup
  2. Demo
  3. Training Models

Environment setup

  • Clone the repository
git clone https://github.com/JaMesLiMers/Hakathon_layout_analysis.git && cd Hakathon_layout_analysis
  • Setup python environment
conda create -n torch python=3.6
source activate torch
pip install -r requirements.txt

Demo

  • Some of ouf model structure and performance
  • Setup your environment
  • Download the trained model and put into Hakathon_layout_analysis/save/
  • trained model avaliable in:
https://drive.google.com/open?id=1YSNEL5xzaLlfLiU7t1sEnSGPa3SI9-3O
  • Put input image into Hakathon_layout_analysis/test/Image('.jpg' file)
  • Run test.py/ test_second.py
python ./test.py --resume model_epoch_409.pkl
python ./test_second.py --resume model_second_epoch_409.pkl
  • Output will be generated in Hakathon_layout_analysis/test/Output

Training Models

  • Setup your environment
  • Download test data(Not avaliable now) put into Hakathon_layout_analysis/Data/
  • Download pretrained models(alexnet_bn_.pth), avaliable in:
https://drive.google.com/open?id=1YSNEL5xzaLlfLiU7t1sEnSGPa3SI9-3O
  • Run train code:
python ./train.py
python ./train_second.py
  • Output will be generated in Hakathon_layout_analysis/save/