[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"readme:doctr":3},"\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fmindee\u002Fdoctr\u002Fraw\u002Fmain\u002Fdocs\u002Fimages\u002FLogo_doctr.gif\" width=\"40%\" \u002F>\n\u003C\u002Fp>\u003Cp>\u003Ca href=\"https:\u002F\u002Fslack.mindee.com\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSlack-Community-4A154B?style=flat-square&amp;logo=slack&amp;logoColor=white\" alt=\"Slack Icon\" \u002F>\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmindee\u002Fdoctr\u002Fblob\u002FHEAD\u002FLICENSE\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache%202.0-blue.svg\" alt=\"License\" \u002F>\u003C\u002Fa> \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fmindee\u002Fdoctr\u002Fworkflows\u002Fbuilds\u002Fbadge.svg\" alt=\"Build Status\" \u002F> \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmindee\u002Fdoctr\u002Fpkgs\u002Fcontainer\u002Fdoctr\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDocker-4287f5?style=flat&amp;logo=docker&amp;logoColor=white\" alt=\"Docker Images\" \u002F>\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fcodecov.io\u002Fgh\u002Fmindee\u002Fdoctr\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fcodecov.io\u002Fgh\u002Fmindee\u002Fdoctr\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg?token=577MO567NM\" alt=\"codecov\" \u002F>\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fwww.codefactor.io\u002Frepository\u002Fgithub\u002Fmindee\u002Fdoctr\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fwww.codefactor.io\u002Frepository\u002Fgithub\u002Fmindee\u002Fdoctr\u002Fbadge?s=bae07db86bb079ce9d6542315b8c6e70fa708a7e\" alt=\"CodeFactor\" \u002F>\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fapp.codacy.com\u002Fgh\u002Fmindee\u002Fdoctr?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=mindee\u002Fdoctr&amp;utm_campaign=Badge_Grade\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fapi.codacy.com\u002Fproject\u002Fbadge\u002FGrade\u002F340a76749b634586a498e1c0ab998f08\" alt=\"Codacy Badge\" \u002F>\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fmindee.github.io\u002Fdoctr\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fmindee\u002Fdoctr\u002Fworkflows\u002Fdoc-status\u002Fbadge.svg\" alt=\"Doc Status\" \u002F>\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fpython-doctr\u002F\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpypi-v1.1.0-blue.svg\" alt=\"Pypi\" \u002F>\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fmindee\u002Fdoctr\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20Face-Spaces-blue\" alt=\"Hugging Face Spaces\" \u002F>\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fmindee\u002Fnotebooks\u002Fblob\u002Fmain\u002Fdoctr\u002Fquicktour.ipynb\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\" alt=\"Open In Colab\" \u002F>\u003C\u002Fa> \u003Ca href=\"https:\u002F\u002Fgurubase.io\u002Fg\u002Fdoctr\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGurubase-Ask%20docTR%20Guru-006BFF\" alt=\"Gurubase\" \u002F>\u003C\u002Fa>\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Optical Character Recognition made seamless &amp; accessible to anyone, powered by PyTorch\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Ch2>Project responsibility\u003C\u002Fh2>\n\u003Cp>\u003Cstrong>docTR\u003C\u002Fstrong> was originally created by \u003Ca href=\"https:\u002F\u002Fmindee.com\" rel=\"nofollow ugc noopener\">Mindee\u003C\u002Fa>. It is now actively developed and maintained by \u003Ca href=\"https:\u002F\u002Fwww.text2knowledge.de\u002Fde\" rel=\"nofollow ugc noopener\">t2k GmbH\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Fwww.text2knowledge.de\u002Fde\" rel=\"nofollow ugc noopener\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fmindee\u002Fdoctr\u002Fraw\u002Fmain\u002Fdocs\u002Fimages\u002Fdoctr-need-help.png\" alt=\"Need help solving a complex use case?\" \u002F>\u003C\u002Fa>\u003C\u002Fp>\n\u003Cp>What you can expect from this repository:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>efficient ways to parse textual information (localize and identify each word) from your documents\u003C\u002Fli>\n\u003Cli>guidance on how to integrate this in your current architecture\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fmindee\u002Fdoctr\u002Fraw\u002Fmain\u002Fdocs\u002Fimages\u002Focr.png\" alt=\"OCR_example\" \u002F>\u003C\u002Fp>\n\u003Ch2>Quick Tour\u003C\u002Fh2>\n\u003Ch3>Getting your pretrained model\u003C\u002Fh3>\n\u003Cp>End-to-End OCR is achieved in docTR using a two-stage approach: text detection (localizing words), then text recognition (identify all characters in the word).\nAs such, you can select the architecture used for \u003Ca href=\"https:\u002F\u002Fmindee.github.io\u002Fdoctr\u002Flatest\u002Fmodules\u002Fmodels.html#doctr-models-detection\" rel=\"nofollow ugc noopener\">text detection\u003C\u002Fa>, and the one for \u003Ca href=\"https:\u002F\u002Fmindee.github.io\u002Fdoctr\u002Flatest\u002F\u002Fmodules\u002Fmodels.html#doctr-models-recognition\" rel=\"nofollow ugc noopener\">text recognition\u003C\u002Fa> from the list of available implementations.\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-python\">from doctr.models import ocr_predictor\n\nmodel = ocr_predictor(det_arch=\"db_resnet50\", reco_arch=\"crnn_vgg16_bn\", pretrained=True)\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3>Reading files\u003C\u002Fh3>\n\u003Cp>Documents can be interpreted from PDF or images:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-python\">from doctr.io import DocumentFile\n\n# PDF\npdf_doc = DocumentFile.from_pdf(\"path\u002Fto\u002Fyour\u002Fdoc.pdf\")\n# Image\nsingle_img_doc = DocumentFile.from_images(\"path\u002Fto\u002Fyour\u002Fimg.jpg\")\n# Webpage (requires `weasyprint` to be installed)\nwebpage_doc = DocumentFile.from_url(\"https:\u002F\u002Fwww.yoursite.com\")\n# Multiple page images\nmulti_img_doc = DocumentFile.from_images([\"path\u002Fto\u002Fpage1.jpg\", \"path\u002Fto\u002Fpage2.jpg\"])\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3>Putting it together\u003C\u002Fh3>\n\u003Cp>Let's use the default pretrained model for an example:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-python\">from doctr.io import DocumentFile\nfrom doctr.models import ocr_predictor\n\nmodel = ocr_predictor(pretrained=True)\n# PDF\ndoc = DocumentFile.from_pdf(\"path\u002Fto\u002Fyour\u002Fdoc.pdf\")\n# Analyze\nresult = model(doc)\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch3>Detecting the document layout\u003C\u002Fh3>\n\u003Cp>You can additionally run a layout detection model as part of\u003C\u002Fp>\n",1787530083389]