Transforms bounding boxes so that the boxes remain in the same place in the image after the image is pasted on a larger canvas.
Corner coordinates are transformed according to the following formula:
(x', y') = (x/ratio + paste_x', y/ratio + paste_y')
Box sizes (if xywh
is used) are transformed according to the following formula:
(w', h') = (w/ratio, h/ratio)
Where:
paste_x' = paste_x * (ratio - 1)/ratio paste_y' = paste_y * (ratio - 1)/ratio
The paste coordinates are normalized so that (0,0)
aligns the image to top-left of the canvas and (1,1)
aligns it to bottom-right.
âcpuâ
__input¶ (TensorList) â Input to the operator.
bytes_per_sample_hint¶ (int or list of int, optional, default = [0]) â
Output size hint, in bytes per sample.
If specified, the operatorâs outputs residing in GPU or page-locked host memory will be preallocated to accommodate a batch of samples of this size.
ltrb¶ (bool, optional, default = False) â True for ltrb
or False for xywh
.
paste_x¶ (float or TensorList of float, optional, default = 0.5) â Horizontal position of the paste in image coordinates (0.0 - 1.0).
paste_y¶ (float or TensorList of float, optional, default = 0.5) â Vertical position of the paste in image coordinates (0.0 - 1.0).
preserve¶ (bool, optional, default = False) â Prevents the operator from being removed from the graph even if its outputs are not used.
ratio¶ (float or TensorList of float) â Ratio of the canvas size to the input size; the value must be at least 1.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4