Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace one letter import in docs #5403

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/source/image_classification.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ Now apply some augmentations with `albumentations`. You'll randomly crop the ima

```py
>>> import cv2
>>> import albumentations as A
>>> import albumentations
>>> import numpy as np

>>> transform = A.Compose([
... A.RandomCrop(width=256, height=256),
... A.HorizontalFlip(p=0.5),
... A.RandomBrightnessContrast(p=0.2),
>>> transform = albumentations.Compose([
... albumentations.RandomCrop(width=256, height=256),
... albumentations.HorizontalFlip(p=0.5),
... albumentations.RandomBrightnessContrast(p=0.2),
... ])
```

Expand Down
12 changes: 6 additions & 6 deletions docs/source/object_detection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ With `albumentations`, you can apply transforms that will affect the image while
`albumentations` expects the image to be in BGR format, not RGB, so you'll have to convert the image before applying the transform.

```py
>>> import albumentations as A
>>> import albumentations
>>> import numpy as np

>>> transform = A.Compose([
... A.Resize(480, 480),
... A.HorizontalFlip(p=1.0),
... A.RandomBrightnessContrast(p=1.0),
... ], bbox_params=A.BboxParams(format='coco', label_fields=['category']))
>>> transform = albumentations.Compose([
... albumentations.Resize(480, 480),
... albumentations.HorizontalFlip(p=1.0),
... albumentations.RandomBrightnessContrast(p=1.0),
... ], bbox_params=albumentations.BboxParams(format='coco', label_fields=['category']))

>>> # RGB PIL Image -> BGR Numpy array
>>> image = np.flip(np.array(example['image']), -1)
Expand Down
8 changes: 4 additions & 4 deletions docs/source/semantic_segmentation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ After defining the color palette, you should be ready to visualize some overlays
Now apply some augmentations with `albumentations`. You’ll first resize the image and adjust its brightness.

```py
>>> import albumentations as A
>>> import albumentations

>>> transform = A.Compose(
>>> transform = albumentations.Compose(
... [
... A.Resize(256, 256),
... A.RandomBrightnessContrast(brightness_limit=0.3, contrast_limit=0.3, p=0.5),
... albumentations.Resize(256, 256),
... albumentations.RandomBrightnessContrast(brightness_limit=0.3, contrast_limit=0.3, p=0.5),
... ]
... )
```
Expand Down