Skip to content

Commit 8258486

Browse files
committed
Address todos
1 parent 62ad010 commit 8258486

File tree

1 file changed

+14
-23
lines changed

1 file changed

+14
-23
lines changed

docs/index.rst

+14-23
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,24 @@ Standard pip install
2626

2727
Configuration
2828
=============
29-
Before you can use Label Maker, you must specify inputs to the data-creation process within ``config.json`` file. Below is a simple example. To see the complete list of parameters and options for imagery access, check out the XXX page.
29+
Before you can use Label Maker, you must specify inputs to the data-creation process within ``config.json`` file. Below is a simple example. To see the complete list of parameters and options for imagery access, check out the `parameters page <parameters.html>`_.
3030

3131
.. code-block:: json
32-
32+
3333
{
3434
"country": "togo",
3535
"bounding_box": [1.09725, 6.05520, 1.34582, 6.30915],
3636
"zoom": 12,
3737
"classes": [
38-
{ "name": "Roads", "filter": ["has", "highway"] },
39-
{ "name": "Buildings", "filter": ["has", "building"] }
38+
{ "name": "Roads", "filter": ["has", "highway"] },
39+
{ "name": "Buildings", "filter": ["has", "building"] }
4040
],
4141
"imagery": "http://a.tiles.mapbox.com/v4/mapbox.satellite/{z}/{x}/{y}.jpg?access_token=ACCESS_TOKEN",
4242
"background_ratio": 1,
4343
"ml_type": "classification"
4444
}
45-
4645
47-
TODO: Okay to separate config options like this? See Sphinx's RST list options as there are some recommendations
48-
TODO: Add page with full parameter list
46+
Before using this configuration, make sure to replace ``ACCESS_TOKEN`` with your `Mapbox Access Token <https://www.mapbox.com/help/how-access-tokens-work/>`_
4947

5048
Command line interface (CLI)
5149
============================
@@ -70,7 +68,8 @@ CLI Step 2: labels
7068
Retiles the OSM data to the desired zoom level, creates label data (``labels.npz``), calculates class statistics, creates visual label files (either GeoJSON or PNG files depending upon ``ml_type``). Requires the mbtiles file from the `label-maker download` step.
7169

7270
Accepts one additional flag:
73-
1. ``-s`` or ``--sparse``: *boolean* specifying if class of interest are sparse. If ``True``, only save labels for up to ``n`` background tiles, where ``n`` is equal to ``background_ratio`` times the number of tiles with a class label. Defaults to ``False``.
71+
72+
- ``-s`` or ``--sparse``: *boolean* specifying if class of interest are sparse. If ``True``, only save labels for up to ``n`` background tiles, where ``n`` is equal to ``background_ratio`` times the number of tiles with a class label. Defaults to ``False``.
7473

7574
.. code-block:: bash
7675
@@ -81,25 +80,21 @@ Accepts one additional flag:
8180
Total tiles: 1189
8281
Write out labels to data/labels.npz
8382
84-
TODO: Is bool 0/1 or True/False? Or does it matter?
85-
TODO: Is requirement correct? Should we just move these requirements to "Note" boxes?
86-
87-
CLI Step 3: preview
88-
^^^^^^^^^^^^^^^^^^^
83+
CLI Step 3: preview (optional)
84+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8985

90-
Downloads example overhead images for each class. Requires the labels.npz file from the previous step. Accepts an additional flag:
86+
Downloads example overhead images for each class. Requires the ``labels.npz`` file from the previous step.
9187

9288
Accepts one additional flag:
93-
1. ``-n`` or ``--number``: *integer* specifying number of examples images to create per class. Defaults to ``5``.
89+
90+
- ``-n`` or ``--number``: *integer* specifying number of examples images to create per class. Defaults to ``5``.
9491

9592
.. code-block:: bash
9693
9794
$ label-maker preview -n 10
9895
Writing example images to data/examples
9996
Downloading 10 tiles for class Residential
10097
101-
TODO: Requirements?
102-
10398
CLI Step 4: images
10499
^^^^^^^^^^^^^^^^^^
105100

@@ -110,11 +105,9 @@ Downloads all imagery tiles needed to create the training data. Requires the ``l
110105
$ label-maker images
111106
Downloading 1189 tiles to data/tiles
112107
113-
TODO: Requirements?
114-
115108
CLI Step 5: package
116109
^^^^^^^^^^^^^^^^^^^
117-
Bundles the images and OSM labels to create a final ``data.npz`` file. Requires the ``labels.npz`` file from the ``label-maker labels`` step and downloaded image tiles from the ``label-maker images`` step.
110+
Bundles the images and OSM labels to create a final ``data.npz`` file. Requires the ``labels.npz`` file from the ``label-maker labels`` step and downloaded image tiles from the ``label-maker images`` step.
118111

119112
.. code-block:: bash
120113
@@ -123,7 +116,7 @@ Bundles the images and OSM labels to create a final ``data.npz`` file. Requires
123116
124117
Using the packaged data
125118
=======================
126-
Once you have a create ``data.npz`` file using the above commands, you can use ```numpy.load`` <https://docs.scipy.org/doc/numpy/reference/generated/numpy.load.html>`_ to load it. For example, you can supply the created data to a `Keras <https://keras.io/>`_ ``Model`` as follows:
119+
Once you have a create ``data.npz`` file using the above commands, you can use `numpy.load <https://docs.scipy.org/doc/numpy/reference/generated/numpy.load.html>`_ to load it. For example, you can supply the created data to a `Keras <https://keras.io/>`_ ``Model`` as follows:
127120

128121
.. code-block:: bash
129122
@@ -145,8 +138,6 @@ Once you have a create ``data.npz`` file using the above commands, you can use `
145138
146139
For more detailed walkthroughs, see the `examples page <https://github.com/developmentseed/label-maker/blob/master/examples>`_.
147140

148-
TODO: move/add examples? PyTorch load example?
149-
150141
Acknowledgements
151142
================
152143

0 commit comments

Comments
 (0)