Metadata-Version: 2.4
Name: usaugment
Version: 1.0.0
Summary: Ultrasound-specific image transforms for training deep neural networks.
Project-URL: Homepage, https://github.com/adamtupper/usaugment
Project-URL: Documentation, https://github.com/adamtupper/usaugment/wiki
Project-URL: Issues, https://github.com/adamtupper/usaugment/issues
Author-email: Adam Tupper <adam.tupper.1@ulaval.ca>
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Requires-Dist: albumentations>=1.4.23
Requires-Dist: numpy>=2.2.0
Requires-Dist: scikit-image>=0.25.0
Provides-Extra: dev
Requires-Dist: nbstripout>=0.8.1; extra == 'dev'
Requires-Dist: pre-commit>=4.0.1; extra == 'dev'
Requires-Dist: ruff>=0.8.4; extra == 'dev'
Provides-Extra: examples
Requires-Dist: ipympl>=0.9.5; extra == 'examples'
Requires-Dist: ipywidgets>=8.1.5; extra == 'examples'
Requires-Dist: matplotlib>=3.1.0; extra == 'examples'
Requires-Dist: notebook>=7.3.2; extra == 'examples'
Description-Content-Type: text/markdown

# USAugment

![Examples of each augmentation.](figures/readme_banner.png)

USAugment provides ultrasound-specific image transforms for training deep neural networks. It accompanies our article [Revisiting Data Augmentation for Ultrasound Images]().

Checkout the [Wiki](https://github.com/adamtupper/usaugment/wiki) to find the documentation, usage examples, and contributing guidelines.

## How to install USAugment

This package can be installed from [PyPI]() by running:

```bash
pip install usaugment
```


## Get started using USAugment

Here add a quick code demo showing how to compose a multiple augmentations together using Albumentations after the package is installed.

```python
>>> import albumentations as A
>>> from usaugment.albumentations import DepthAttenuation, GaussianShadow, HazeArtifact, SpeckleReduction
>>> transform = A.Compose(
...     [
...         DepthAttenuation(p=0.5),
...         GaussianShadow(p=0.5),
...         HazeArtifact(p=0.5),
...         SpeckleReduction(p=0.5),
...     ],
...     additional_targets={"scan_mask": "mask"}
...)
>>> transformed = transform(image=image)
```

Checkout the [Documentation](https://github.com/adamtupper/usaugment/wiki) for more detailed examples and information about scan masks.

## Running the examples

There's a notebook in the notebooks directory that provides examples that visualize the effects of each augmentation. You can run these examples using Binder (see the tag at the top of page) or locally by installing the optional `examples` dependencies (Matplotlib and Jupyter Notebook):

```bash
pip install '.[examples]'
```


## Contributing

I'd love for this package to grow and flourish into a resource that anyone with an interest in training deep neural networks for ultrasound analysis tasks can pick up and use quickly and easily. Any help addressing bugs, contributing new augmentations, or any other improvements are welcome and appreiciated! I only ask that you respect the community guidelines laid out in the `CODE_OF_CONDUCT.md`. For more information on how to contribute, checkout out the [Documentation](https://github.com/adamtupper/usaugment/wiki).

To ensure that your code meets the style guidelines etc., make sure you install the optional development dependencies:

```bash
pip install '.[dev]'
nbstripout --install
pre-commit install
```

## How to cite USAugment

If you use the augmentations in USAugment in your research, please cite our article [Revisiting Data Augmentation for Ultrasound Images](). This helps more people find and use the package and encourages us to continue maintaining and improving it!

```
```