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

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

rocAL: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocal/checkouts/docs-6.1.1/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 
50 extern "C" RocalTensor ROCAL_API_CALL rocalJpegFileSource(RocalContext context,
51  const char* source_path,
52  RocalImageColor rocal_color_format,
53  unsigned internal_shard_count,
54  bool is_output,
55  bool shuffle = false,
56  bool loop = false,
58  unsigned max_width = 0, unsigned max_height = 0, RocalDecoderType rocal_decoder_type = RocalDecoderType::ROCAL_DECODER_TJPEG);
59 
77  const char* source_path,
78  RocalImageColor rocal_color_format,
79  unsigned shard_id,
80  unsigned shard_count,
81  bool is_output,
82  bool shuffle = false,
83  bool loop = false,
85  unsigned max_width = 0, unsigned max_height = 0, RocalDecoderType rocal_decoder_type = RocalDecoderType::ROCAL_DECODER_TJPEG);
86 
101 extern "C" RocalTensor ROCAL_API_CALL rocalSequenceReader(RocalContext context,
102  const char* source_path,
103  RocalImageColor rocal_color_format,
104  unsigned internal_shard_count,
105  unsigned sequence_length,
106  bool is_output,
107  bool shuffle = false,
108  bool loop = false,
109  unsigned step = 0,
110  unsigned stride = 0);
111 
128  const char* source_path,
129  RocalImageColor rocal_color_format,
130  unsigned shard_id,
131  unsigned shard_count,
132  unsigned sequence_length,
133  bool is_output,
134  bool shuffle = false,
135  bool loop = false,
136  unsigned step = 0,
137  unsigned stride = 0);
138 
153 extern "C" RocalTensor ROCAL_API_CALL rocalJpegCOCOFileSource(RocalContext context,
154  const char* source_path,
155  const char* json_path,
156  RocalImageColor color_format,
157  unsigned internal_shard_count,
158  bool is_output,
159  bool shuffle = false,
160  bool loop = false,
162  unsigned max_width = 0, unsigned max_height = 0,
164 
182  const char* source_path,
183  const char* json_path,
184  RocalImageColor rocal_color_format,
185  unsigned internal_shard_count,
186  bool is_output,
187  std::vector<float>& area_factor,
188  std::vector<float>& aspect_ratio,
189  unsigned num_attempts,
190  bool shuffle = false,
191  bool loop = false,
193  unsigned max_width = 0, unsigned max_height = 0);
194 
212  const char* source_path,
213  const char* json_path,
214  RocalImageColor rocal_color_format,
215  unsigned shard_id,
216  unsigned shard_count,
217  bool is_output,
218  std::vector<float>& area_factor,
219  std::vector<float>& aspect_ratio,
220  unsigned num_attempts,
221  bool shuffle = false,
222  bool loop = false,
224  unsigned max_width = 0, unsigned max_height = 0);
225 
242  const char* source_path,
243  const char* json_path,
244  RocalImageColor color_format,
245  unsigned shard_id,
246  unsigned shard_count,
247  bool is_output,
248  bool shuffle = false,
249  bool loop = false,
251  unsigned max_width = 0, unsigned max_height = 0,
253 
269  const char* source_path,
270  RocalImageColor rocal_color_format,
271  unsigned internal_shard_count,
272  bool is_output,
273  bool shuffle = false,
274  bool loop = false,
276  unsigned max_width = 0, unsigned max_height = 0,
278 
296  const char* source_path,
297  RocalImageColor rocal_color_format,
298  unsigned shard_id,
299  unsigned shard_count,
300  bool is_output,
301  bool shuffle = false,
302  bool loop = false,
304  unsigned max_width = 0, unsigned max_height = 0,
306 
323  const char* source_path,
324  RocalImageColor rocal_color_format,
325  unsigned internal_shard_count,
326  bool is_output,
327  bool shuffle = false,
328  bool loop = false,
330  unsigned max_width = 0, unsigned max_height = 0,
332 
350  const char* source_path,
351  RocalImageColor rocal_color_format,
352  unsigned shard_id,
353  unsigned shard_count,
354  bool is_output,
355  bool shuffle = false,
356  bool loop = false,
358  unsigned max_width = 0, unsigned max_height = 0,
360 
376 extern "C" RocalTensor ROCAL_API_CALL rocalMXNetRecordSource(RocalContext context,
377  const char* source_path,
378  RocalImageColor rocal_color_format,
379  unsigned internal_shard_count,
380  bool is_output,
381  bool shuffle = false,
382  bool loop = false,
384  unsigned max_width = 0, unsigned max_height = 0,
386 
404  const char* source_path,
405  RocalImageColor rocal_color_format,
406  unsigned shard_id,
407  unsigned shard_count,
408  bool is_output,
409  bool shuffle = false,
410  bool loop = false,
412  unsigned max_width = 0, unsigned max_height = 0,
414 
432 extern "C" RocalTensor ROCAL_API_CALL rocalFusedJpegCrop(RocalContext context,
433  const char* source_path,
434  RocalImageColor rocal_color_format,
435  unsigned num_threads,
436  bool is_output,
437  std::vector<float>& area_factor,
438  std::vector<float>& aspect_ratio,
439  unsigned num_attempts,
440  bool shuffle = false,
441  bool loop = false,
443  unsigned max_width = 0, unsigned max_height = 0);
444 
462  const char* source_path,
463  RocalImageColor color_format,
464  unsigned shard_id,
465  unsigned shard_count,
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 
490 extern "C" RocalTensor ROCAL_API_CALL rocalJpegTFRecordSource(RocalContext context,
491  const char* source_path,
492  RocalImageColor rocal_color_format,
493  unsigned internal_shard_count,
494  bool is_output,
495  const char* user_key_for_encoded,
496  const char* user_key_for_filename,
497  bool shuffle = false,
498  bool loop = false,
500  unsigned max_width = 0, unsigned max_height = 0,
502 
520  const char* source_path,
521  RocalImageColor rocal_color_format,
522  unsigned shard_id,
523  unsigned shard_count,
524  bool is_output,
525  bool shuffle = false,
526  bool loop = false,
528  unsigned max_width = 0, unsigned max_height = 0,
530 
543 extern "C" RocalTensor ROCAL_API_CALL rocalRawTFRecordSource(RocalContext p_context,
544  const char* source_path,
545  const char* user_key_for_raw,
546  const char* user_key_for_filename,
547  RocalImageColor rocal_color_format,
548  bool is_output,
549  bool shuffle = false,
550  bool loop = false,
551  unsigned out_width = 0, unsigned out_height = 0,
552  const char* record_name_prefix = "");
553 
569  const char* source_path,
570  RocalImageColor rocal_color_format,
571  unsigned shard_id,
572  unsigned shard_count,
573  bool is_output,
574  bool shuffle = false,
575  bool loop = false,
576  unsigned out_width = 0, unsigned out_height = 0,
577  const char* record_name_prefix = "");
578 
596 extern "C" RocalTensor ROCAL_API_CALL rocalVideoFileSource(RocalContext context,
597  const char* source_path,
598  RocalImageColor color_format,
599  RocalDecodeDevice rocal_decode_device,
600  unsigned internal_shard_count,
601  unsigned sequence_length,
602  bool is_output = false,
603  bool shuffle = false,
604  bool loop = false,
605  unsigned step = 0,
606  unsigned stride = 0,
607  bool file_list_frame_num = true);
608 
627  const char* source_path,
628  RocalImageColor color_format,
629  RocalDecodeDevice rocal_decode_device,
630  unsigned shard_id,
631  unsigned shard_count,
632  unsigned sequence_length,
633  bool shuffle = false,
634  bool is_output = false,
635  bool loop = false,
636  unsigned step = 0,
637  unsigned stride = 0,
638  bool file_list_frame_num = true);
639 
658 extern "C" RocalTensor ROCAL_API_CALL rocalVideoFileResize(RocalContext context,
659  const char* source_path,
660  RocalImageColor color_format,
661  RocalDecodeDevice rocal_decode_device,
662  unsigned internal_shard_count,
663  unsigned sequence_length,
664  unsigned dest_width,
665  unsigned dest_height,
666  bool shuffle = false,
667  bool is_output = false,
668  bool loop = false,
669  unsigned step = 0,
670  unsigned stride = 0,
671  bool file_list_frame_num = true,
673  std::vector<unsigned> max_size = {},
674  unsigned resize_shorter = 0,
675  unsigned resize_longer = 0,
677 
698  const char* source_path,
699  RocalImageColor color_format,
700  RocalDecodeDevice rocal_decode_device,
701  unsigned shard_id,
702  unsigned shard_count,
703  unsigned sequence_length,
704  unsigned dest_width,
705  unsigned dest_height,
706  bool shuffle = false,
707  bool is_output = false,
708  bool loop = false,
709  unsigned step = 0,
710  unsigned stride = 0,
711  bool file_list_frame_num = true,
713  std::vector<unsigned> max_size = {},
714  unsigned resize_shorter = 0,
715  unsigned resize_longer = 0,
717 
729 extern "C" RocalTensor ROCAL_API_CALL rocalRawCIFAR10Source(RocalContext context,
730  const char* source_path,
731  RocalImageColor color_format,
732  bool is_output,
733  unsigned out_width, unsigned out_height, const char* filename_prefix = "",
734  bool loop = false);
735 
742 
762  const char* source_path,
763  RocalImageColor rocal_color_format,
764  unsigned shard_id,
765  unsigned shard_count,
766  bool is_output,
767  std::vector<float>& area_factor,
768  std::vector<float>& aspect_ratio,
769  unsigned num_attempts,
770  bool shuffle = false,
771  bool loop = false,
773  unsigned max_width = 0, unsigned max_height = 0);
774 
791  const char* source_path,
792  RocalImageColor rocal_color_format,
793  unsigned shard_id,
794  unsigned shard_count,
795  bool is_output,
796  std::vector<float>& area_factor,
797  std::vector<float>& aspect_ratio,
798  unsigned num_attempts,
799  bool shuffle = false,
800  bool loop = false,
802  unsigned max_width = 0, unsigned max_height = 0);
817 extern "C" RocalTensor ROCAL_API_CALL rocalJpegExternalFileSource(RocalContext p_context,
818  RocalImageColor rocal_color_format,
819  bool is_output = false,
820  bool shuffle = false,
821  bool loop = false,
823  unsigned max_width = 0, unsigned max_height = 0,
826 
838 extern "C" RocalTensor ROCAL_API_CALL rocalAudioFileSource(RocalContext context,
839  const char* source_path,
840  unsigned shard_count,
841  bool is_output,
842  bool shuffle = false,
843  bool loop = false,
844  bool downmix = false);
845 
859  const char* source_path,
860  unsigned shard_id,
861  unsigned shard_count,
862  bool is_output,
863  bool shuffle = false,
864  bool loop = false,
865  bool downmix = false);
866 
867 #endif // MIVISIONX_ROCAL_API_DATA_LOADERS_H
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)
Creates JPEG image reader and decoder for Caffe LMDB records. It allocates the resources and objects ...
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)
Creates JPEG image reader and decoder. It allocates the resources and objects required to read and de...
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)
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)
Creates JPEG external source image reader.
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)
Creates JPEG image reader and partial decoder. It allocates the resources and objects required to rea...
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)
Creates JPEG image reader and decoder for MXNet records. It allocates the resources and objects requi...
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="")
Creates Raw image loader. It allocates the resources and objects required to load images stored on th...
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)
Creates JPEG image reader and decoder. Reads [Frames] sequences from a directory representing a colle...
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)
Creates TensorFlow records JPEG image reader and decoder. It allocates the resources and objects requ...
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)
Creates JPEG image reader and 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)
Creates JPEG image reader. It allocates the resources and objects required to read and decode COCO Jp...
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)
JPEG image reader and decoder. It allocates the resources and objects required to read and decode COC...
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)
Creates TensorFlow records JPEG image reader and decoder. It allocates the resources and objects requ...
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 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)
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)
Creates a video reader and decoder as a source. It allocates the resources and objects required to re...
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)
Creates JPEG image reader and decoder for Caffe LMDB records. It allocates the resources and objects ...
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)
Creates JPEG image reader and decoder for MXNet records. It allocates the resources and objects requi...
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)
JPEG image reader and partial decoder. It allocates the resources and objects required to read and de...
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)
Creates JPEG image reader and decoder for Caffe2 LMDB records. It allocates the resources and objects...
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)
Creates a video reader and decoder as a source. It allocates the resources and objects required to re...
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="")
Creates Raw image loader. It allocates the resources and objects required to load images stored on th...
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)
Creates JPEG image reader and partial decoder for Caffe LMDB records. It allocates the resources and ...
RocalStatus ROCAL_API_CALL rocalResetLoaders(RocalContext context)
reset Loaders
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)
Creates JPEG image reader and decoder for Caffe2 LMDB records. It allocates the resources and objects...
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)
Creates JPEG image reader and partial decoder for Caffe2 LMDB records. It allocates the resources and...
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)
Creates JPEG image reader and partial decoder. It allocates the resources and objects required to rea...
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)
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)
Creates JPEG image reader and partial decoder. It allocates the resources and objects required to rea...
RocalDecoderType
rocAL Decoder Type enum
Definition: rocal_api_types.h:247
RocalResizeScalingMode
rocAL Resize Scaling Mode enum
Definition: rocal_api_types.h:298
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:368
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:320
RocalImageColor
rocAL Image Color enum
Definition: rocal_api_types.h:133
@ ROCAL_DECODER_TJPEG
AMD ROCAL_DECODER_TJPEG.
Definition: rocal_api_types.h:250
@ 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:301
@ ROCAL_USE_MOST_FREQUENT_SIZE
AMD ROCAL_USE_MOST_FREQUENT_SIZE.
Definition: rocal_api_types.h:184
@ ROCAL_EXTSOURCE_FNAME
list of filename passed as input
Definition: rocal_api_types.h:371
@ ROCAL_LINEAR_INTERPOLATION
AMD ROCAL_LINEAR_INTERPOLATION.
Definition: rocal_api_types.h:326
RocalTensor ROCAL_API_CALL rocalAudioFileSourceSingleShard(RocalContext p_context, const char *source_path, unsigned shard_id, unsigned shard_count, bool is_output, bool shuffle=false, bool loop=false, bool downmix=false)
RocalTensor ROCAL_API_CALL rocalAudioFileSource(RocalContext context, const char *source_path, unsigned shard_count, bool is_output, bool shuffle=false, bool loop=false, bool downmix=false)
The AMD rocAL Library - Types.
#define ROCAL_API_CALL
Definition: rocal_api_types.h:35