sachinraja13 / TabStructNet

Other
129 stars 32 forks source link

TabStructNet

Table Structure Recognition using Top-Down and Bottom-Up Cues

This code is developed using the code from

  1. https://github.com/matterport/Mask_RCNN
  2. https://github.com/shahrukhqasim/TIES-2.0
Download necessary files. For download locations and links please refer to note.txt files in the following folders:
1. https://github.com/sachinraja13/TabStructNet/tree/master/coco_model/coco
2. https://github.com/sachinraja13/TabStructNet/tree/master/trained_model/tab/annotations
3. https://github.com/sachinraja13/TabStructNet/tree/master/trained_model/tab/logs/tab20200821T0923
To train the model using MS coco weights, execute:
python samples/tabnet/tabnet.py train --dataset=trained_model/tab --model=coco
To train the model using most recently saved weights, execute:
python samples/tabnet/tabnet.py train --dataset=trained_model/tab --model=last
To evaluate the model using most recently saved weights, execute:
python samples/tabnet/tabnet.py evaluate --dataset=trained_model/tab --model=last

Saved weights provided in the Google Drive link are trained using SciTSR dataset. UNLV train and test split is added in the repository for easy fine-tuning on UNLV and testing.

To generate output XML:
1. Execute the TabStructNet model for evaluation as specified in the repository's README.
2. Copy the 4 result folders generated in the trained_model/tab directory to the results folder inside the rename_output_files folder.
3. Execute rename_maskrcnn_result_files.py
4. Copy the 4 result folders generated inside rename_output_files/rename_results to xml_generating_postprocessor directory.
5. Copy the validation JPEG images inside xml_generating_postprocessor/gt_without_box folder.
6. Execute cell_postprocessor_adj.py 
XMLs are generated in processed_xmls folder.
Please refer to https://github.com/matterport/Mask_RCNN initially for any issues in running the script.

Please use this to cite our work:

@misc{raja_2020,
  title={Table Structure Recognition using Top-Down and Bottom-Up Cues},
  author={Sachin Raja, Ajoy Mondal, C V Jawahar},
  year={2020},
  publisher={Springer Science+Business Media},
  journal={Accepted to ECCV-6007}
}

References: