Layout-Parser / layout-parser

A Unified Toolkit for Deep Learning Based Document Image Analysis
https://layout-parser.github.io/
Apache License 2.0
4.78k stars 459 forks source link

Improve models structure #53

Closed lolipopshock closed 3 years ago

lolipopshock commented 3 years ago

In this update, we aim to improve the structure of the modeling folder to provide better support for building models of different backends.

In the new model folder, we provide the following files as the template to implement models for specific backend:

models
├─ base_catalogue.py
└─ base_layoutmodel.py # contains the template class `BaseLayoutModel` for building new model classes. 

And for the specific model folder, it contains the following files

specific_model_folder/
├─ __init__.py
├─ catalogue.py # specifies the pre-trained model information, need to register `PathManager` from `base_catalogue.py`
└─ layoutmodel.py # contains the model class for the specific backend.