# Recursive Segmentation Model
The ideas presented in this repository are largely based off the original paper from 1995: _Recursive XY cut using bounding boxes of connected components_ (https://ieeexplore.ieee.org/document/602059).
**_Disclaimer_**: _This is an unbenchmarked segmentation model. It works decently well for documents at first glance and will be extended to general images in the near future. I also need to find a better name for this package._
## Getting Started
This repository is pushed to a PyPI distribution.
## Examples
See `main.py` for examples on how to draw the images.
## Local Setup
```
pip install -r requirements.txt
```
## Additional Information
This algorithm works particularly well with documents that have a lot of diagrams and that are well spaced. It performs poorly on documents that are purely text-based perform poorly.
At the moment, I am looking to build out an ML model to determine when to split chunks in the page. The main principle would be to train a seq2seq model that outputs a binary sequence. The sequence input is the slices of the image and the output is a binary sequence where a 1 represents a split in the image and 0 otherwise.
Like any bounding box segmentation algorithm, the main limitation is the shape of the segmentation. Edge cases arise when the input image is not necessarily framed in a grid-shape. Take an example where an image contains "L" shaped objects. This makes it impossible to segment out the "L" shaped object defined by a bounding box. If anyone has any ideas on how to improve this, please feel free to suggest!
## Contributing
Feel free to contribute to this repository through Pull Requests and Issues. Reach out to me if you have any ideas surrounding this that you want to discuss!
Raw data
{
"_id": null,
"home_page": null,
"name": "xy-segmentation",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "document, images, parser, segmentation",
"author": null,
"author_email": "Johnathan Chiu <johnathanchiu1065@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/35/e0/8cda570fe51bc8b1a245c08ecaf55df0ba1eefa97702a93421d563956cbf/xy_segmentation-0.0.1.tar.gz",
"platform": null,
"description": "# Recursive Segmentation Model\n\nThe ideas presented in this repository are largely based off the original paper from 1995: _Recursive XY cut using bounding boxes of connected components_ (https://ieeexplore.ieee.org/document/602059).\n\n**_Disclaimer_**: _This is an unbenchmarked segmentation model. It works decently well for documents at first glance and will be extended to general images in the near future. I also need to find a better name for this package._\n\n## Getting Started\n\nThis repository is pushed to a PyPI distribution.\n\n## Examples\n\nSee `main.py` for examples on how to draw the images.\n\n## Local Setup\n\n```\npip install -r requirements.txt\n```\n\n## Additional Information\n\nThis algorithm works particularly well with documents that have a lot of diagrams and that are well spaced. It performs poorly on documents that are purely text-based perform poorly.\n\nAt the moment, I am looking to build out an ML model to determine when to split chunks in the page. The main principle would be to train a seq2seq model that outputs a binary sequence. The sequence input is the slices of the image and the output is a binary sequence where a 1 represents a split in the image and 0 otherwise.\n\nLike any bounding box segmentation algorithm, the main limitation is the shape of the segmentation. Edge cases arise when the input image is not necessarily framed in a grid-shape. Take an example where an image contains \"L\" shaped objects. This makes it impossible to segment out the \"L\" shaped object defined by a bounding box. If anyone has any ideas on how to improve this, please feel free to suggest!\n\n## Contributing\n\nFeel free to contribute to this repository through Pull Requests and Issues. Reach out to me if you have any ideas surrounding this that you want to discuss!\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Recursive Segmentation Algorithm",
"version": "0.0.1",
"project_urls": {
"Homepage": "https://github.com/johnathanchiu/recursive-segmentation",
"Issues": "https://github.com/johnathanchiu/recursive-segmentation/issues"
},
"split_keywords": [
"document",
" images",
" parser",
" segmentation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "35e08cda570fe51bc8b1a245c08ecaf55df0ba1eefa97702a93421d563956cbf",
"md5": "68e1f574b271d155fa2bf369e9883e7b",
"sha256": "0610a0a7210a1e32b49a43095854c77c913d2c19e2933d78032b3685019da2ae"
},
"downloads": -1,
"filename": "xy_segmentation-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "68e1f574b271d155fa2bf369e9883e7b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 33731381,
"upload_time": "2024-10-07T14:17:32",
"upload_time_iso_8601": "2024-10-07T14:17:32.127340Z",
"url": "https://files.pythonhosted.org/packages/35/e0/8cda570fe51bc8b1a245c08ecaf55df0ba1eefa97702a93421d563956cbf/xy_segmentation-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-07 14:17:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "johnathanchiu",
"github_project": "recursive-segmentation",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "numpy",
"specs": [
[
"==",
"2.1.1"
]
]
},
{
"name": "pdfminer.six",
"specs": [
[
"==",
"20231228"
]
]
},
{
"name": "pdfplumber",
"specs": [
[
"==",
"0.11.4"
]
]
},
{
"name": "pillow",
"specs": [
[
"==",
"10.4.0"
]
]
}
],
"lcname": "xy-segmentation"
}