Skip to content

Commit

Permalink
pip patch (#3)
Browse files Browse the repository at this point in the history
* Update setup.py - package name and dir fixed

* Update setup.py

* Update README.md
  • Loading branch information
mikonvergence authored Aug 28, 2023
1 parent d79bb56 commit f001328
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,24 @@ If you found this tool useful, please cite accordingly:
}
```

### Requirements
### Installation
```bash
torch>=1.10.0
torchvision
kornia
numpy
imageio
pip install git+https://github.com/strath-ai/SatelliteCloudGenerator
```

and then import:
```python
import satellite_cloud_generator as scg

cloudy_img = scg.add_cloud_and_shadow(clear_img)
```

## :gear: Usage
Basic usage, takes a `clear` image and returns a `cloudy` version along with a corresponding channel-specific transparency `mask`:
```python
cloudy, mask = add_cloud(clear,
min_lvl=0.0,
max_lvl=1.0
cloudy, mask = scg.add_cloud(clear,
min_lvl=0.0,
max_lvl=1.0
)
```
...resulting in the following:
Expand All @@ -60,7 +63,7 @@ The `min_lvl` and `max_lvl` control the range of values of the transparency `mas
### Generator Module
You can also use a `CloudGenerator` object that binds a specific configuration (or a set of configurations) with the wrapped generation methods:
```python
my_gen=CloudGenerator(WIDE_CONFIG,cloud_p=1.0,shadow_p=0.5)
my_gen=scg.CloudGenerator(scg.WIDE_CONFIG,cloud_p=1.0,shadow_p=0.5)
my_gen(my_image) # will act just like add_cloud_and_shadow() but will preserve the same configuration!
```

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from setuptools import setup

setup(
name='satellite_cloud_generator',
name='satellite-cloud-generator',
version='0.3',
description='A PyTorch-based tool for simulating clouds in satellite images.',
url='https://github.com/strath-ai/SatelliteCloudGenerator',
author='Mikolaj Czerkawski, Christos Tachtatzis',
author_email="mikolaj.czerkawski@esa.int",
license='Apache 2.0',
packages=['src', 'src.LocalGaussianBlur', 'src.LocalGaussianBlur.src'],
package_dir={"satellite_cloud_generator":"src"},
install_requires=[
"torch>=1.10.0",
"torchvision",
Expand Down

0 comments on commit f001328

Please # to comment.