2.5K Star 8.4K Fork 4.7K

GVPMindSpore/mindspore

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
mindspore.dataset.vision.TenCrop.rst 1.05 KB
一键复制 编辑 原始数据 按行查看 历史
俞涵 提交于 2024-04-23 09:58 . modify error html links

mindspore.dataset.vision.TenCrop

.. py:class:: mindspore.dataset.vision.TenCrop(size, use_vertical_flip=False)

    在输入PIL图像的中心与四个角处分别裁剪指定尺寸大小的子图,并将其翻转图一并返回。

    参数:
        - **size** (Union[int, Sequence[int, int]]) - 裁剪子图的尺寸大小。若输入int,则以该值为边长裁剪( `size` , `size` )尺寸大小的子图;若输入Sequence[int, int],则以2个元素分别为高和宽裁剪子图。
        - **use_vertical_flip** (bool,可选) - 若为 ``True`` ,将对子图进行垂直翻转;否则进行水平翻转。默认值: ``False`` 。

    异常:
        - **TypeError** - 当 `size` 的类型不为int或Sequence[int, int]。
        - **TypeError** - 当 `use_vertical_flip` 的类型不为bool。
        - **ValueError** - 当 `size` 不为正数。

    教程样例:
        - `视觉变换样例库
          <https://www.mindspore.cn/docs/zh-CN/r2.3.0rc1/api_python/samples/dataset/vision_gallery.html>`_
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/mindspore/mindspore.git
git@gitee.com:mindspore/mindspore.git
mindspore
mindspore
mindspore
r2.3.q1

搜索帮助