Skip to content

Commit edcffbe

Browse files
committed
Small improvements to gitignore, tests, and docs
1 parent c2f903f commit edcffbe

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.circleci/config.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ jobs:
4141
label-maker package --dest integration-cl --config test/fixtures/integration/config.integration.json
4242
python test/verify-package-cl.py
4343
44-
45-
4644
# segmentation integration tests
4745
mkdir integration-sg
4846
cp test/fixtures/integration/portugal-z17.mbtiles integration-sg/portugal-z17.mbtiles

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ MANIFEST
1010
.cache
1111
data
1212
config.json
13-
stdout
14-
integration*
13+
stdout*
14+
/integration*

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Before running any commands, it is necessary to create a `config.json` file to s
4343
- `classes`: An array of classes for machine learning training. Each class is defined as an object with two required properties:
4444
- `name`: The class name
4545
- `filter`: A [Mapbox GL Filter](https://www.mapbox.com/mapbox-gl-js/style-spec#other-filter) to define any vector features matching this class. Filters are applied with the standalone [featureFilter](https://github.com/mapbox/mapbox-gl-js/tree/master/src/style-spec/feature_filter) from Mapbox GL JS.
46-
- `buffer`: The number of pixels to buffer the geometry by. This is an optional parameter to buffer the label for `object-detection` and `segmentation` tasks. Accepts any number (positive or negative). It uses [Shapely `object.buffer`](https://shapely.readthedocs.io/en/latest/manual.html#object.buffer) to calculate the final geometry
46+
- `buffer`: The number of pixels to buffer the geometry by. This is an optional parameter to buffer the label for `object-detection` and `segmentation` tasks. Accepts any number (positive or negative). It uses [Shapely `object.buffer`](https://shapely.readthedocs.io/en/latest/manual.html#object.buffer) to calculate the final geometry. You can verify that your buffer options create the desired labels by inspecting the files created in `data/labels/` after running the `labels` command.
4747
- `imagery`: A template string for a tiled imagery service. Note that you will generally need an API key to obtain images and there may be associated costs. The above example requires a [Mapbox access token](https://www.mapbox.com/help/how-access-tokens-work/)
4848
- `background_ratio`: For single-class classification problems, we need to download images with no matching class. We will download `background_ratio` times the number of images matching the one class.
4949
- `ml_type`: One of `"classification"`, `"object-detection"`, or `"segmentation"`. For the final label numpy arrays (`y_train` and `y_test`), we will produce a different label depending upon the `type`.

test/verify-labels-sg.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@
1616
}
1717

1818
labels = np.load('integration-sg/labels.npz')
19+
assert len(labels.files) == len(expected_sums.keys()) # First check number of tiles
20+
1921
for tile in labels.files:
2022
assert expected_sums[tile] == np.sum(labels[tile])

0 commit comments

Comments
 (0)