@@ -51,7 +51,7 @@ def get_img_files(data_path, subdir="*", ext=None):
51
51
@pipeline_def
52
52
def decoder_pipe (data_path , device , use_fast_idct = False , jpeg_fancy_upsampling = False ):
53
53
inputs , labels = fn .readers .file (file_root = data_path , shard_id = 0 , num_shards = 1 , name = "Reader" )
54
- decoded = fn .experimental . decoders .image (
54
+ decoded = fn .decoders .image (
55
55
inputs ,
56
56
device = device ,
57
57
output_type = types .RGB ,
@@ -102,11 +102,11 @@ def create_decoder_slice_pipeline(data_path, device):
102
102
103
103
anchor = fn .random .uniform (range = [0.05 , 0.15 ], shape = (2 ,))
104
104
shape = fn .random .uniform (range = [0.5 , 0.7 ], shape = (2 ,))
105
- images_sliced_1 = fn .experimental . decoders .image_slice (
105
+ images_sliced_1 = fn .decoders .image_slice (
106
106
jpegs , anchor , shape , axes = (0 , 1 ), device = device
107
107
)
108
108
109
- images = fn .experimental . decoders .image (jpegs , device = device )
109
+ images = fn .decoders .image (jpegs , device = device )
110
110
images_sliced_2 = fn .slice (images , anchor , shape , axes = (0 , 1 ))
111
111
112
112
return images_sliced_1 , images_sliced_2
@@ -121,11 +121,11 @@ def create_decoder_crop_pipeline(data_path, device):
121
121
w = 242
122
122
h = 230
123
123
124
- images_crop_1 = fn .experimental . decoders .image_crop (
124
+ images_crop_1 = fn .decoders .image_crop (
125
125
jpegs , crop = (w , h ), crop_pos_x = crop_pos_x , crop_pos_y = crop_pos_y , device = device
126
126
)
127
127
128
- images = fn .experimental . decoders .image (jpegs , device = device )
128
+ images = fn .decoders .image (jpegs , device = device )
129
129
130
130
images_crop_2 = fn .crop (images , crop = (w , h ), crop_pos_x = crop_pos_x , crop_pos_y = crop_pos_y )
131
131
@@ -139,12 +139,12 @@ def create_decoder_random_crop_pipeline(data_path, device):
139
139
140
140
w = 242
141
141
h = 230
142
- images_random_crop_1 = fn .experimental . decoders .image_random_crop (
142
+ images_random_crop_1 = fn .decoders .image_random_crop (
143
143
jpegs , device = device , output_type = types .RGB , seed = seed
144
144
)
145
145
images_random_crop_1 = fn .resize (images_random_crop_1 , size = (w , h ))
146
146
147
- images = fn .experimental . decoders .image (jpegs , device = device )
147
+ images = fn .decoders .image (jpegs , device = device )
148
148
images_random_crop_2 = fn .random_resized_crop (images , size = (w , h ), seed = seed )
149
149
150
150
return images_random_crop_1 , images_random_crop_2
@@ -299,7 +299,7 @@ def test_fancy_upsampling(batch_size):
299
299
@pipeline_def (batch_size = batch_size_test , device_id = 0 , num_threads = 4 )
300
300
def img_decoder_pipe (device , out_type , files ):
301
301
encoded , _ = fn .readers .file (files = files )
302
- decoded = fn .experimental . decoders .image (encoded , device = device , output_type = out_type )
302
+ decoded = fn .decoders .image (encoded , device = device , output_type = out_type )
303
303
return decoded
304
304
305
305
@@ -338,8 +338,8 @@ def _testimpl_image_decoder_tiff_with_alpha_16bit(device, out_type, path, ext):
338
338
@pipeline_def (batch_size = 1 , device_id = 0 , num_threads = 1 )
339
339
def pipe (device , out_type , files ):
340
340
encoded , _ = fn .readers .file (files = files )
341
- decoded = fn .experimental . decoders .image (encoded , device = device , output_type = out_type )
342
- peeked_shape = fn .experimental . peek_image_shape (encoded )
341
+ decoded = fn .decoders .image (encoded , device = device , output_type = out_type )
342
+ peeked_shape = fn .peek_image_shape (encoded )
343
343
return decoded , peeked_shape
344
344
345
345
files = get_img_files (os .path .join (test_data_root , path ), ext = ext , subdir = None )
@@ -367,7 +367,7 @@ def _testimpl_image_decoder_crop_error_oob(device):
367
367
@pipeline_def (batch_size = batch_size_test , device_id = 0 , num_threads = 4 )
368
368
def pipe (device ):
369
369
encoded , _ = fn .readers .file (file_root = file_root )
370
- decoded = fn .experimental . decoders .image_crop (
370
+ decoded = fn .decoders .image_crop (
371
371
encoded , crop_w = 10000 , crop_h = 100 , device = device
372
372
)
373
373
return decoded
@@ -389,7 +389,7 @@ def _testimpl_image_decoder_slice_error_oob(device):
389
389
@pipeline_def (batch_size = batch_size_test , device_id = 0 , num_threads = 4 )
390
390
def pipe (device ):
391
391
encoded , _ = fn .readers .file (file_root = file_root )
392
- decoded = fn .experimental . decoders .image_slice (
392
+ decoded = fn .decoders .image_slice (
393
393
encoded , device = device , end = [10000 ], axes = [1 ]
394
394
)
395
395
return decoded
@@ -412,8 +412,8 @@ def test_tiff_palette():
412
412
@pipeline_def (batch_size = 2 , device_id = 0 , num_threads = 1 )
413
413
def pipe ():
414
414
encoded , _ = fn .readers .file (files = [normal , palette ])
415
- peeked_shapes = fn .experimental . peek_image_shape (encoded )
416
- decoded = fn .experimental . decoders .image (encoded , device = "cpu" )
415
+ peeked_shapes = fn .peek_image_shape (encoded )
416
+ decoded = fn .decoders .image (encoded , device = "cpu" )
417
417
return decoded , peeked_shapes
418
418
419
419
p = pipe ()
@@ -434,7 +434,7 @@ def _testimpl_image_decoder_peek_shape(
434
434
@pipeline_def (batch_size = 1 , device_id = 0 , num_threads = 1 )
435
435
def peek_shape_pipeline (file ):
436
436
encoded , _ = fn .readers .file (files = [file ])
437
- return fn .experimental . peek_image_shape (
437
+ return fn .peek_image_shape (
438
438
encoded , image_type = image_type , adjust_orientation = adjust_orientation
439
439
)
440
440
@@ -500,7 +500,7 @@ def test_image_decoder_lossless_jpeg(img_name, output_type, dtype, precision):
500
500
@pipeline_def (batch_size = 1 , device_id = device_id , num_threads = 1 )
501
501
def pipe (file ):
502
502
encoded , _ = fn .readers .file (files = [file ])
503
- decoded = fn .experimental . decoders .image (
503
+ decoded = fn .decoders .image (
504
504
encoded , device = "mixed" , dtype = dtype , output_type = output_type
505
505
)
506
506
return decoded
@@ -528,7 +528,7 @@ def test_image_decoder_lossless_jpeg_cpu_not_supported():
528
528
@pipeline_def (batch_size = 1 , device_id = 0 , num_threads = 1 )
529
529
def pipe (file ):
530
530
encoded , _ = fn .readers .file (files = [file ])
531
- decoded = fn .experimental . decoders .image (
531
+ decoded = fn .decoders .image (
532
532
encoded , device = "cpu" , dtype = types .UINT16 , output_type = types .ANY_DATA
533
533
)
534
534
return decoded
0 commit comments