Skip to content

Commit 5fea1d3

Browse files
author
Joao
committed
refactor(generator): draft for refactor
1 parent f142221 commit 5fea1d3

File tree

6 files changed

+32253
-93
lines changed

6 files changed

+32253
-93
lines changed

docs/generator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Pixels Data Generator
2-
A [DataGenerator](https://github.com/tesselo/pixels/blob/main/pixels/generator/generator.py) is used to feed pixels data to our AI models. This generator transforms the raw imagery stacks from the pixels collection into a format that can be passed to an AI model.
2+
A [Generator](https://github.com/tesselo/pixels/blob/main/pixels/generator/generator.py) is used to feed pixels data to our AI models. This generator transforms the raw imagery stacks from the pixels collection into a format that can be passed to an AI model.
33

44
For super-resolution models, the generator is able to change the resolution of the imagery data.
55

@@ -195,7 +195,7 @@ Path to for the downloaded data directory. If `download_dir` is not set and
195195
## Supporting arguments
196196
This section documents a number of arguments that can be set as generator
197197
arguments in the stac training algorithm, that are not direct arguments of the
198-
DataGenerator. These additional arguments are related with formatting the input
198+
Generator. These additional arguments are related with formatting the input
199199
and output of the models, as well as handling special cases during prediction.
200200

201201
### Variable prediction image size

docs/how-to-guides/running_the_generator.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ The arguments definitions can be seen here:[Pixels Data Generator](../generator.
77
When running the generator locally multiple times, it can make sense to download the data so that subsequent runs are faster. To do so, use the following additional parameters: ```download_data``` and ```download_dir```.
88

99
```python
10-
from pixels.stac_generator.generator import DataGenerator
10+
from pixels.stac_generator.generator import Generator
1111

1212
# Path to Collection dictionary.
1313
# It can be on s3 or locally, it has to be a catalogs_dict.json representing the collection.
1414
path_collection_catalog = 's3://bucket-key/pixelsdata/collection_id_key/data/catalogs_dict.json'
1515

16-
data_training_generator = DataGenerator(
16+
data_training_generator = Generator(
1717
path_collection_catalog=path_collection_catalog,
1818
random_seed = 23,
1919
split=0.8,
@@ -38,7 +38,7 @@ Considering a dataset with 1000 samples.
3838

3939
```python
4040
# This creates a generator with the remaining 20% that were not used in the training.
41-
>>> data_evaluation_generator = DataGenerator(
41+
>>> data_evaluation_generator = Generator(
4242
... # Same as in training
4343
split=0.2,
4444
usage_type="evaluation",
@@ -52,7 +52,7 @@ Considering a dataset with 1000 samples.
5252
```python
5353
# This creates a generator with the 10% of the full dataset, only fetching samples not used in the training.
5454

55-
>>> data_evaluation_generator = DataGenerator(
55+
>>> data_evaluation_generator = Generator(
5656
... # Same as in training
5757
split=0.1,
5858
usage_type="evaluation",

0 commit comments

Comments
 (0)