Downloads · 30 days
0
deepdoctection/tp_casc_rcnn_X_32xd4_50_FPN_GN_2FC_publaynet
tp_casc_rcnn_X_32xd4_50_FPN_GN_2FC_publaynet is a machine learning model from deepdoctection. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
The model and its training code has been mainly taken from: Tensorpack .
Downloads · 30 days
0
Access
Public
Updated Jan 24, 2022
Repo size
824 MB
Likes
1
Public
Click a slice to open those files.
.data-00000-of-00001824 MB · 100%
From the Hugging Face model README
The model and its training code has been mainly taken from: Tensorpack .
Please check: Xu Zhong et. all. - PubLayNet: largest dataset ever for document layout analysis.
This model is different from the model used the paper.
The code has been adapted so that it can be used in a deepdoctection pipeline.
This model can be used with the deepdoctection in a full pipeline, along with table recognition and OCR. Check the general instruction following this Get_started tutorial.
To recreate the model run on the deepdoctection framework, run:
>>> import os
>>> from deep_doctection.datasets import DatasetRegistry
>>> from deep_doctection.eval import MetricRegistry
>>> from deep_doctection.utils import get_configs_dir_path
>>> from deep_doctection.train import train_faster_rcnn
publaynet = DatasetRegistry.get_dataset("publaynet")
path_config_yaml=os.path.join(get_configs_dir_path(),"tp/layout/conf_frcnn_layout.yaml")
path_weights = ""
dataset_train = publaynet
config_overwrite=["TRAIN.STEPS_PER_EPOCH=500","TRAIN.EVAL_PERIOD=200","TRAIN.STARTING_EPOCH=1",
"PREPROC.TRAIN_SHORT_EDGE_SIZE=[800,1200]","TRAIN.CHECKPOINT_PERIOD=50",
"BACKBONE.FREEZE_AT=0"]
build_train_config=["max_datapoints=335703"]
dataset_val = publaynet
build_val_config = ["max_datapoints=2000"]
coco_metric = MetricRegistry.get_metric("coco")
train_faster_rcnn(path_config_yaml=path_config_yaml,
dataset_train=dataset_train,
path_weights=path_weights,
config_overwrite=config_overwrite,
log_dir="/path/to/dir",
build_train_config=build_train_config,
dataset_val=dataset_val,
build_val_config=build_val_config,
metric=coco_metric,
pipeline_component_name="ImageLayoutService"
)
To fine tune this model, please check this Fine-tune tutorial.