Name | mdetsyn JSON |
Version |
0.0.4.post1
JSON |
| download |
home_page | None |
Summary | Data Synthesis pipeline to generate object detection data |
upload_time | 2024-05-08 10:19:22 |
maintainer | None |
docs_url | None |
author | PD-Mera |
requires_python | None |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Object Detection Data Synthesis
Data Synthesis pipeline to generate object detection data
<a href="https://pypi.org/project/mdetsyn/"><img alt="Alt text" src="https://img.shields.io/badge/PyPI-3775A9.svg?style=for-the-badge&logo=PyPI&logoColor=white"/></a>
## How to run
### Run with pip
``` bash
pip install mdetsyn
```
And run in python file
``` python
from mdetsyn import run_synthesis, create_args
args = create_args()
run_synthesis(args)
```
### Run with command line
``` bash
python synthesis.py --backgrounds ./backgrounds \
--objects ./objects \
--savename ./synthesis \
--number 1000 \
--class_mapping ./class_mapping.json \
--class_txt ./classes.txt
```
## Sample
- Backgrounds folder contain background images (in any folmat)
```
├── backgrounds/
├── background-0.jpg
├── background-1.jpg
└── ...
```
- Objects folder contain object images in subfolders (the best is `.png` format with `A` channel but any format is still runnable)
```
├── objects/
├── class_1/
│ ├── image-0.png
│ ├── image-1.png
│ └── ...
├── class_2/
└── ...
```
- Each image in objects folder will be synthesis by `n` times with `n` is user input
- Output is a synthesis folder contain `images` and `labels` dir same as YOLO format
- Sample visualization:
| Background | Object | Synthesis |
| :---: | :---: | :---: |
| ![](./sample/backgrounds/background-0.jpg) | ![](./sample/objects/vanamo/vanamo-0.png) | ![](./sample/synthesis/images/4b09b7ae-3290-45d7-afef-82a7c5cef26d.jpg) |
## Support synthesis methods
- Random Resize
- Random Rotate
- Random Transparency
- Random Perspective Transform
- Seamless Clone
- Grayscale
## Error and TODO
- [ ] Sometimes seamless clone does not work
- [x] Input parameter for each augment
- [ ] Add default arguments to argparse help
Raw data
{
"_id": null,
"home_page": null,
"name": "mdetsyn",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "PD-Mera",
"author_email": "phuongdong1772000@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/9f/32/476c13ae6cfa7f4ff177017839ee604bc1fe6ca011e8ca9def7a974bc8a6/mdetsyn-0.0.4.post1.tar.gz",
"platform": null,
"description": "# Object Detection Data Synthesis\n\nData Synthesis pipeline to generate object detection data\n\n<a href=\"https://pypi.org/project/mdetsyn/\"><img alt=\"Alt text\" src=\"https://img.shields.io/badge/PyPI-3775A9.svg?style=for-the-badge&logo=PyPI&logoColor=white\"/></a>\n\n## How to run\n\n### Run with pip\n\n``` bash\npip install mdetsyn\n```\n\nAnd run in python file \n\n``` python\nfrom mdetsyn import run_synthesis, create_args\n\nargs = create_args()\nrun_synthesis(args)\n```\n\n### Run with command line\n\n``` bash\npython synthesis.py --backgrounds ./backgrounds \\\n --objects ./objects \\\n --savename ./synthesis \\\n --number 1000 \\\n --class_mapping ./class_mapping.json \\\n --class_txt ./classes.txt\n```\n\n## Sample\n\n- Backgrounds folder contain background images (in any folmat)\n\n```\n\u251c\u2500\u2500 backgrounds/\n \u251c\u2500\u2500 background-0.jpg\n \u251c\u2500\u2500 background-1.jpg\n \u2514\u2500\u2500 ...\n```\n\n- Objects folder contain object images in subfolders (the best is `.png` format with `A` channel but any format is still runnable)\n\n```\n\u251c\u2500\u2500 objects/\n \u251c\u2500\u2500 class_1/\n \u2502 \u251c\u2500\u2500 image-0.png\n \u2502 \u251c\u2500\u2500 image-1.png\n \u2502 \u2514\u2500\u2500 ...\n \u251c\u2500\u2500 class_2/\n \u2514\u2500\u2500 ...\n```\n\n- Each image in objects folder will be synthesis by `n` times with `n` is user input\n\n- Output is a synthesis folder contain `images` and `labels` dir same as YOLO format\n\n- Sample visualization:\n\n| Background | Object | Synthesis |\n| :---: | :---: | :---: |\n| ![](./sample/backgrounds/background-0.jpg) | ![](./sample/objects/vanamo/vanamo-0.png) | ![](./sample/synthesis/images/4b09b7ae-3290-45d7-afef-82a7c5cef26d.jpg) |\n\n## Support synthesis methods\n\n- Random Resize\n- Random Rotate\n- Random Transparency\n- Random Perspective Transform\n- Seamless Clone\n- Grayscale\n\n## Error and TODO\n\n- [ ] Sometimes seamless clone does not work\n- [x] Input parameter for each augment\n- [ ] Add default arguments to argparse help\n",
"bugtrack_url": null,
"license": null,
"summary": "Data Synthesis pipeline to generate object detection data",
"version": "0.0.4.post1",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0d221226b3c58600c9d82a2fe2feb9b633f767b86deca641d31048ad315af027",
"md5": "4dd553a8fe7bd3f4ddf96ece4b29e3b2",
"sha256": "c7dd58aba59b2a8a7456d5a45d694fd68f913eadbe8732b8c1b6e825a358fcf8"
},
"downloads": -1,
"filename": "mdetsyn-0.0.4.post1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4dd553a8fe7bd3f4ddf96ece4b29e3b2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6945,
"upload_time": "2024-05-08T10:19:21",
"upload_time_iso_8601": "2024-05-08T10:19:21.705498Z",
"url": "https://files.pythonhosted.org/packages/0d/22/1226b3c58600c9d82a2fe2feb9b633f767b86deca641d31048ad315af027/mdetsyn-0.0.4.post1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9f32476c13ae6cfa7f4ff177017839ee604bc1fe6ca011e8ca9def7a974bc8a6",
"md5": "824aa8eca7c64b52d7050bec4f8e1a30",
"sha256": "a7eafb5cb5df1bfa61d886e8730d512be7fdfd789aafada35def0b26b6ae3528"
},
"downloads": -1,
"filename": "mdetsyn-0.0.4.post1.tar.gz",
"has_sig": false,
"md5_digest": "824aa8eca7c64b52d7050bec4f8e1a30",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6294,
"upload_time": "2024-05-08T10:19:22",
"upload_time_iso_8601": "2024-05-08T10:19:22.850122Z",
"url": "https://files.pythonhosted.org/packages/9f/32/476c13ae6cfa7f4ff177017839ee604bc1fe6ca011e8ca9def7a974bc8a6/mdetsyn-0.0.4.post1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-08 10:19:22",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "mdetsyn"
}