Skip to content

Commit

Permalink
Address Francois' comments
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeWood committed Jun 19, 2022
1 parent a6b34e9 commit 776b1a0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
1 change: 0 additions & 1 deletion scripts/.gitignore

This file was deleted.

21 changes: 9 additions & 12 deletions scripts/cv_api_master.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@
}

BOUNDING_BOX_FORMATS = {
"path": "formats",
"title": "Bounding box formats",
"generate": [
"keras_cv.bounding_box.CENTER_XYWH",
"keras_cv.bounding_box.XYWH",
"keras_cv.bounding_box.XYXY",
"keras_cv.bounding_box.REL_XYXY",
],
"path": "formats",
"title": "Bounding box formats",
"generate": [
"keras_cv.bounding_box.CENTER_XYWH",
"keras_cv.bounding_box.XYWH",
"keras_cv.bounding_box.XYXY",
"keras_cv.bounding_box.REL_XYXY",
],
}

BOUNDING_BOX_UTILS = {
Expand All @@ -134,10 +134,7 @@
"path": "bounding_box/",
"title": "Bounding box formats and utilities",
"toc": True,
"children": [
BOUNDING_BOX_FORMATS,
BOUNDING_BOX_UTILS
]
"children": [BOUNDING_BOX_FORMATS, BOUNDING_BOX_UTILS],
}

REGULARIZATION_MASTER = {
Expand Down
4 changes: 3 additions & 1 deletion templates/keras_cv/bounding_box/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# KerasCV Bounding Boxes

All KerasCV components that process bounding boxes require a `bounding_box_format`
argument. This argument allows you to seamlessly integrate KerasCV components into
your own workflows while preserving proper behavior of the components themselves.

[The list of bounding box formats supported in KerasCV are listed in the API docs](/api/keras_cv/bounding_box/formats).
The bounding box formats supported in KerasCV
[are listed in the API docs](/api/keras_cv/bounding_box/formats)
If a format you would like to use is missing,
[feel free to open a GitHub issue on KerasCV](https://github.com/keras-team/keras-cv/issues)!
12 changes: 8 additions & 4 deletions templates/keras_cv/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,21 @@ You can also check out other versions in our
[GitHub repository](https://github.com/keras-team/keras-cv/releases).

## Quick Introduction

Create a preprocessing pipeline:

```python
import keras_cv
import tensorflow as tf
from tensorflow import keras

preprocessing_model = tf.keras.Sequential([
preprocessing_model = keras.Sequential([
keras_cv.layers.RandAugment(value_range=(0, 255))
keras_cv.layers.CutMix(),
keras_cv.layers.MixUp()
], name="preprocessing_model")
```

Augment a TensorFlow dataset:
Augment a `tf.data.Dataset`:

```python
dataset = dataset.map(lambda images, labels: {"images": images, "labels": labels})
Expand All @@ -47,6 +49,7 @@ dataset = dataset.map(lambda inputs: (inputs["images"], inputs["labels"]))
```

Create a model:

```python
densenet = keras_cv.models.DenseNet(
include_rescaling=True,
Expand All @@ -56,7 +59,8 @@ densenet = keras_cv.models.DenseNet(
densenet.compile(optimizer='adam', metrics=['accuracy'])
```

Fit your model:
Train your model:

```python
densenet.fit(dataset)
```
Expand Down

0 comments on commit 776b1a0

Please sign in to comment.