Name | cornucopia JSON |
Version |
0.3.0
JSON |
| download |
home_page | None |
Summary | An abundance of augmentation layers |
upload_time | 2024-04-19 14:35:31 |
maintainer | None |
docs_url | None |
author | Yael Balbastre |
requires_python | >=3.6 |
license | MIT |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<picture align="center">
<source media="(prefers-color-scheme: dark)" srcset="docs/icons/cornucopia_lightorange.svg">
<source media="(prefers-color-scheme: light)" srcset="docs/icons/cornucopia_orange.svg">
<img alt="Cornucopia logo" src="https://github.com/balbasty/cornucopia/raw/main/docs/icons/cornucopia_orange.svg">
</picture>
The `cornucopia` package provides a generic framework for preprocessing,
augmentation, and domain randomization; along with an abundance of specific layers,
mostly targeted at (medical) imaging. `cornucopia` is written using a PyTorch
backend, and therefore runs **on the CPU or GPU**.
Cornucopia is *intended* to be used on the GPU for on-line augmentation.
A quick [benchmark](examples/benchmark.ipynb) of affine and elastic augmentation
shows that while cornucopia is slower than [TorchIO](https://github.com/fepegar/torchio)
on the CPU (~ 3s vs 1s), it is greatly accelerated on the GPU (~ 50ms).
Since gradients are not expected to backpropagate through its layers, it can
theoretically be used within any dataloader pipeline,
independent of the downstream learning framework (pytorch, tensorflow, jax, ...).
## Installation
### Dependencies
- `pytorch >= 1.8`
- `numpy`
- `nibabel`
- `torch-interpol`
- `torch-distmap`
### Conda
```sh
conda install cornucopia -c balbasty -c pytorch -c conda-forge
```
### Pip (release)
```sh
pip install cornucopia
```
### Pip (dev)
```sh
pip install cornucopia@git+https://github.com/balbasty/cornucopia
```
## Documentation
Read the [documentation](https://cornucopia.readthedocs.io) and in particular:
- [installation](https://cornucopia.readthedocs.io/en/latest/install/)
- [get started](https://cornucopia.readthedocs.io/en/latest/start/)
- [examples](https://cornucopia.readthedocs.io/en/latest/examples/overview/)
- [API](https://cornucopia.readthedocs.io/en/latest/api/overview/)
## Other augmentation packages
There are other great, and much more mature, augmentation packages
out-there (although few run on the GPU). Here's a non-exhaustive list:
- [MONAI](https://github.com/Project-MONAI/MONAI)
- [TorchIO](https://github.com/fepegar/torchio)
- [Albumentations](https://github.com/albumentations-team/albumentations) (2D only)
- [Volumentations](https://github.com/ZFTurbo/volumentations) (3D extension of Albumentations)
## Contributions
If you find this project useful and wish to contribute, please reach out!
Raw data
{
"_id": null,
"home_page": null,
"name": "cornucopia",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Yael Balbastre",
"author_email": "yael.balbastre@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/00/98/a777094c2f890a7f49812cf8682a7d0eb83e4dd0f37202001107b1b3bcf8/cornucopia-0.3.0.tar.gz",
"platform": "OS Independent",
"description": "<picture align=\"center\">\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"docs/icons/cornucopia_lightorange.svg\">\n <source media=\"(prefers-color-scheme: light)\" srcset=\"docs/icons/cornucopia_orange.svg\">\n <img alt=\"Cornucopia logo\" src=\"https://github.com/balbasty/cornucopia/raw/main/docs/icons/cornucopia_orange.svg\">\n</picture>\n\nThe `cornucopia` package provides a generic framework for preprocessing,\naugmentation, and domain randomization; along with an abundance of specific layers,\nmostly targeted at (medical) imaging. `cornucopia` is written using a PyTorch\nbackend, and therefore runs **on the CPU or GPU**.\n\nCornucopia is *intended* to be used on the GPU for on-line augmentation.\nA quick [benchmark](examples/benchmark.ipynb) of affine and elastic augmentation\nshows that while cornucopia is slower than [TorchIO](https://github.com/fepegar/torchio)\non the CPU (~ 3s vs 1s), it is greatly accelerated on the GPU (~ 50ms).\n\nSince gradients are not expected to backpropagate through its layers, it can\ntheoretically be used within any dataloader pipeline,\nindependent of the downstream learning framework (pytorch, tensorflow, jax, ...).\n\n## Installation\n\n### Dependencies\n\n- `pytorch >= 1.8`\n- `numpy`\n- `nibabel`\n- `torch-interpol`\n- `torch-distmap`\n\n### Conda\n\n```sh\nconda install cornucopia -c balbasty -c pytorch -c conda-forge\n```\n\n### Pip (release)\n\n```sh\npip install cornucopia\n```\n\n### Pip (dev)\n\n```sh\npip install cornucopia@git+https://github.com/balbasty/cornucopia\n```\n\n## Documentation\n\nRead the [documentation](https://cornucopia.readthedocs.io) and in particular:\n- [installation](https://cornucopia.readthedocs.io/en/latest/install/)\n- [get started](https://cornucopia.readthedocs.io/en/latest/start/)\n- [examples](https://cornucopia.readthedocs.io/en/latest/examples/overview/)\n- [API](https://cornucopia.readthedocs.io/en/latest/api/overview/)\n\n## Other augmentation packages\n\nThere are other great, and much more mature, augmentation packages \nout-there (although few run on the GPU). Here's a non-exhaustive list:\n- [MONAI](https://github.com/Project-MONAI/MONAI)\n- [TorchIO](https://github.com/fepegar/torchio)\n- [Albumentations](https://github.com/albumentations-team/albumentations) (2D only)\n- [Volumentations](https://github.com/ZFTurbo/volumentations) (3D extension of Albumentations)\n\n## Contributions\n\nIf you find this project useful and wish to contribute, please reach out!\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "An abundance of augmentation layers",
"version": "0.3.0",
"project_urls": {
"Source Code": "https://github.com/balbasty/cornucopia"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ca05ea172797ae4caec245e2e66a090ce63f475d70fab1baf2de4c7c9b288659",
"md5": "dd562e7ed7f5e4f608ca6558d724e860",
"sha256": "268eadfdaddbef8e403f0690372f99952707ecf1227f277bb031b07f62ee8bb2"
},
"downloads": -1,
"filename": "cornucopia-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dd562e7ed7f5e4f608ca6558d724e860",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 113469,
"upload_time": "2024-04-19T14:35:30",
"upload_time_iso_8601": "2024-04-19T14:35:30.125856Z",
"url": "https://files.pythonhosted.org/packages/ca/05/ea172797ae4caec245e2e66a090ce63f475d70fab1baf2de4c7c9b288659/cornucopia-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0098a777094c2f890a7f49812cf8682a7d0eb83e4dd0f37202001107b1b3bcf8",
"md5": "870e7d825ae66bbbd7b7734a8c452f63",
"sha256": "af50fabddd9b5d363ad4daa7dfbe5a0bbd2e4a721953814a2d339577f703ee66"
},
"downloads": -1,
"filename": "cornucopia-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "870e7d825ae66bbbd7b7734a8c452f63",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 114202,
"upload_time": "2024-04-19T14:35:31",
"upload_time_iso_8601": "2024-04-19T14:35:31.585109Z",
"url": "https://files.pythonhosted.org/packages/00/98/a777094c2f890a7f49812cf8682a7d0eb83e4dd0f37202001107b1b3bcf8/cornucopia-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-19 14:35:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "balbasty",
"github_project": "cornucopia",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "cornucopia"
}