Skip to content

Commit acc3dc8

Browse files
committed
fix newlines in doc
1 parent c09f3d1 commit acc3dc8

File tree

1 file changed

+11
-25
lines changed

1 file changed

+11
-25
lines changed

docs/literate/projective/gallery.md

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ image = Image(imagedata)
3636
apply(tfm, image) |> itemdata
3737
```
3838

39-
Now let's say we want to train a light house detector and have a bounding box
40-
for the light house. We can use the [`BoundingBox`](#) item to represent it.
41-
It takes the two corners of the bounding rectangle as the first argument. As
42-
the second argument we have to pass the size of the corresponding image.
39+
Now let's say we want to train a light house detector and have a bounding box for the light house. We can use the [`BoundingBox`](#) item to represent it. It takes the two corners of the bounding rectangle as the first argument. As the second argument we have to pass the size of the corresponding image.
4340

4441
{cell=main}
4542
```julia
@@ -52,13 +49,9 @@ bbox = BoundingBox(points, size(imagedata))
5249
```julia
5350
showitems((image, bbox))
5451
```
55-
If we apply transformations like translation and cropping
56-
to the image, then the same transformations have to be applied to the bounding
57-
box. Otherwise, the bounding box will no longer match up with the light house.
52+
If we apply transformations like translation and cropping to the image, then the same transformations have to be applied to the bounding box. Otherwise, the bounding box will no longer match up with the light house.
5853

59-
Another problem can occur with stochastic transformations like [`RandomResizeCrop`](#).
60-
If we apply it separately to the image and the bounding box, they will be cropped from
61-
slightly different locations:
54+
Another problem can occur with stochastic transformations like [`RandomResizeCrop`](#). If we apply it separately to the image and the bounding box, they will be cropped from slightly different locations:
6255

6356
{cell=main}
6457
```julia
@@ -68,22 +61,18 @@ showitems((
6861
apply(tfm, bbox)
6962
))
7063
```
71-
Instead, pass a tuple of the items to a single `apply` call so the same
72-
random state will be used for both image and bounding box:
64+
Instead, pass a tuple of the items to a single `apply` call so the same random state will be used for both image and bounding box:
7365

7466
{cell=main}
7567
```julia
7668
apply(tfm, (image, bbox)) |> showitems
7769
```
78-
!!! info "3D Projective dimensions"
79-
80-
We'll use a 2-dimensional [`Image`](#) and [`BoundingBox`](#) here, but you can apply
81-
most projective transformations to any spatial item (including [`Keypoints`](#),
82-
[`MaskBinary`](#) and [`MaskMulti`](#)) in 3 dimensions.
8370

84-
Of course, you have to create a 3-dimensional transformation, i.e.
85-
`CenterCrop((128, 128, 128))` instead of `CenterCrop((128, 128))`.
71+
!!! info "3D Projective dimensions"
8672

73+
We'll use a 2-dimensional [`Image`](#) and [`BoundingBox`](#) here, but you can apply most projective transformations to any spatial item (including [`Keypoints`](#), [`MaskBinary`](#) and [`MaskMulti`](#)) in 3 dimensions.
74+
75+
Of course, you have to create a 3-dimensional transformation, i.e. `CenterCrop((128, 128, 128))` instead of `CenterCrop((128, 128))`.
8776

8877
## Gallery
8978
{cell=main style="display:none;" result=false}
@@ -110,8 +99,7 @@ end
11099

111100
### [`RandomResizeCrop`](#)`(sz)`
112101

113-
Resizes the sides so that one of them is no longer than `sz` and
114-
crops a region of size `sz` *from a random location*.
102+
Resizes the sides so that one of them is no longer than `sz` and crops a region of size `sz` *from a random location*.
115103

116104
{cell=main result=false}
117105
```julia
@@ -125,8 +113,7 @@ o = showtransform(tfm, (image, bbox), 6, ncol=6)
125113

126114
### [`CenterResizeCrop`](#)
127115

128-
Resizes the sides so that one of them is no longer than `sz` and
129-
crops a region of size `sz` *from the center*.
116+
Resizes the sides so that one of them is no longer than `sz` and crops a region of size `sz` *from the center*.
130117

131118
{cell=main result=false}
132119
```julia
@@ -162,8 +149,7 @@ o = showtransforms(tfms, (image, bbox))
162149

163150
### [`FlipX`](#), [`FlipY`](#), [`Reflect`](#)
164151

165-
Flip the data on the horizontally and vertically, respectively. More generally, reflect
166-
around an angle from the x-axis.
152+
Flip the data on the horizontally and vertically, respectively. More generally, reflect around an angle from the x-axis.
167153

168154
{cell=main result=false}
169155
```julia

0 commit comments

Comments
 (0)