MCPcopy Create free account
hub / github.com/NVIDIA/DALI / resize_dali

Function resize_dali

dali/test/python/operator_2/test_resize.py:204–237  ·  view source on GitHub ↗
(
    backend,
    input,
    channel_first,
    dtype,
    interp,
    mode,
    size,
    w,
    h,
    d,
    roi_start,
    roi_end,
    minibatch_size,
    max_size,
)

Source from the content-addressed store, hash-verified

202
203
204def resize_dali(
205 backend,
206 input,
207 channel_first,
208 dtype,
209 interp,
210 mode,
211 size,
212 w,
213 h,
214 d,
215 roi_start,
216 roi_end,
217 minibatch_size,
218 max_size,
219):
220 return resize_op(backend)(
221 input,
222 interp_type=interp,
223 dtype=dtype,
224 mode=mode,
225 resize_x=w,
226 resize_y=h,
227 resize_z=d,
228 size=size,
229 roi_start=roi_start,
230 roi_end=roi_end,
231 minibatch_size=minibatch_size,
232 max_size=max_size,
233 subpixel_scale=False,
234 ) # disable subpixel scale so we can use PIL as reference
235 # Note: PIL supports ROI, but, unlike DALI, does not support overscan. DALI routinely overscans
236 # on a subpixel level in about half of the cases, when adjusting ROI to keep subpixel aspect
237 # ratio. This precludes the use of PIL as reference for subpixel_scale.
238
239
240def ref_output_size(mode, requested_size, roi_size, max_size=None):

Callers 1

build_pipesFunction · 0.85

Calls 1

resize_opFunction · 0.85

Tested by

no test coverage detected