{"id":13542885,"url":"https://github.com/lquirosd/P2PaLA","last_synced_at":"2025-04-02T12:30:42.492Z","repository":{"id":43040024,"uuid":"112342203","full_name":"lquirosd/P2PaLA","owner":"lquirosd","description":"Page to PAGE Layout Analysis Tool","archived":true,"fork":false,"pushed_at":"2022-01-17T15:26:54.000Z","size":869,"stargazers_count":191,"open_issues_count":1,"forks_count":42,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-11-03T09:33:35.241Z","etag":null,"topics":["computer-vision","deep-neural-networks","document-layout-analysis","gan","generative-adversarial-network","handwritten-text-recognition","image-segmentation","page-xml","pix2pix","pytorch"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lquirosd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-28T13:58:06.000Z","updated_at":"2024-11-02T11:49:01.000Z","dependencies_parsed_at":"2022-09-09T17:01:34.370Z","dependency_job_id":null,"html_url":"https://github.com/lquirosd/P2PaLA","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lquirosd%2FP2PaLA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lquirosd%2FP2PaLA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lquirosd%2FP2PaLA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lquirosd%2FP2PaLA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lquirosd","download_url":"https://codeload.github.com/lquirosd/P2PaLA/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246815273,"owners_count":20838413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["computer-vision","deep-neural-networks","document-layout-analysis","gan","generative-adversarial-network","handwritten-text-recognition","image-segmentation","page-xml","pix2pix","pytorch"],"created_at":"2024-08-01T11:00:19.279Z","updated_at":"2025-04-02T12:30:40.730Z","avatar_url":"https://github.com/lquirosd.png","language":"Python","funding_links":[],"categories":["Segmentation"],"sub_categories":["Document Segmentation"],"readme":"P2PaLA\n======\n\n:exclamation::exclamation: P2PaLA is deprecated :exclamation::exclamation: \n\n\n\n[![Python Version](https://img.shields.io/badge/python-2.7%2C%203.6-blue.svg)](https://www.python.org/)\n[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\nPage to [PAGE](http://www.primaresearch.org/tools/PAGELibraries) Layout Analysis (P2PaLA) is a toolkit for Document Layout Analysis based on Neural Networks.\n\n:boom: Try our new [DEMO](http://prhlt-carabela.prhlt.upv.es/tld/) for online baseline detection. :exclamation::exclamation: \n\nIf you find this toolkit useful in your research, please cite:\n```\n@misc{p2pala2017,\n  author = {Lorenzo Quirós},\n  title = {P2PaLA: Page to PAGE Layout Analysis tookit},\n  year = {2017},\n  publisher = {GitHub},\n  note = {GitHub repository},\n  howpublished = {\\url{https://github.com/lquirosd/P2PaLA}},\n}\n```\nCheck this paper for more details [Arxiv](https://arxiv.org/abs/1806.08852).\n\n\n\nRequirements\n===========\n\n- Linux (OSX may work, but untested.).\n- [Python](https://www.python.org/) (2.7, 3.6 under [conda virtual environment](https://www.anaconda.com/download/#linux) is recomended)\n- [Numpy](http://www.numpy.org/) \u003c!--- (installed by default using conda) --\u003e\n- [PyTorch](http://pytorch.org) (1.0). PyTorch 0.3.1 compatible on this [branch](https://github.com/lquirosd/P2PaLA/tree/PyTorch-v0.3.1)\n- [OpenCv](https://github.com/opencv/opencv/releases/tag/3.4.5) (3.4.5.20). \u003c!--- `conda install -c menpo opencv` --\u003e\n- NVIDIA GPU + CUDA CuDNN (CPU mode and CUDA without CuDNN works, but is not recomended for training).\n- [tensorboard-pytorch](https://github.com/lanpa/tensorboard-pytorch) (v0.9) [Optional]. `pip install tensorboardX` \u003e A diferent conda env is recomended to keep tensorflow separated from PyTorch\n\nInstall\n=======\n```bash\npython setup.py install\n```\n\n\u003e To install python dependencies alone, use  [requirements file](conda_requirements.yml) `conda env create --file conda_requirements.yml`\n\nUsage\n=====\n1. Input data must follow the folder structure `data_tag/page`, where images must be into the `data_tag` folder and xml files into `page`. For example:\n```bash\nmkdir -p data/{train,val,test,prod}/page;\ntree data;\n```\n\n```\ndata\n├── prod\n│   ├── page\n│   │   ├── prod_0.xml\n│   │   └── prod_1.xml\n│   ├── prod_0.jpg\n│   └── prod_1.jpg\n├── test\n│   ├── page\n│   │   ├── test_0.xml\n│   │   └── test_1.xml\n│   ├── test_0.jpg\n│   └── test_1.jpg\n├── train\n│   ├── page\n│   │   ├── train_0.xml\n│   │   └── train_1.xml\n│   ├── train_0.jpg\n│   └── train_1.jpg\n└── val\n    ├── page\n    │   ├── val_0.xml\n    │   └── val_1.xml\n    ├── val_0.jpg\n    └── val_1.jpg\n```\n\n2. Run the tool.\n\n```bash\npython P2PaLA.py --config config.txt --tr_data ./data/train --te_data ./data/test --log_comment \"_foo\"\n```\n\u003e :exclamation: Pre-trained models available [here](egs/pre_trained)\n\n3. Use TensorBoard to visualize train status:\n\n```bash\ntensorboard --logdir ./work/runs\n```\n4. xml-PAGE files must be at \"./work/results/test/\"\n\n\u003e We recommend [Transkribus](https://transkribus.eu/Transkribus/) or [nw-page-editor](https://github.com/mauvilsa/nw-page-editor) \n\u003e to visualize and edit PAGE-xml files.\n\n5. For detail about arguments and config file, see [docs](docs) or `python P2PaLA.py -h`. \n6. For more detailed example see [egs](egs):\n    * Bozen dataset [see](egs/Bozen)\n    * cBAD complex competition dataset [see](egs/cBAD_complex)\n    * OHG dataset [see](egs/OHG)\n\n\nLicense\n=======\nGNU General Public License v3.0\nSee [LICENSE](LICENSE) to see the full text.\n\nAcknowledgments\n===============\nCode is inspired by [pix2pix](https://github.com/phillipi/pix2pix) and [pytorch-CycleGAN-and-pix2pix](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flquirosd%2FP2PaLA","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flquirosd%2FP2PaLA","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flquirosd%2FP2PaLA/lists"}