Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
正统之独孤求败
mindspore
提交
aab95ea1
M
mindspore
项目概览
正统之独孤求败
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
aab95ea1
编写于
8月 18, 2020
作者:
Q
qianlong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix softdvpp python api doc
上级
07b9f0a7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
16 deletion
+16
-16
mindspore/ccsrc/minddata/dataset/kernels/image/soft_dvpp/soft_dvpp_decode_random_crop_resize_jpeg_op.cc
.../soft_dvpp/soft_dvpp_decode_random_crop_resize_jpeg_op.cc
+2
-1
mindspore/ccsrc/minddata/dataset/kernels/image/soft_dvpp/soft_dvpp_decode_resize_jpeg_op.cc
...ernels/image/soft_dvpp/soft_dvpp_decode_resize_jpeg_op.cc
+2
-3
mindspore/ccsrc/minddata/dataset/kernels/image/soft_dvpp/utils/soft_jpegd.cc
...ddata/dataset/kernels/image/soft_dvpp/utils/soft_jpegd.cc
+2
-2
mindspore/dataset/transforms/vision/c_transforms.py
mindspore/dataset/transforms/vision/c_transforms.py
+10
-10
未找到文件。
mindspore/ccsrc/minddata/dataset/kernels/image/soft_dvpp/soft_dvpp_decode_random_crop_resize_jpeg_op.cc
浏览文件 @
aab95ea1
...
...
@@ -76,7 +76,8 @@ Status SoftDvppDecodeRandomCropResizeJpegOp::Compute(const std::shared_ptr<Tenso
RETURN_IF_NOT_OK
(
CVTensor
::
CreateFromMat
(
out_rgb_img
,
&
cv_tensor
));
*
output
=
std
::
static_pointer_cast
<
Tensor
>
(
cv_tensor
);
}
catch
(
const
cv
::
Exception
&
e
)
{
RETURN_STATUS_UNEXPECTED
(
"Error in soft dvpp image decode and resize."
);
std
::
string
error
=
"Error in SoftDvppDecodeRandomCropResizeJpegOp:"
+
std
::
string
(
e
.
what
());
RETURN_STATUS_UNEXPECTED
(
error
);
}
return
Status
::
OK
();
}
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/soft_dvpp/soft_dvpp_decode_resize_jpeg_op.cc
浏览文件 @
aab95ea1
...
...
@@ -41,8 +41,6 @@ Status SoftDvppDecodeResizeJpegOp::Compute(const std::shared_ptr<Tensor> &input,
int
input_h
=
0
;
RETURN_IF_NOT_OK
(
GetJpegImageInfo
(
input
,
&
input_w
,
&
input_h
));
SoftDpCropInfo
crop_info
{
0
,
0
,
0
,
0
};
if
(
target_width_
==
0
)
{
if
(
input_h
<
input_w
)
{
CHECK_FAIL_RETURN_UNEXPECTED
(
input_h
!=
0
,
"The input height is 0"
);
...
...
@@ -71,7 +69,8 @@ Status SoftDvppDecodeResizeJpegOp::Compute(const std::shared_ptr<Tensor> &input,
RETURN_IF_NOT_OK
(
CVTensor
::
CreateFromMat
(
out_rgb_img
,
&
cv_tensor
));
*
output
=
std
::
static_pointer_cast
<
Tensor
>
(
cv_tensor
);
}
catch
(
const
cv
::
Exception
&
e
)
{
RETURN_STATUS_UNEXPECTED
(
"Error in soft dvpp image decode and resize."
);
std
::
string
error
=
"Error in SoftDvppDecodeResizeJpegOp:"
+
std
::
string
(
e
.
what
());
RETURN_STATUS_UNEXPECTED
(
error
);
}
return
Status
::
OK
();
}
...
...
mindspore/ccsrc/minddata/dataset/kernels/image/soft_dvpp/utils/soft_jpegd.cc
浏览文件 @
aab95ea1
...
...
@@ -154,13 +154,13 @@ uint32_t SoftJpegd::ConfigVpcInputData(struct VpcInfo *vpc_input_info, int32_t *
if
((
vpc_input_info
->
format
==
INPUT_YUV420_PLANNER
||
vpc_input_info
->
format
==
INPUT_YUV422_PLANNER
)
&&
(
*
width
%
num2
==
1
))
{
*
width
=
reinterpret_cast
<
int32_t
>
(
AlignUp
(
*
width
,
num2
));
JPEGD_LOGW
(
"vpc width needs align up %d, height is %d."
,
width
,
height
);
JPEGD_LOGW
(
"vpc width needs align up %d, height is %d."
,
*
width
,
*
height
);
}
if
((
vpc_input_info
->
format
==
INPUT_YUV420_PLANNER
||
vpc_input_info
->
format
==
INPUT_YUV422_PLANNER
)
&&
(
*
height
%
num2
==
1
))
{
*
height
=
reinterpret_cast
<
int32_t
>
(
AlignUp
(
*
height
,
num2
));
JPEGD_LOGW
(
"vpc height needs align up %d, height is %d."
,
width
,
height
);
JPEGD_LOGW
(
"vpc height needs align up %d, height is %d."
,
*
width
,
*
height
);
}
vpc_input_info
->
addr
=
soft_decode_out_buf_
;
...
...
mindspore/dataset/transforms/vision/c_transforms.py
浏览文件 @
aab95ea1
...
...
@@ -571,9 +571,9 @@ class RandomResizedCropWithBBox(cde.RandomCropAndResizeWithBBoxOp):
size (Union[int, sequence]): The size of the output image.
If size is an int, a square crop of size (size, size) is returned.
If size is a sequence of length 2, it should be (height, width).
scale (tuple, optional): Range
(
min, max) of respective size of the original
scale (tuple, optional): Range
[
min, max) of respective size of the original
size to be cropped (default=(0.08, 1.0)).
ratio (tuple, optional): Range
(
min, max) of aspect ratio to be cropped
ratio (tuple, optional): Range
[
min, max) of aspect ratio to be cropped
(default=(3. / 4., 4. / 3.)).
interpolation (Inter mode, optional): Image interpolation mode (default=Inter.BILINEAR).
It can be any of [Inter.BILINEAR, Inter.NEAREST, Inter.BICUBIC].
...
...
@@ -610,9 +610,9 @@ class RandomResizedCrop(cde.RandomCropAndResizeOp):
size (Union[int, sequence]): The size of the output image.
If size is an int, a square crop of size (size, size) is returned.
If size is a sequence of length 2, it should be (height, width).
scale (tuple, optional): Range
(
min, max) of respective size of the original
scale (tuple, optional): Range
[
min, max) of respective size of the original
size to be cropped (default=(0.08, 1.0)).
ratio (tuple, optional): Range
(
min, max) of aspect ratio to be cropped
ratio (tuple, optional): Range
[
min, max) of aspect ratio to be cropped
(default=(3. / 4., 4. / 3.)).
interpolation (Inter mode, optional): Image interpolation mode (default=Inter.BILINEAR).
It can be any of [Inter.BILINEAR, Inter.NEAREST, Inter.BICUBIC].
...
...
@@ -831,12 +831,12 @@ class RandomCropDecodeResize(cde.RandomCropDecodeResizeOp):
Equivalent to RandomResizedCrop, but crops before decodes.
Args:
size (Union[int, sequence]
, optional
): The size of the output image.
size (Union[int, sequence]): The size of the output image.
If size is an int, a square crop of size (size, size) is returned.
If size is a sequence of length 2, it should be (height, width).
scale (tuple, optional): Range
(
min, max) of respective size of the
scale (tuple, optional): Range
[
min, max) of respective size of the
original size to be cropped (default=(0.08, 1.0)).
ratio (tuple, optional): Range
(
min, max) of aspect ratio to be
ratio (tuple, optional): Range
[
min, max) of aspect ratio to be
cropped (default=(3. / 4., 4. / 3.)).
interpolation (Inter mode, optional): Image interpolation mode (default=Inter.BILINEAR).
It can be any of [Inter.BILINEAR, Inter.NEAREST, Inter.BICUBIC].
...
...
@@ -986,12 +986,12 @@ class SoftDvppDecodeRandomCropResizeJpeg(cde.SoftDvppDecodeRandomCropResizeJpegO
The usage scenario is consistent with SoftDvppDecodeReiszeJpeg.
Args:
size (Union[int, sequence]
, optional
): The size of the output image.
size (Union[int, sequence]): The size of the output image.
If size is an int, a square crop of size (size, size) is returned.
If size is a sequence of length 2, it should be (height, width).
scale (tuple, optional): Range
(
min, max) of respective size of the
scale (tuple, optional): Range
[
min, max) of respective size of the
original size to be cropped (default=(0.08, 1.0)).
ratio (tuple, optional): Range
(
min, max) of aspect ratio to be
ratio (tuple, optional): Range
[
min, max) of aspect ratio to be
cropped (default=(3. / 4., 4. / 3.)).
max_attempts (int, optional): The maximum number of attempts to propose a valid crop_area (default=10).
If exceeded, fall back to use center_crop instead.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录