1
- // Copyright (c) 2019-2024 , NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1
+ // Copyright (c) 2019-2021 , NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
2
//
3
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
4
// you may not use this file except in compliance with the License.
@@ -163,12 +163,9 @@ allocation might be useful to determine suitable values for ``device_memory_padd
163
163
)code" ,
164
164
false );
165
165
166
- DALI_SCHEMA (legacy__decoders__Image )
166
+ DALI_SCHEMA (decoders__Image )
167
167
.DocStr(R"code( Decodes images.
168
168
169
- .. warning::
170
- This is a legacy implementation of the image decoder. Use the ``decoders`` module instead.
171
-
172
169
For jpeg images, depending on the backend selected ("mixed" and "cpu"), the implementation uses
173
170
the *nvJPEG* library or *libjpeg-turbo*, respectively. Other image formats are decoded
174
171
with *OpenCV* or other specific libraries, such as *libtiff*.
@@ -198,13 +195,10 @@ Please note that GPU acceleration for JPEG 2000 decoding is only available for C
198
195
199
196
// Fused
200
197
201
- DALI_SCHEMA (legacy__decoders__ImageCrop )
198
+ DALI_SCHEMA (decoders__ImageCrop )
202
199
.DocStr(R"code( Decodes images and extracts regions-of-interest (ROI) that are specified
203
200
by fixed window dimensions and variable anchors.
204
201
205
- .. warning::
206
- This is a legacy implementation of the image decoder. Use the ``decoders`` module instead.
207
-
208
202
When possible, the argument uses the ROI decoding APIs (for example, *libjpeg-turbo* and *nvJPEG*)
209
203
to reduce the decoding time and memory usage. When the ROI decoding is not supported for a given
210
204
image format, it will decode the entire image and crop the selected ROI.
@@ -225,12 +219,9 @@ Supported formats: JPG, BMP, PNG, TIFF, PNM, PPM, PGM, PBM, JPEG 2000, WebP.
225
219
.AddParent(" ImageDecoderAttr" )
226
220
.AddParent(" CropAttr" );
227
221
228
- DALI_SCHEMA (legacy__decoders__ImageRandomCrop )
222
+ DALI_SCHEMA (decoders__ImageRandomCrop )
229
223
.DocStr(R"code( Decodes images and randomly crops them.
230
224
231
- .. warning::
232
- This is a legacy implementation of the image decoder. Use the ``decoders`` module instead.
233
-
234
225
The cropping window's area (relative to the entire image) and aspect ratio can be restricted to
235
226
a range of values specified by ``area`` and ``aspect_ratio`` arguments, respectively.
236
227
@@ -255,12 +246,9 @@ Supported formats: JPG, BMP, PNG, TIFF, PNM, PPM, PGM, PBM, JPEG 2000, WebP.
255
246
.AddParent(" RandomCropAttr" );
256
247
257
248
258
- DALI_SCHEMA (legacy__decoders__ImageSlice )
249
+ DALI_SCHEMA (decoders__ImageSlice )
259
250
.DocStr(R"code( Decodes images and extracts regions of interest.
260
251
261
- .. warning::
262
- This is a legacy implementation of the image decoder. Use the ``decoders`` module instead.
263
-
264
252
The slice can be specified by proving the start and end coordinates, or start coordinates
265
253
and shape of the slice. Both coordinates and shapes can be provided in absolute or relative terms.
266
254
@@ -323,4 +311,58 @@ Integer coordinates are interpreted as absolute coordinates, while float coordin
323
311
interpreted as absolute or relative coordinates, depending on the value of
324
312
``normalized_shape``.)code" );
325
313
314
+
315
+ // Deprecated aliases
316
+
317
+ DALI_SCHEMA (ImageDecoder)
318
+ .DocStr(" Legacy alias for :meth:`decoders.image`." )
319
+ .NumInput(1 )
320
+ .NumOutput(1 )
321
+ .AddParent(" decoders__Image" )
322
+ .MakeDocPartiallyHidden()
323
+ .Deprecate(
324
+ " decoders__Image" ,
325
+ R"code( In DALI 1.0 all decoders were moved into a dedicated :mod:`~nvidia.dali.fn.decoders`
326
+ submodule and renamed to follow a common pattern. This is a placeholder operator with identical
327
+ functionality to allow for backward compatibility.)code" ); // Deprecated in 1.0
328
+
329
+ // Fused
330
+
331
+ DALI_SCHEMA (ImageDecoderCrop)
332
+ .DocStr(" Legacy alias for :meth:`decoders.image_crop`." )
333
+ .NumInput(1 )
334
+ .NumOutput(1 )
335
+ .AddParent(" decoders__ImageCrop" )
336
+ .MakeDocPartiallyHidden()
337
+ .Deprecate(
338
+ " decoders__ImageCrop" ,
339
+ R"code( In DALI 1.0 all decoders were moved into a dedicated :mod:`~nvidia.dali.fn.decoders`
340
+ submodule and renamed to follow a common pattern. This is a placeholder operator with identical
341
+ functionality to allow for backward compatibility.)code" ); // Deprecated in 1.0
342
+
343
+ DALI_SCHEMA (ImageDecoderRandomCrop)
344
+ .DocStr(" Legacy alias for :meth:`decoders.image_random_crop`." )
345
+ .NumInput(1 )
346
+ .NumOutput(1 )
347
+ .AddParent(" decoders__ImageRandomCrop" )
348
+ .MakeDocPartiallyHidden()
349
+ .Deprecate(
350
+ " decoders__ImageRandomCrop" ,
351
+ R"code( In DALI 1.0 all decoders were moved into a dedicated :mod:`~nvidia.dali.fn.decoders`
352
+ submodule and renamed to follow a common pattern. This is a placeholder operator with identical
353
+ functionality to allow for backward compatibility.)code" ); // Deprecated in 1.0
354
+
355
+
356
+ DALI_SCHEMA (ImageDecoderSlice)
357
+ .DocStr(" Legacy alias for :meth:`decoders.image_slice`." )
358
+ .NumInput(1 , 3 )
359
+ .NumOutput(1 )
360
+ .AddParent(" decoders__ImageSlice" )
361
+ .MakeDocPartiallyHidden()
362
+ .Deprecate(
363
+ " decoders__ImageSlice" ,
364
+ R"code( In DALI 1.0 all decoders were moved into a dedicated :mod:`~nvidia.dali.fn.decoders`
365
+ submodule and renamed to follow a common pattern. This is a placeholder operator with identical
366
+ functionality to allow for backward compatibility.)code" ); // Deprecated in 1.0
367
+
326
368
} // namespace dali
0 commit comments