mindspore/docs/api/api_python/ops/mindspore.ops.CheckValid.rst

22 lines
1.0 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.ops.CheckValid
=========================
.. py:class:: mindspore.ops.CheckValid
检查边界框。
检查由 `bboxes` 指定的一些边框是否是有效的。
如果边框在由 `img_metas` 确定的边界内部则返回True否则返回False。
输入:
- **bboxes** (Tensor) - shape大小为 :math:`(N, 4)`:math:`N` 表示边界框的数量, `4` 表示 `x0``x1``y0``y` 。数据类型必须是float16或float32。
- **img_metas** (Tensor) - 原始图片的信息 `(长度, 宽度, 比率)` ,指定有效边界为 `(长度 * 比率, 宽度 * 比率)` 。数据类型必须是float16或float32。
输出:
Tensorshape为 :math:`(N,)` 类型为bool指出边界框是否在图片内。 `True` 表示在, `False` 表示不在。
异常:
- **TypeError** - 如果 `bboxes` 或者 `img_metas` 不是Tensor。
- **TypeError** - 如果 `bboxes` 或者 `img_metas` 的数据类型既不是float16也不是float32。