/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocal/checkouts/develop/rocAL/include/api/rocal_api_data_loaders.h Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocal/checkouts/develop/rocAL/include/api/rocal_api_data_loaders.h Source File#

rocAL: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocal/checkouts/develop/rocAL/include/api/rocal_api_data_loaders.h Source File
rocal_api_data_loaders.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2019 - 2023 Advanced Micro Devices, Inc. All rights reserved.
3 
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10 
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13 
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 THE SOFTWARE.
21 */
22 
23 #ifndef MIVISIONX_ROCAL_API_DATA_LOADERS_H
24 #define MIVISIONX_ROCAL_API_DATA_LOADERS_H
25 #include "rocal_api_types.h"
26 
51 extern "C" RocalTensor ROCAL_API_CALL rocalJpegFileSource(RocalContext context,
52  const char* source_path,
53  RocalImageColor rocal_color_format,
54  unsigned internal_shard_count,
55  bool is_output,
56  bool shuffle = false,
57  bool loop = false,
59  unsigned max_width = 0, unsigned max_height = 0, RocalDecoderType rocal_decoder_type = RocalDecoderType::ROCAL_DECODER_TJPEG,
60  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
61 
81  const char* source_path,
82  RocalImageColor rocal_color_format,
83  unsigned shard_id,
84  unsigned shard_count,
85  bool is_output,
86  bool shuffle = false,
87  bool loop = false,
89  unsigned max_width = 0, unsigned max_height = 0, RocalDecoderType rocal_decoder_type = RocalDecoderType::ROCAL_DECODER_TJPEG,
90  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
91 
107 extern "C" RocalTensor ROCAL_API_CALL rocalSequenceReader(RocalContext context,
108  const char* source_path,
109  RocalImageColor rocal_color_format,
110  unsigned internal_shard_count,
111  unsigned sequence_length,
112  bool is_output,
113  bool shuffle = false,
114  bool loop = false,
115  unsigned step = 0,
116  unsigned stride = 0,
117  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
118 
136  const char* source_path,
137  RocalImageColor rocal_color_format,
138  unsigned shard_id,
139  unsigned shard_count,
140  unsigned sequence_length,
141  bool is_output,
142  bool shuffle = false,
143  bool loop = false,
144  unsigned step = 0,
145  unsigned stride = 0,
146  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
147 
163 extern "C" RocalTensor ROCAL_API_CALL rocalJpegCOCOFileSource(RocalContext context,
164  const char* source_path,
165  const char* json_path,
166  RocalImageColor color_format,
167  unsigned internal_shard_count,
168  bool is_output,
169  bool shuffle = false,
170  bool loop = false,
172  unsigned max_width = 0, unsigned max_height = 0,
174  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
175 
194  const char* source_path,
195  const char* json_path,
196  RocalImageColor rocal_color_format,
197  unsigned internal_shard_count,
198  bool is_output,
199  std::vector<float>& area_factor,
200  std::vector<float>& aspect_ratio,
201  unsigned num_attempts,
202  bool shuffle = false,
203  bool loop = false,
205  unsigned max_width = 0, unsigned max_height = 0,
206  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
207 
226  const char* source_path,
227  const char* json_path,
228  RocalImageColor rocal_color_format,
229  unsigned shard_id,
230  unsigned shard_count,
231  bool is_output,
232  std::vector<float>& area_factor,
233  std::vector<float>& aspect_ratio,
234  unsigned num_attempts,
235  bool shuffle = false,
236  bool loop = false,
238  unsigned max_width = 0, unsigned max_height = 0,
239  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
240 
258  const char* source_path,
259  const char* json_path,
260  RocalImageColor color_format,
261  unsigned shard_id,
262  unsigned shard_count,
263  bool is_output,
264  bool shuffle = false,
265  bool loop = false,
267  unsigned max_width = 0, unsigned max_height = 0,
269  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
270 
287  const char* source_path,
288  RocalImageColor rocal_color_format,
289  unsigned internal_shard_count,
290  bool is_output,
291  bool shuffle = false,
292  bool loop = false,
294  unsigned max_width = 0, unsigned max_height = 0,
296  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
297 
316  const char* source_path,
317  RocalImageColor rocal_color_format,
318  unsigned shard_id,
319  unsigned shard_count,
320  bool is_output,
321  bool shuffle = false,
322  bool loop = false,
324  unsigned max_width = 0, unsigned max_height = 0,
326  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
327 
345  const char* source_path,
346  RocalImageColor rocal_color_format,
347  unsigned internal_shard_count,
348  bool is_output,
349  bool shuffle = false,
350  bool loop = false,
352  unsigned max_width = 0, unsigned max_height = 0,
354  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
355 
374  const char* source_path,
375  RocalImageColor rocal_color_format,
376  unsigned shard_id,
377  unsigned shard_count,
378  bool is_output,
379  bool shuffle = false,
380  bool loop = false,
382  unsigned max_width = 0, unsigned max_height = 0,
384  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
385 
402 extern "C" RocalTensor ROCAL_API_CALL rocalMXNetRecordSource(RocalContext context,
403  const char* source_path,
404  RocalImageColor rocal_color_format,
405  unsigned internal_shard_count,
406  bool is_output,
407  bool shuffle = false,
408  bool loop = false,
410  unsigned max_width = 0, unsigned max_height = 0,
412  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
413 
432  const char* source_path,
433  RocalImageColor rocal_color_format,
434  unsigned shard_id,
435  unsigned shard_count,
436  bool is_output,
437  bool shuffle = false,
438  bool loop = false,
440  unsigned max_width = 0, unsigned max_height = 0,
442  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
443 
462 extern "C" RocalTensor ROCAL_API_CALL rocalFusedJpegCrop(RocalContext context,
463  const char* source_path,
464  RocalImageColor rocal_color_format,
465  unsigned num_threads,
466  bool is_output,
467  std::vector<float>& area_factor,
468  std::vector<float>& aspect_ratio,
469  unsigned num_attempts,
470  bool shuffle = false,
471  bool loop = false,
473  unsigned max_width = 0, unsigned max_height = 0,
474  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
475 
494  const char* source_path,
495  RocalImageColor color_format,
496  unsigned shard_id,
497  unsigned shard_count,
498  bool is_output,
499  std::vector<float>& area_factor,
500  std::vector<float>& aspect_ratio,
501  unsigned num_attempts,
502  bool shuffle = false,
503  bool loop = false,
505  unsigned max_width = 0, unsigned max_height = 0,
506  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
507 
524 extern "C" RocalTensor ROCAL_API_CALL rocalJpegTFRecordSource(RocalContext context,
525  const char* source_path,
526  RocalImageColor rocal_color_format,
527  unsigned internal_shard_count,
528  bool is_output,
529  const char* user_key_for_encoded,
530  const char* user_key_for_filename,
531  bool shuffle = false,
532  bool loop = false,
534  unsigned max_width = 0, unsigned max_height = 0,
536  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
537 
556  const char* source_path,
557  RocalImageColor rocal_color_format,
558  unsigned shard_id,
559  unsigned shard_count,
560  bool is_output,
561  bool shuffle = false,
562  bool loop = false,
564  unsigned max_width = 0, unsigned max_height = 0,
566  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
567 
581 extern "C" RocalTensor ROCAL_API_CALL rocalRawTFRecordSource(RocalContext p_context,
582  const char* source_path,
583  const char* user_key_for_raw,
584  const char* user_key_for_filename,
585  RocalImageColor rocal_color_format,
586  bool is_output,
587  bool shuffle = false,
588  bool loop = false,
589  unsigned out_width = 0, unsigned out_height = 0,
590  const char* record_name_prefix = "",
591  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
592 
609  const char* source_path,
610  RocalImageColor rocal_color_format,
611  unsigned shard_id,
612  unsigned shard_count,
613  bool is_output,
614  bool shuffle = false,
615  bool loop = false,
616  unsigned out_width = 0, unsigned out_height = 0,
617  const char* record_name_prefix = "",
618  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
619 
638 extern "C" RocalTensor ROCAL_API_CALL rocalVideoFileSource(RocalContext context,
639  const char* source_path,
640  RocalImageColor color_format,
641  RocalDecodeDevice rocal_decode_device,
642  unsigned internal_shard_count,
643  unsigned sequence_length,
644  bool is_output = false,
645  bool shuffle = false,
646  bool loop = false,
647  unsigned step = 0,
648  unsigned stride = 0,
649  bool file_list_frame_num = true,
650  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
651 
671  const char* source_path,
672  RocalImageColor color_format,
673  RocalDecodeDevice rocal_decode_device,
674  unsigned shard_id,
675  unsigned shard_count,
676  unsigned sequence_length,
677  bool shuffle = false,
678  bool is_output = false,
679  bool loop = false,
680  unsigned step = 0,
681  unsigned stride = 0,
682  bool file_list_frame_num = true,
683  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
684 
704 extern "C" RocalTensor ROCAL_API_CALL rocalVideoFileResize(RocalContext context,
705  const char* source_path,
706  RocalImageColor color_format,
707  RocalDecodeDevice rocal_decode_device,
708  unsigned internal_shard_count,
709  unsigned sequence_length,
710  unsigned dest_width,
711  unsigned dest_height,
712  bool shuffle = false,
713  bool is_output = false,
714  bool loop = false,
715  unsigned step = 0,
716  unsigned stride = 0,
717  bool file_list_frame_num = true,
719  std::vector<unsigned> max_size = {},
720  unsigned resize_shorter = 0,
721  unsigned resize_longer = 0,
723  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
724 
746  const char* source_path,
747  RocalImageColor color_format,
748  RocalDecodeDevice rocal_decode_device,
749  unsigned shard_id,
750  unsigned shard_count,
751  unsigned sequence_length,
752  unsigned dest_width,
753  unsigned dest_height,
754  bool shuffle = false,
755  bool is_output = false,
756  bool loop = false,
757  unsigned step = 0,
758  unsigned stride = 0,
759  bool file_list_frame_num = true,
761  std::vector<unsigned> max_size = {},
762  unsigned resize_shorter = 0,
763  unsigned resize_longer = 0,
765  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
766 
779 extern "C" RocalTensor ROCAL_API_CALL rocalRawCIFAR10Source(RocalContext context,
780  const char* source_path,
781  RocalImageColor color_format,
782  bool is_output,
783  unsigned out_width, unsigned out_height, const char* filename_prefix = "",
784  bool loop = false);
785 
792 
813  const char* source_path,
814  RocalImageColor rocal_color_format,
815  unsigned shard_id,
816  unsigned shard_count,
817  bool is_output,
818  std::vector<float>& area_factor,
819  std::vector<float>& aspect_ratio,
820  unsigned num_attempts,
821  bool shuffle = false,
822  bool loop = false,
824  unsigned max_width = 0, unsigned max_height = 0,
825  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
826 
844  const char* source_path,
845  RocalImageColor rocal_color_format,
846  unsigned shard_id,
847  unsigned shard_count,
848  bool is_output,
849  std::vector<float>& area_factor,
850  std::vector<float>& aspect_ratio,
851  unsigned num_attempts,
852  bool shuffle = false,
853  bool loop = false,
855  unsigned max_width = 0, unsigned max_height = 0,
856  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
872 extern "C" RocalTensor ROCAL_API_CALL rocalJpegExternalFileSource(RocalContext p_context,
873  RocalImageColor rocal_color_format,
874  bool is_output = false,
875  bool shuffle = false,
876  bool loop = false,
878  unsigned max_width = 0, unsigned max_height = 0,
881  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
882 
899 extern "C" RocalTensor ROCAL_API_CALL rocalAudioFileSource(RocalContext context,
900  const char* source_path,
901  const char* source_file_list_path,
902  unsigned shard_count,
903  bool is_output,
904  bool shuffle = false,
905  bool loop = false,
906  bool downmix = false,
908  unsigned max_decoded_samples = 0,
909  unsigned max_decoded_channels = 0,
910  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
911 
930  const char* source_path,
931  const char* source_file_list_path,
932  unsigned shard_id,
933  unsigned shard_count,
934  bool is_output,
935  bool shuffle = false,
936  bool loop = false,
937  bool downmix = false,
939  unsigned max_decoded_samples = 0,
940  unsigned max_decoded_channels = 0,
941  RocalShardingInfo rocal_sharding_info = RocalShardingInfo());
942 
943 #endif // MIVISIONX_ROCAL_API_DATA_LOADERS_H
RocalTensor ROCAL_API_CALL rocalMXNetRecordSource(RocalContext context, const char *source_path, RocalImageColor rocal_color_format, unsigned internal_shard_count, bool is_output, bool shuffle=false, bool loop=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MOST_FREQUENT_SIZE, unsigned max_width=0, unsigned max_height=0, RocalDecoderType rocal_decoder_type=RocalDecoderType::ROCAL_DECODER_TJPEG, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates JPEG image reader and decoder for MXNet records. It allocates the resources and objects requi...
RocalTensor ROCAL_API_CALL rocalVideoFileResizeSingleShard(RocalContext context, const char *source_path, RocalImageColor color_format, RocalDecodeDevice rocal_decode_device, unsigned shard_id, unsigned shard_count, unsigned sequence_length, unsigned dest_width, unsigned dest_height, bool shuffle=false, bool is_output=false, bool loop=false, unsigned step=0, unsigned stride=0, bool file_list_frame_num=true, RocalResizeScalingMode scaling_mode=ROCAL_SCALING_MODE_DEFAULT, std::vector< unsigned > max_size={}, unsigned resize_shorter=0, unsigned resize_longer=0, RocalResizeInterpolationType interpolation_type=ROCAL_LINEAR_INTERPOLATION, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates a video reader and decoder as a source. It allocates the resources and objects required to re...
RocalTensor ROCAL_API_CALL rocalJpegExternalFileSource(RocalContext p_context, RocalImageColor rocal_color_format, bool is_output=false, bool shuffle=false, bool loop=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MOST_FREQUENT_SIZE, unsigned max_width=0, unsigned max_height=0, RocalDecoderType rocal_decoder_type=RocalDecoderType::ROCAL_DECODER_TJPEG, RocalExternalSourceMode external_source_mode=RocalExternalSourceMode::ROCAL_EXTSOURCE_FNAME, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates JPEG external source image reader.
RocalTensor ROCAL_API_CALL rocalJpegCOCOFileSourcePartialSingleShard(RocalContext p_context, const char *source_path, const char *json_path, RocalImageColor rocal_color_format, unsigned shard_id, unsigned shard_count, bool is_output, std::vector< float > &area_factor, std::vector< float > &aspect_ratio, unsigned num_attempts, bool shuffle=false, bool loop=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MOST_FREQUENT_SIZE, unsigned max_width=0, unsigned max_height=0, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates JPEG image reader and partial decoder. It allocates the resources and objects required to rea...
RocalTensor ROCAL_API_CALL rocalJpegCaffe2LMDBRecordSourcePartialSingleShard(RocalContext p_context, const char *source_path, RocalImageColor rocal_color_format, unsigned shard_id, unsigned shard_count, bool is_output, std::vector< float > &area_factor, std::vector< float > &aspect_ratio, unsigned num_attempts, bool shuffle=false, bool loop=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MOST_FREQUENT_SIZE, unsigned max_width=0, unsigned max_height=0, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates JPEG image reader and partial decoder for Caffe2 LMDB records. It allocates the resources and...
RocalTensor ROCAL_API_CALL rocalRawTFRecordSource(RocalContext p_context, const char *source_path, const char *user_key_for_raw, const char *user_key_for_filename, RocalImageColor rocal_color_format, bool is_output, bool shuffle=false, bool loop=false, unsigned out_width=0, unsigned out_height=0, const char *record_name_prefix="", RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates Raw image loader. It allocates the resources and objects required to load images stored on th...
RocalTensor ROCAL_API_CALL rocalJpegCaffeLMDBRecordSource(RocalContext context, const char *source_path, RocalImageColor rocal_color_format, unsigned internal_shard_count, bool is_output, bool shuffle=false, bool loop=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MOST_FREQUENT_SIZE, unsigned max_width=0, unsigned max_height=0, RocalDecoderType rocal_decoder_type=RocalDecoderType::ROCAL_DECODER_TJPEG, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates JPEG image reader and decoder for Caffe LMDB records. It allocates the resources and objects ...
RocalTensor ROCAL_API_CALL rocalRawCIFAR10Source(RocalContext context, const char *source_path, RocalImageColor color_format, bool is_output, unsigned out_width, unsigned out_height, const char *filename_prefix="", bool loop=false)
Creates CIFAR10 raw data reader and loader. It allocates the resources and objects required to read r...
RocalTensor ROCAL_API_CALL rocalJpegCOCOFileSource(RocalContext context, const char *source_path, const char *json_path, RocalImageColor color_format, unsigned internal_shard_count, bool is_output, bool shuffle=false, bool loop=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MOST_FREQUENT_SIZE, unsigned max_width=0, unsigned max_height=0, RocalDecoderType rocal_decoder_type=RocalDecoderType::ROCAL_DECODER_TJPEG, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
JPEG image reader and decoder. It allocates the resources and objects required to read and decode COC...
RocalTensor ROCAL_API_CALL rocalSequenceReaderSingleShard(RocalContext context, const char *source_path, RocalImageColor rocal_color_format, unsigned shard_id, unsigned shard_count, unsigned sequence_length, bool is_output, bool shuffle=false, bool loop=false, unsigned step=0, unsigned stride=0, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates JPEG image reader and decoder. Reads [Frames] sequences from a directory representing a colle...
RocalTensor ROCAL_API_CALL rocalFusedJpegCropSingleShard(RocalContext context, const char *source_path, RocalImageColor color_format, unsigned shard_id, unsigned shard_count, bool is_output, std::vector< float > &area_factor, std::vector< float > &aspect_ratio, unsigned num_attempts, bool shuffle=false, bool loop=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MOST_FREQUENT_SIZE, unsigned max_width=0, unsigned max_height=0, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates JPEG image reader and partial decoder. It allocates the resources and objects required to rea...
RocalTensor ROCAL_API_CALL rocalJpegFileSource(RocalContext context, const char *source_path, RocalImageColor rocal_color_format, unsigned internal_shard_count, bool is_output, bool shuffle=false, bool loop=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MOST_FREQUENT_SIZE, unsigned max_width=0, unsigned max_height=0, RocalDecoderType rocal_decoder_type=RocalDecoderType::ROCAL_DECODER_TJPEG, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates JPEG image reader and decoder. It allocates the resources and objects required to read and de...
RocalTensor ROCAL_API_CALL rocalJpegTFRecordSource(RocalContext context, const char *source_path, RocalImageColor rocal_color_format, unsigned internal_shard_count, bool is_output, const char *user_key_for_encoded, const char *user_key_for_filename, bool shuffle=false, bool loop=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MOST_FREQUENT_SIZE, unsigned max_width=0, unsigned max_height=0, RocalDecoderType rocal_decoder_type=RocalDecoderType::ROCAL_DECODER_TJPEG, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates TensorFlow records JPEG image reader and decoder. It allocates the resources and objects requ...
RocalTensor ROCAL_API_CALL rocalJpegFileSourceSingleShard(RocalContext context, const char *source_path, RocalImageColor rocal_color_format, unsigned shard_id, unsigned shard_count, bool is_output, bool shuffle=false, bool loop=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MOST_FREQUENT_SIZE, unsigned max_width=0, unsigned max_height=0, RocalDecoderType rocal_decoder_type=RocalDecoderType::ROCAL_DECODER_TJPEG, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates JPEG image reader and decoder. It allocates the resources and objects required to read and de...
RocalTensor ROCAL_API_CALL rocalSequenceReader(RocalContext context, const char *source_path, RocalImageColor rocal_color_format, unsigned internal_shard_count, unsigned sequence_length, bool is_output, bool shuffle=false, bool loop=false, unsigned step=0, unsigned stride=0, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates JPEG image reader and decoder. Reads [Frames] sequences from a directory representing a colle...
RocalTensor ROCAL_API_CALL rocalFusedJpegCrop(RocalContext context, const char *source_path, RocalImageColor rocal_color_format, unsigned num_threads, bool is_output, std::vector< float > &area_factor, std::vector< float > &aspect_ratio, unsigned num_attempts, bool shuffle=false, bool loop=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MOST_FREQUENT_SIZE, unsigned max_width=0, unsigned max_height=0, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates JPEG image reader and partial decoder. It allocates the resources and objects required to rea...
RocalTensor ROCAL_API_CALL rocalJpegCaffeLMDBRecordSourcePartialSingleShard(RocalContext p_context, const char *source_path, RocalImageColor rocal_color_format, unsigned shard_id, unsigned shard_count, bool is_output, std::vector< float > &area_factor, std::vector< float > &aspect_ratio, unsigned num_attempts, bool shuffle=false, bool loop=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MOST_FREQUENT_SIZE, unsigned max_width=0, unsigned max_height=0, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates JPEG image reader and partial decoder for Caffe LMDB records. It allocates the resources and ...
RocalTensor ROCAL_API_CALL rocalJpegCaffeLMDBRecordSourceSingleShard(RocalContext p_context, const char *source_path, RocalImageColor rocal_color_format, unsigned shard_id, unsigned shard_count, bool is_output, bool shuffle=false, bool loop=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MOST_FREQUENT_SIZE, unsigned max_width=0, unsigned max_height=0, RocalDecoderType rocal_decoder_type=RocalDecoderType::ROCAL_DECODER_TJPEG, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates JPEG image reader and decoder for Caffe LMDB records. It allocates the resources and objects ...
RocalTensor ROCAL_API_CALL rocalJpegCaffe2LMDBRecordSource(RocalContext context, const char *source_path, RocalImageColor rocal_color_format, unsigned internal_shard_count, bool is_output, bool shuffle=false, bool loop=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MOST_FREQUENT_SIZE, unsigned max_width=0, unsigned max_height=0, RocalDecoderType rocal_decoder_type=RocalDecoderType::ROCAL_DECODER_TJPEG, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates JPEG image reader and decoder for Caffe2 LMDB records. It allocates the resources and objects...
RocalTensor ROCAL_API_CALL rocalJpegCaffe2LMDBRecordSourceSingleShard(RocalContext p_context, const char *source_path, RocalImageColor rocal_color_format, unsigned shard_id, unsigned shard_count, bool is_output, bool shuffle=false, bool loop=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MOST_FREQUENT_SIZE, unsigned max_width=0, unsigned max_height=0, RocalDecoderType rocal_decoder_type=RocalDecoderType::ROCAL_DECODER_TJPEG, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates JPEG image reader and decoder for Caffe2 LMDB records. It allocates the resources and objects...
RocalTensor ROCAL_API_CALL rocalJpegCOCOFileSourcePartial(RocalContext p_context, const char *source_path, const char *json_path, RocalImageColor rocal_color_format, unsigned internal_shard_count, bool is_output, std::vector< float > &area_factor, std::vector< float > &aspect_ratio, unsigned num_attempts, bool shuffle=false, bool loop=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MOST_FREQUENT_SIZE, unsigned max_width=0, unsigned max_height=0, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
JPEG image reader and partial decoder. It allocates the resources and objects required to read and de...
RocalTensor ROCAL_API_CALL rocalJpegCOCOFileSourceSingleShard(RocalContext context, const char *source_path, const char *json_path, RocalImageColor color_format, unsigned shard_id, unsigned shard_count, bool is_output, bool shuffle=false, bool loop=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MOST_FREQUENT_SIZE, unsigned max_width=0, unsigned max_height=0, RocalDecoderType rocal_decoder_type=RocalDecoderType::ROCAL_DECODER_TJPEG, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates JPEG image reader. It allocates the resources and objects required to read and decode COCO Jp...
RocalStatus ROCAL_API_CALL rocalResetLoaders(RocalContext context)
reset Loaders
RocalTensor ROCAL_API_CALL rocalJpegTFRecordSourceSingleShard(RocalContext context, const char *source_path, RocalImageColor rocal_color_format, unsigned shard_id, unsigned shard_count, bool is_output, bool shuffle=false, bool loop=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MOST_FREQUENT_SIZE, unsigned max_width=0, unsigned max_height=0, RocalDecoderType rocal_decoder_type=RocalDecoderType::ROCAL_DECODER_TJPEG, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates TensorFlow records JPEG image reader and decoder. It allocates the resources and objects requ...
RocalTensor ROCAL_API_CALL rocalRawTFRecordSourceSingleShard(RocalContext p_context, const char *source_path, RocalImageColor rocal_color_format, unsigned shard_id, unsigned shard_count, bool is_output, bool shuffle=false, bool loop=false, unsigned out_width=0, unsigned out_height=0, const char *record_name_prefix="", RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates Raw image loader. It allocates the resources and objects required to load images stored on th...
RocalTensor ROCAL_API_CALL rocalVideoFileSource(RocalContext context, const char *source_path, RocalImageColor color_format, RocalDecodeDevice rocal_decode_device, unsigned internal_shard_count, unsigned sequence_length, bool is_output=false, bool shuffle=false, bool loop=false, unsigned step=0, unsigned stride=0, bool file_list_frame_num=true, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates a video reader and decoder as a source. It allocates the resources and objects required to re...
RocalTensor ROCAL_API_CALL rocalVideoFileSourceSingleShard(RocalContext context, const char *source_path, RocalImageColor color_format, RocalDecodeDevice rocal_decode_device, unsigned shard_id, unsigned shard_count, unsigned sequence_length, bool shuffle=false, bool is_output=false, bool loop=false, unsigned step=0, unsigned stride=0, bool file_list_frame_num=true, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates a video reader and decoder as a source. It allocates the resources and objects required to re...
RocalTensor ROCAL_API_CALL rocalMXNetRecordSourceSingleShard(RocalContext p_context, const char *source_path, RocalImageColor rocal_color_format, unsigned shard_id, unsigned shard_count, bool is_output, bool shuffle=false, bool loop=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MOST_FREQUENT_SIZE, unsigned max_width=0, unsigned max_height=0, RocalDecoderType rocal_decoder_type=RocalDecoderType::ROCAL_DECODER_TJPEG, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates JPEG image reader and decoder for MXNet records. It allocates the resources and objects requi...
RocalTensor ROCAL_API_CALL rocalVideoFileResize(RocalContext context, const char *source_path, RocalImageColor color_format, RocalDecodeDevice rocal_decode_device, unsigned internal_shard_count, unsigned sequence_length, unsigned dest_width, unsigned dest_height, bool shuffle=false, bool is_output=false, bool loop=false, unsigned step=0, unsigned stride=0, bool file_list_frame_num=true, RocalResizeScalingMode scaling_mode=ROCAL_SCALING_MODE_DEFAULT, std::vector< unsigned > max_size={}, unsigned resize_shorter=0, unsigned resize_longer=0, RocalResizeInterpolationType interpolation_type=ROCAL_LINEAR_INTERPOLATION, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
Creates a video reader and decoder as a source. It allocates the resources and objects required to re...
RocalDecoderType
rocAL Decoder Type enum
Definition: rocal_api_types.h:264
RocalResizeScalingMode
rocAL Resize Scaling Mode enum
Definition: rocal_api_types.h:315
RocalStatus
rocAL Status enum
Definition: rocal_api_types.h:112
RocalImageSizeEvaluationPolicy
rocAL Image Size Evaluation Policy enum
Definition: rocal_api_types.h:175
RocalExternalSourceMode
RocalExternalSourceMode struct.
Definition: rocal_api_types.h:385
RocalDecodeDevice
rocAL Decode Device enum
Definition: rocal_api_types.h:196
void * RocalContext
typedef void* rocAL Context
Definition: rocal_api_types.h:63
RocalResizeInterpolationType
rocAL Resize Interpolation Type enum
Definition: rocal_api_types.h:337
RocalImageColor
rocAL Image Color enum
Definition: rocal_api_types.h:133
@ ROCAL_DECODER_TJPEG
AMD ROCAL_DECODER_TJPEG.
Definition: rocal_api_types.h:267
@ ROCAL_SCALING_MODE_DEFAULT
scales wrt specified size, if only resize width/height is provided the other dimension is scaled acco...
Definition: rocal_api_types.h:318
@ ROCAL_USE_MOST_FREQUENT_SIZE
AMD ROCAL_USE_MOST_FREQUENT_SIZE.
Definition: rocal_api_types.h:184
@ ROCAL_USE_MAX_SIZE
AMD ROCAL_USE_MAX_SIZE.
Definition: rocal_api_types.h:178
@ ROCAL_EXTSOURCE_FNAME
list of filename passed as input
Definition: rocal_api_types.h:388
@ ROCAL_LINEAR_INTERPOLATION
AMD ROCAL_LINEAR_INTERPOLATION.
Definition: rocal_api_types.h:343
RocalTensor ROCAL_API_CALL rocalAudioFileSource(RocalContext context, const char *source_path, const char *source_file_list_path, unsigned shard_count, bool is_output, bool shuffle=false, bool loop=false, bool downmix=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MAX_SIZE, unsigned max_decoded_samples=0, unsigned max_decoded_channels=0, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
RocalTensor ROCAL_API_CALL rocalAudioFileSourceSingleShard(RocalContext p_context, const char *source_path, const char *source_file_list_path, unsigned shard_id, unsigned shard_count, bool is_output, bool shuffle=false, bool loop=false, bool downmix=false, RocalImageSizeEvaluationPolicy decode_size_policy=ROCAL_USE_MAX_SIZE, unsigned max_decoded_samples=0, unsigned max_decoded_channels=0, RocalShardingInfo rocal_sharding_info=RocalShardingInfo())
The AMD rocAL Library - Types.
#define ROCAL_API_CALL
Definition: rocal_api_types.h:35
rocAL RocalShardingInfo enum
Definition: rocal_api_types.h:459