/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocal/checkouts/docs-6.1.2/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.2/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.2/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, std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
60 
80  const char* source_path,
81  RocalImageColor rocal_color_format,
82  unsigned shard_id,
83  unsigned shard_count,
84  bool is_output,
85  bool shuffle = false,
86  bool loop = false,
88  unsigned max_width = 0, unsigned max_height = 0, RocalDecoderType rocal_decoder_type = RocalDecoderType::ROCAL_DECODER_TJPEG,
89  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
90 
106 extern "C" RocalTensor ROCAL_API_CALL rocalSequenceReader(RocalContext context,
107  const char* source_path,
108  RocalImageColor rocal_color_format,
109  unsigned internal_shard_count,
110  unsigned sequence_length,
111  bool is_output,
112  bool shuffle = false,
113  bool loop = false,
114  unsigned step = 0,
115  unsigned stride = 0,
116  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
117 
135  const char* source_path,
136  RocalImageColor rocal_color_format,
137  unsigned shard_id,
138  unsigned shard_count,
139  unsigned sequence_length,
140  bool is_output,
141  bool shuffle = false,
142  bool loop = false,
143  unsigned step = 0,
144  unsigned stride = 0,
145  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
146 
162 extern "C" RocalTensor ROCAL_API_CALL rocalJpegCOCOFileSource(RocalContext context,
163  const char* source_path,
164  const char* json_path,
165  RocalImageColor color_format,
166  unsigned internal_shard_count,
167  bool is_output,
168  bool shuffle = false,
169  bool loop = false,
171  unsigned max_width = 0, unsigned max_height = 0,
173  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
174 
193  const char* source_path,
194  const char* json_path,
195  RocalImageColor rocal_color_format,
196  unsigned internal_shard_count,
197  bool is_output,
198  std::vector<float>& area_factor,
199  std::vector<float>& aspect_ratio,
200  unsigned num_attempts,
201  bool shuffle = false,
202  bool loop = false,
204  unsigned max_width = 0, unsigned max_height = 0,
205  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
206 
225  const char* source_path,
226  const char* json_path,
227  RocalImageColor rocal_color_format,
228  unsigned shard_id,
229  unsigned shard_count,
230  bool is_output,
231  std::vector<float>& area_factor,
232  std::vector<float>& aspect_ratio,
233  unsigned num_attempts,
234  bool shuffle = false,
235  bool loop = false,
237  unsigned max_width = 0, unsigned max_height = 0,
238  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
239 
257  const char* source_path,
258  const char* json_path,
259  RocalImageColor color_format,
260  unsigned shard_id,
261  unsigned shard_count,
262  bool is_output,
263  bool shuffle = false,
264  bool loop = false,
266  unsigned max_width = 0, unsigned max_height = 0,
268  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
269 
286  const char* source_path,
287  RocalImageColor rocal_color_format,
288  unsigned internal_shard_count,
289  bool is_output,
290  bool shuffle = false,
291  bool loop = false,
293  unsigned max_width = 0, unsigned max_height = 0,
295  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
296 
315  const char* source_path,
316  RocalImageColor rocal_color_format,
317  unsigned shard_id,
318  unsigned shard_count,
319  bool is_output,
320  bool shuffle = false,
321  bool loop = false,
323  unsigned max_width = 0, unsigned max_height = 0,
325  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
326 
344  const char* source_path,
345  RocalImageColor rocal_color_format,
346  unsigned internal_shard_count,
347  bool is_output,
348  bool shuffle = false,
349  bool loop = false,
351  unsigned max_width = 0, unsigned max_height = 0,
353  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
354 
373  const char* source_path,
374  RocalImageColor rocal_color_format,
375  unsigned shard_id,
376  unsigned shard_count,
377  bool is_output,
378  bool shuffle = false,
379  bool loop = false,
381  unsigned max_width = 0, unsigned max_height = 0,
383  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
384 
401 extern "C" RocalTensor ROCAL_API_CALL rocalMXNetRecordSource(RocalContext context,
402  const char* source_path,
403  RocalImageColor rocal_color_format,
404  unsigned internal_shard_count,
405  bool is_output,
406  bool shuffle = false,
407  bool loop = false,
409  unsigned max_width = 0, unsigned max_height = 0,
411  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
412 
431  const char* source_path,
432  RocalImageColor rocal_color_format,
433  unsigned shard_id,
434  unsigned shard_count,
435  bool is_output,
436  bool shuffle = false,
437  bool loop = false,
439  unsigned max_width = 0, unsigned max_height = 0,
441  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
442 
461 extern "C" RocalTensor ROCAL_API_CALL rocalFusedJpegCrop(RocalContext context,
462  const char* source_path,
463  RocalImageColor rocal_color_format,
464  unsigned num_threads,
465  bool is_output,
466  std::vector<float>& area_factor,
467  std::vector<float>& aspect_ratio,
468  unsigned num_attempts,
469  bool shuffle = false,
470  bool loop = false,
472  unsigned max_width = 0, unsigned max_height = 0,
473  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
474 
493  const char* source_path,
494  RocalImageColor color_format,
495  unsigned shard_id,
496  unsigned shard_count,
497  bool is_output,
498  std::vector<float>& area_factor,
499  std::vector<float>& aspect_ratio,
500  unsigned num_attempts,
501  bool shuffle = false,
502  bool loop = false,
504  unsigned max_width = 0, unsigned max_height = 0,
505  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
506 
523 extern "C" RocalTensor ROCAL_API_CALL rocalJpegTFRecordSource(RocalContext context,
524  const char* source_path,
525  RocalImageColor rocal_color_format,
526  unsigned internal_shard_count,
527  bool is_output,
528  const char* user_key_for_encoded,
529  const char* user_key_for_filename,
530  bool shuffle = false,
531  bool loop = false,
533  unsigned max_width = 0, unsigned max_height = 0,
535  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
536 
555  const char* source_path,
556  RocalImageColor rocal_color_format,
557  unsigned shard_id,
558  unsigned shard_count,
559  bool is_output,
560  bool shuffle = false,
561  bool loop = false,
563  unsigned max_width = 0, unsigned max_height = 0,
565  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
566 
580 extern "C" RocalTensor ROCAL_API_CALL rocalRawTFRecordSource(RocalContext p_context,
581  const char* source_path,
582  const char* user_key_for_raw,
583  const char* user_key_for_filename,
584  RocalImageColor rocal_color_format,
585  bool is_output,
586  bool shuffle = false,
587  bool loop = false,
588  unsigned out_width = 0, unsigned out_height = 0,
589  const char* record_name_prefix = "",
590  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
591 
608  const char* source_path,
609  RocalImageColor rocal_color_format,
610  unsigned shard_id,
611  unsigned shard_count,
612  bool is_output,
613  bool shuffle = false,
614  bool loop = false,
615  unsigned out_width = 0, unsigned out_height = 0,
616  const char* record_name_prefix = "",
617  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
618 
637 extern "C" RocalTensor ROCAL_API_CALL rocalVideoFileSource(RocalContext context,
638  const char* source_path,
639  RocalImageColor color_format,
640  RocalDecodeDevice rocal_decode_device,
641  unsigned internal_shard_count,
642  unsigned sequence_length,
643  bool is_output = false,
644  bool shuffle = false,
645  bool loop = false,
646  unsigned step = 0,
647  unsigned stride = 0,
648  bool file_list_frame_num = true,
649  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
650 
670  const char* source_path,
671  RocalImageColor color_format,
672  RocalDecodeDevice rocal_decode_device,
673  unsigned shard_id,
674  unsigned shard_count,
675  unsigned sequence_length,
676  bool shuffle = false,
677  bool is_output = false,
678  bool loop = false,
679  unsigned step = 0,
680  unsigned stride = 0,
681  bool file_list_frame_num = true,
682  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
683 
703 extern "C" RocalTensor ROCAL_API_CALL rocalVideoFileResize(RocalContext context,
704  const char* source_path,
705  RocalImageColor color_format,
706  RocalDecodeDevice rocal_decode_device,
707  unsigned internal_shard_count,
708  unsigned sequence_length,
709  unsigned dest_width,
710  unsigned dest_height,
711  bool shuffle = false,
712  bool is_output = false,
713  bool loop = false,
714  unsigned step = 0,
715  unsigned stride = 0,
716  bool file_list_frame_num = true,
718  std::vector<unsigned> max_size = {},
719  unsigned resize_shorter = 0,
720  unsigned resize_longer = 0,
722  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
723 
745  const char* source_path,
746  RocalImageColor color_format,
747  RocalDecodeDevice rocal_decode_device,
748  unsigned shard_id,
749  unsigned shard_count,
750  unsigned sequence_length,
751  unsigned dest_width,
752  unsigned dest_height,
753  bool shuffle = false,
754  bool is_output = false,
755  bool loop = false,
756  unsigned step = 0,
757  unsigned stride = 0,
758  bool file_list_frame_num = true,
760  std::vector<unsigned> max_size = {},
761  unsigned resize_shorter = 0,
762  unsigned resize_longer = 0,
764  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
765 
778 extern "C" RocalTensor ROCAL_API_CALL rocalRawCIFAR10Source(RocalContext context,
779  const char* source_path,
780  RocalImageColor color_format,
781  bool is_output,
782  unsigned out_width, unsigned out_height, const char* filename_prefix = "",
783  bool loop = false);
784 
791 
812  const char* source_path,
813  RocalImageColor rocal_color_format,
814  unsigned shard_id,
815  unsigned shard_count,
816  bool is_output,
817  std::vector<float>& area_factor,
818  std::vector<float>& aspect_ratio,
819  unsigned num_attempts,
820  bool shuffle = false,
821  bool loop = false,
823  unsigned max_width = 0, unsigned max_height = 0,
824  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
825 
843  const char* source_path,
844  RocalImageColor rocal_color_format,
845  unsigned shard_id,
846  unsigned shard_count,
847  bool is_output,
848  std::vector<float>& area_factor,
849  std::vector<float>& aspect_ratio,
850  unsigned num_attempts,
851  bool shuffle = false,
852  bool loop = false,
854  unsigned max_width = 0, unsigned max_height = 0,
855  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
871 extern "C" RocalTensor ROCAL_API_CALL rocalJpegExternalFileSource(RocalContext p_context,
872  RocalImageColor rocal_color_format,
873  bool is_output = false,
874  bool shuffle = false,
875  bool loop = false,
877  unsigned max_width = 0, unsigned max_height = 0,
880  std::pair<RocalLastBatchPolicy, bool> last_batch_info = {RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true});
881 
893 extern "C" RocalTensor ROCAL_API_CALL rocalAudioFileSource(RocalContext context,
894  const char* source_path,
895  unsigned shard_count,
896  bool is_output,
897  bool shuffle = false,
898  bool loop = false,
899  bool downmix = false);
900 
914  const char* source_path,
915  unsigned shard_id,
916  unsigned shard_count,
917  bool is_output,
918  bool shuffle = false,
919  bool loop = false,
920  bool downmix = false);
921 
922 #endif // MIVISIONX_ROCAL_API_DATA_LOADERS_H
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates JPEG image reader and decoder for MXNet records. It allocates the resources and objects requi...
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates TensorFlow records JPEG image reader and decoder. It allocates the resources and objects requ...
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates JPEG image reader and partial decoder for Caffe2 LMDB records. It allocates the resources and...
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates a video reader and decoder as a source. It allocates the resources and objects required to re...
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates a video reader and decoder as a source. It allocates the resources and objects required to re...
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
JPEG image reader and partial decoder. It allocates the resources and objects required to read and de...
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="", std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates Raw image loader. It allocates the resources and objects required to load images stored on th...
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
JPEG image reader and decoder. It allocates the resources and objects required to read and decode COC...
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 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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates JPEG image reader and partial decoder. It allocates the resources and objects required to rea...
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates JPEG external source image reader.
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates JPEG image reader and decoder. It allocates the resources and objects required to read and de...
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates JPEG image reader and 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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates JPEG image reader and decoder for Caffe2 LMDB records. It allocates the resources and objects...
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates JPEG image reader. It allocates the resources and objects required to read and decode COCO Jp...
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates JPEG image reader and decoder for Caffe LMDB records. It allocates the resources and objects ...
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates JPEG image reader and decoder for MXNet records. It allocates the resources and objects requi...
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
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 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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates JPEG image reader and partial decoder. It allocates the resources and objects required to rea...
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="", std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates Raw image loader. It allocates the resources and objects required to load images stored on th...
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates JPEG image reader and decoder for Caffe2 LMDB records. It allocates the resources and objects...
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates a video reader and decoder as a source. It allocates the resources and objects required to re...
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates a video reader and decoder as a source. It allocates the resources and objects required to re...
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, std::pair< RocalLastBatchPolicy, bool > last_batch_info={RocalLastBatchPolicy::ROCAL_LAST_BATCH_FILL, true})
Creates JPEG image reader and decoder. Reads [Frames] sequences from a directory representing a colle...
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_LAST_BATCH_FILL
ROCAL_LAST_BATCH_FILL - The last batch is filled by either repeating the last sample or by wrapping u...
Definition: rocal_api_types.h:401
@ 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