Skip to content
","upvoteCount":0,"url":"https://github.com/deepdoctection/deepdoctection/discussions/352#discussioncomment-10051943"}}}

Adding different models #352

Answered by JaMe76
adinath1233 asked this question in Q&A
Jul 10, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Sorry for late reply.

If you register the model first and then instantiate the analyzer with config changes then it will work.

E.G.

import deepdoctection as dd



if __name__ == "__main__":

    dd.ModelCatalog.register("layoutparser/publaynet/model_final.pth", dd.ModelProfile(
        name="layoutparser/publaynet/model_final.pth",
        description="Add some infos regarding the model",
        config="layoutparser/publaynet/config.yml",
        tp_model=False,
        size=[],
        categories={
            1: dd.LayoutType.TEXT,
            2: dd.LayoutType.TITLE,
            3: dd.LayoutType.LIST,
            4: dd.LayoutType.TABLE,
            5: dd.LayoutType.FIGURE,
        },
 …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@adinath1233
Comment options

@JaMe76
Comment options

Answer selected by adinath1233
@adinath1233
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants