ClampKeyPoints¶ class torchvision.transforms.v2.ClampKeyPoints[source]¶ 将关键点约束到其对应的图像尺寸。 约束是根据关键点的 canvas_size 元数据完成的。 transform(inpt: KeyPoints, params: dict[str, Any]) → KeyPoints[source]¶ 用于覆盖自定义变换的方法。 请参阅 如何编写自己的 v2 变换