Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
MMCV
Commits
c57b8b18
Unverified
Commit
c57b8b18
authored
Sep 25, 2022
by
yxzhao
Committed by
GitHub
Sep 25, 2022
Browse files
[Docs] Fix some mistakes in data_process.md (#2283)
* correction * correction en docs
parent
936c193e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
docs/en/understand_mmcv/data_process.md
docs/en/understand_mmcv/data_process.md
+3
-3
docs/zh_cn/understand_mmcv/data_process.md
docs/zh_cn/understand_mmcv/data_process.md
+3
-3
No files found.
docs/en/understand_mmcv/data_process.md
View file @
c57b8b18
...
...
@@ -135,7 +135,7 @@ bboxes = np.array([[10, 10, 100, 120], [0, 0, 50, 50]])
patches
=
mmcv
.
imcrop
(
img
,
bboxes
)
# crop two regions, and rescale the patches by 1.2x
patches
=
mmcv
.
imcrop
(
img
,
bboxes
,
scale
_ratio
=
1.2
)
patches
=
mmcv
.
imcrop
(
img
,
bboxes
,
scale
=
1.2
)
```
#### Padding
...
...
@@ -150,14 +150,14 @@ img = mmcv.imread('tests/data/color.jpg')
img_
=
mmcv
.
impad
(
img
,
shape
=
(
1000
,
1200
),
pad_val
=
0
)
# pad the image to (1000, 1200) with different values for three channels.
img_
=
mmcv
.
impad
(
img
,
shape
=
(
1000
,
1200
),
pad_val
=
[
100
,
50
,
200
]
)
img_
=
mmcv
.
impad
(
img
,
shape
=
(
1000
,
1200
),
pad_val
=
(
100
,
50
,
200
)
)
# pad the image on left, right, top, bottom borders with all zeros
img_
=
mmcv
.
impad
(
img
,
padding
=
(
10
,
20
,
30
,
40
),
pad_val
=
0
)
# pad the image on left, right, top, bottom borders with different values
# for three channels.
img_
=
mmcv
.
impad
(
img
,
padding
=
(
10
,
20
,
30
,
40
),
pad_val
=
[
100
,
50
,
200
]
)
img_
=
mmcv
.
impad
(
img
,
padding
=
(
10
,
20
,
30
,
40
),
pad_val
=
(
100
,
50
,
200
)
)
# pad an image so that each edge is a multiple of some value.
img_
=
mmcv
.
impad_to_multiple
(
img
,
32
)
...
...
docs/zh_cn/understand_mmcv/data_process.md
View file @
c57b8b18
...
...
@@ -130,7 +130,7 @@ bboxes = np.array([[10, 10, 100, 120], [0, 0, 50, 50]])
patches
=
mmcv
.
imcrop
(
img
,
bboxes
)
# 裁剪两个区域并且缩放区域1.2倍
patches
=
mmcv
.
imcrop
(
img
,
bboxes
,
scale
_ratio
=
1.2
)
patches
=
mmcv
.
imcrop
(
img
,
bboxes
,
scale
=
1.2
)
```
#### 填充
...
...
@@ -144,13 +144,13 @@ img = mmcv.imread('tests/data/color.jpg')
img_
=
mmcv
.
impad
(
img
,
shape
=
(
1000
,
1200
),
pad_val
=
0
)
# 用给定值分别填充图像的3个通道至 (1000, 1200)
img_
=
mmcv
.
impad
(
img
,
shape
=
(
1000
,
1200
),
pad_val
=
[
100
,
50
,
200
]
)
img_
=
mmcv
.
impad
(
img
,
shape
=
(
1000
,
1200
),
pad_val
=
(
100
,
50
,
200
)
)
# 用给定值填充图像的左、右、上、下四条边
img_
=
mmcv
.
impad
(
img
,
padding
=
(
10
,
20
,
30
,
40
),
pad_val
=
0
)
# 用3个值分别填充图像的左、右、上、下四条边的3个通道
img_
=
mmcv
.
impad
(
img
,
padding
=
(
10
,
20
,
30
,
40
),
pad_val
=
[
100
,
50
,
200
]
)
img_
=
mmcv
.
impad
(
img
,
padding
=
(
10
,
20
,
30
,
40
),
pad_val
=
(
100
,
50
,
200
)
)
# 将图像的四条边填充至能够被给定值整除
img_
=
mmcv
.
impad_to_multiple
(
img
,
32
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment