Metadata-Version: 2.1
Name: opensr-degradation
Version: 0.9.5
Summary: A set of methods to emulate Sentinel-2 based on High-Resolution imagery
Home-page: https://github.com/csaybar/opensr-degradation
License: MIT
Author: Cesar Aybar
Author-email: cesar.aybar@uv.es
Requires-Python: >=3.8
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: numpy (>=1.25.2)
Requires-Dist: pydantic (>=2.6.3)
Requires-Dist: scikit-image (>=0.19.3)
Requires-Dist: scipy (>=1.11.4)
Requires-Dist: torch (>=2.1.0)
Requires-Dist: torchvision (>=0.16.0)
Project-URL: Repository, https://github.com/csaybar/opensr-degradation
Description-Content-Type: text/markdown

# opensr-degradation

<div align="center">

</div>

## Install

```python
pip install opensr-degradation
```

## Usage

```python
import opensr_degradation
import torch

degradation_model = opensr_degradation.pipe(
    sensor="naip_d",
    add_noise=True,
    params={
        "method": [
            "identity",
            "gamma_lognormal",
            "gamma_multivariate_normal",
            "unet_histogram_matching",
            "vae_histogram_matching",
        ],
        "device": "cuda",
        "seed": 42,
        "percentiles": [10, 25, 50, 75, 90],
    },
)

image = torch.rand(4, 256, 256)
lr, hr = degradation_model(image)
``` 

