Загрузка
Random IoU crop transformation from “SSD: Single Shot MultiBox Detector”.
This transformation requires an image or video data and tv_tensors.BoundingBoxes in the input.
If the input is a torch.Tensor or a TVTensor (e.g. Image,
Video, BoundingBoxes etc.)
it can have arbitrary number of leading batch dimensions. For example,
the image can have [..., C, H, W] shape. A bounding box can have [..., 4] shape.
min_scale (float, optional) – Minimum factors to scale the input size.
max_scale (float, optional) – Maximum factors to scale the input size.
min_aspect_ratio (float, optional) – Minimum aspect ratio for the cropped image or video.
max_aspect_ratio (float, optional) – Maximum aspect ratio for the cropped image or video.
sampler_options (list of python:float, optional) – List of minimal IoU (Jaccard) overlap between all the boxes and
a cropped image or video. Default, None which corresponds to
Examples using RandomIoUCrop:
Transforms v2: End-to-end object detection/segmentation example
[0.0, 0.1, 0.3, 0.5, 0.7, 0.9, 1.0]trials (int, optional) – Number of trials to find a crop for a given value of minimal IoU (Jaccard) overlap. Default, 40.