{"id":28286697,"url":"https://github.com/shallowmanica/doc-layout-parser","last_synced_at":"2026-02-02T15:38:54.550Z","repository":{"id":292115215,"uuid":"979854639","full_name":"shallowManica/doc-layout-parser","owner":"shallowManica","description":"A layout analysis pipeline using Detectron2 + Label Studio for extracting based on Fast R-CNN and annotating sections like abstract, table, figure, and references from academic PDFs","archived":false,"fork":false,"pushed_at":"2025-05-11T13:16:11.000Z","size":2125,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-15T05:36:05.336Z","etag":null,"topics":["detectron2","fastrcnn","labelstudio","layoutparser","parameter-tuning","parsing","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shallowManica.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-08T07:09:22.000Z","updated_at":"2025-05-11T13:16:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1ee2885-efa1-4fea-ba83-18577dd5cbcd","html_url":"https://github.com/shallowManica/doc-layout-parser","commit_stats":null,"previous_names":["shallowmanica/doc-layout-parser"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shallowManica/doc-layout-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shallowManica%2Fdoc-layout-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shallowManica%2Fdoc-layout-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shallowManica%2Fdoc-layout-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shallowManica%2Fdoc-layout-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shallowManica","download_url":"https://codeload.github.com/shallowManica/doc-layout-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shallowManica%2Fdoc-layout-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29014462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T14:58:54.169Z","status":"ssl_error","status_checked_at":"2026-02-02T14:58:51.285Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["detectron2","fastrcnn","labelstudio","layoutparser","parameter-tuning","parsing","pytorch"],"created_at":"2025-05-21T21:12:15.647Z","updated_at":"2026-02-02T15:38:54.545Z","avatar_url":"https://github.com/shallowManica.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# doc-layout-parser\n\nThis project develops a layout parsing pipeline to extract key components (e.g., abstract, context, table, reference) from academic PDFs using a Detectron2-based model trained on annotations from Label Studio.\n\n## 🔍 Purpose\n\nTo identify and segment document elements like titles, authors, abstracts, tables, figures, and references using object detection techniques, improving downstream analysis and semantic classification with LLMs.\n\n## ⚙️ Features\n\n- Fast R-CNN architecture (Detectron2) for layout detection\n- Layout categories: Abstract, Author, Context, Header, Image, Reference, Sub-title, Table, Title\n- Integration-ready with LLMs for content-based filtering or labeling\n- Configuration through `config.yaml`\n\n## 🗃 File Structure\n\n- `config.yaml` - Detectron2 configuration for the layout model\n- `result.json` - Output annotations from model inference\n- `parsing.ipynb` - Sample notebook to run detection and visualize results\n\n## 📦 Dependencies\n\nInstall via pip:\n```bash\n!pip install pycocotools\n!pip install layoutparser\n!pip install \"layoutparser[effdet]\"\n!pip install layoutparser torchvision\n!python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'\n!pip install layoutparser torchvision \u0026\u0026 pip install \"git+https://github.com/facebookresearch/detectron2.git@v0.5#egg=detectron2\"\n!pip install \"layoutparser[paddledetection]\"\n!pip install \"layoutparser[ocr]\"\n```\n\nInstall via Conda:\n```bash\nconda install detectron2 pytorch opencv omegaconf hydra-core -c conda-forge\n```\n\n🚀 How to Run\n```bash\n# Inside parsing.ipynb\nfrom layoutparser.models import Detectron2LayoutModel\n\nmodel = Detectron2LayoutModel(\n    config_path='config.yaml',\n    extra_config=[\"MODEL.ROI_HEADS.SCORE_THRESH_TEST\", 0.8],\n    label_map={0: \"Abstract\", 1: \"Author\", ...}\n)\n```\n```bash\n📄 Annotation Categories\n\t•\tAbstract\n\t•\tAuthor\n\t•\tContext\n\t•\tHeader\n\t•\tImage\n\t•\tReference\n\t•\tSub-title\n\t•\tTable\n\t•\tTitle\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshallowmanica%2Fdoc-layout-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshallowmanica%2Fdoc-layout-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshallowmanica%2Fdoc-layout-parser/lists"}