AMD rocAL - Data Loaders API#
The AMD rocAL data loader functions. More...
Functions | |
RocalImage 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 decode Jpeg images stored on the file systems. It has internal sharding capability to load/decode in parallel is user wants. If images are not Jpeg compressed they will be ignored. More... | |
RocalImage 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 decode Jpeg images stored on the file systems. It accepts external sharding information to load a singe shard. only. More... | |
RocalImage 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 collection of streams. More... | |
RocalImage 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 collection of streams. It accepts external sharding information to load a singe shard only. More... | |
RocalImage 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) |
Creates JPEG image reader and decoder. It allocates the resources and objects required to read and decode COCO Jpeg images stored on the file systems. It has internal sharding capability to load/decode in parallel is user wants. If images are not Jpeg compressed they will be ignored. More... | |
RocalImage 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) |
Creates JPEG image reader and partial decoder. It allocates the resources and objects required to read and decode COCO Jpeg images stored on the file systems. It has internal sharding capability to load/decode in parallel is user wants. If images are not Jpeg compressed they will be ignored. More... | |
RocalImage 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 read and decode COCO Jpeg images stored on the file systems. It has internal sharding capability to load/decode in parallel is user wants. If images are not Jpeg compressed they will be ignored. More... | |
RocalImage 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) |
RocalImage 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 required to read and decode Jpeg images stored in Caffe LMDB Records. It has internal sharding capability to load/decode in parallel is user wants. If images are not Jpeg compressed they will be ignored. More... | |
RocalImage 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 required to read and decode Jpeg images stored in Caffe2 LMDB Records. It has internal sharding capability to load/decode in parallel is user wants. More... | |
RocalImage 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 required to read and decode Jpeg images stored in Caffe2 LMDB Records. It has internal sharding capability to load/decode in parallel is user wants. If images are not Jpeg compressed they will be ignored. More... | |
RocalImage 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 required to read and decode Jpeg images stored on the Caffe2 LMDB Records. It accepts external sharding information to load a singe shard. only. More... | |
RocalImage 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 required to read and decode Jpeg images stored in MXNet Records. It has internal sharding capability to load/decode in parallel is user wants. If images are not Jpeg compressed they will be ignored. More... | |
RocalImage 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 required to read and decode Jpeg images stored on the MXNet records. It accepts external sharding information to load a singe shard. only. More... | |
RocalImage 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 read and decode Jpeg images stored on the file systems. It has internal sharding capability to load/decode in parallel is user wants. If images are not Jpeg compressed they will be ignored and Crops t. More... | |
RocalImage 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 read and decode Jpeg images stored on the file systems. It accepts external sharding information to load a singe shard. only. More... | |
RocalImage 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 required to read and decode Jpeg images stored on the file systems. It has internal sharding capability to load/decode in parallel is user wants. If images are not Jpeg compressed they will be ignored. More... | |
RocalImage 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 required to read and decode Jpeg images stored on the file systems. It accepts external sharding information to load a singe shard. only. More... | |
RocalImage 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 the file systems. More... | |
RocalImage 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 the file systems. More... | |
RocalImage ROCAL_API_CALL | rocalVideoFileSource (RocalContext context, const char *source_path, RocalImageColor color_format, RocalDecodeDevice rocal_decode_device, unsigned internal_shard_count, unsigned sequence_length, const std::vector< std::string > &file_names_list, 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 read and decode mp4 videos stored on the file systems. More... | |
RocalImage 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, const std::vector< std::string > &file_names_list, 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 read and decode mp4 videos stored on the file systems. It accepts external sharding information to load a singe shard only. More... | |
RocalImage 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, const std::vector< std::string > &file_names_list, 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 read and decode mp4 videos stored on the file systems. Resizes the decoded frames to the dest width and height. More... | |
RocalImage 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, const std::vector< std::string > &file_names_list, 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 read and decode mp4 videos stored on the file systems. Resizes the decoded frames to the dest width and height. It accepts external sharding information to load a singe shard only. More... | |
RocalImage 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 raw data stored on the file systems. More... | |
RocalStatus ROCAL_API_CALL | rocalResetLoaders (RocalContext context) |
RocalImage 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 objects required to read and decode Jpeg images stored in Caffe2 LMDB Records. It has internal sharding capability to load/decode in parallel is user wants. More... | |
RocalImage 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 objects required to read and decode Jpeg images stored in Caffe22 LMDB Records. It has internal sharding capability to load/decode in parallel is user wants. More... | |
Detailed Description
The AMD rocAL data loader functions.
Function Documentation
◆ rocalFusedJpegCrop()
RocalImage 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 read and decode Jpeg images stored on the file systems. It has internal sharding capability to load/decode in parallel is user wants. If images are not Jpeg compressed they will be ignored and Crops t.
- Parameters
-
context Rocal context source_path A NULL terminated char string pointing to the location on the disk rocal_color_format The color format the images will be decoded to. num_threads Defines the parallelism level by internally sharding the input dataset and load/decode using multiple decoder/loader instances. Using shard counts bigger than 1 improves the load/decode performance if compute resources (CPU cores) are available. is_output Determines if the user wants the loaded images to be part of the output or not. area_factor Determines how much area to be cropped. Ranges from from 0.08 - 1. aspect_ratio Determines the aspect ration of crop. Ranges from 0.75 to 1.33. num_attempts Maximum number of attempts to generate crop. Default 10 shuffle Determines if the user wants to shuffle the dataset or not. loop Determines if the user wants to indefinitely loops through images or not. decode_size_policy max_width The maximum width of the decoded images, larger or smaller will be resized to closest max_height The maximum height of the decoded images, larger or smaller will be resized to closest
- Returns
- Reference to the output image
◆ rocalFusedJpegCropSingleShard()
RocalImage 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 read and decode Jpeg images stored on the file systems. It accepts external sharding information to load a singe shard. only.
- Parameters
-
context Rocal context source_path A NULL terminated char string pointing to the location on the disk rocal_color_format The color format the images will be decoded to. shard_id Shard id for this loader shard_count Total shard count is_output Determines if the user wants the loaded images to be part of the output or not. area_factor Determines how much area to be cropped. Ranges from from 0.08 - 1. aspect_ratio Determines the aspect ration of crop. Ranges from 0.75 to 1.33. num_attempts Maximum number of attempts to generate crop. Default 10 decode_size_policy max_width The maximum width of the decoded images, larger or smaller will be resized to closest max_height The maximum height of the decoded images, larger or smaller will be resized to closest
- Returns
◆ rocalJpegCaffe2LMDBRecordSource()
RocalImage 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 required to read and decode Jpeg images stored in Caffe2 LMDB Records. It has internal sharding capability to load/decode in parallel is user wants. If images are not Jpeg compressed they will be ignored.
- Parameters
-
context Rocal context source_path A NULL terminated char string pointing to the location on the disk rocal_color_format The color format the images will be decoded to. internal_shard_count Defines the parallelism level by internally sharding the input dataset and load/decode using multiple decoder/loader instances. Using shard counts bigger than 1 improves the load/decode performance if compute resources (CPU cores) are available. is_output Determines if the user wants the loaded images to be part of the output or not. shuffle Determines if the user wants to shuffle the dataset or not. loop Determines if the user wants to indefinitely loops through images or not. decode_size_policy max_width The maximum width of the decoded images, larger or smaller will be resized to closest max_height The maximum height of the decoded images, larger or smaller will be resized to closest rocal_decoder_type Determines the decoder_type, tjpeg or hwdec
- Returns
- Reference to the output image
◆ rocalJpegCaffe2LMDBRecordSourcePartialSingleShard()
RocalImage 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 objects required to read and decode Jpeg images stored in Caffe22 LMDB Records. It has internal sharding capability to load/decode in parallel is user wants.
- Parameters
-
rocal_context Rocal context source_path A NULL terminated char string pointing to the location on the disk rocal_color_format The color format the images will be decoded to. shard_id Shard id for this loader shard_count Total shard count is_output Determines if the user wants the loaded images to be part of the output or not. shuffle Determines if the user wants to shuffle the dataset or not. loop Determines if the user wants to indefinitely loops through images or not. decode_size_policy max_width The maximum width of the decoded images, larger or smaller will be resized to closest max_height The maximum height of the decoded images, larger or smaller will be resized to closest
- Returns
- Reference to the output image
◆ rocalJpegCaffe2LMDBRecordSourceSingleShard()
RocalImage 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 required to read and decode Jpeg images stored on the Caffe2 LMDB Records. It accepts external sharding information to load a singe shard. only.
- Parameters
-
p_context Rocal context source_path A NULL terminated char string pointing to the location on the disk rocal_color_format The color format the images will be decoded to. shard_id Shard id for this loader shard_count Total shard count is_output Determines if the user wants the loaded images to be part of the output or not. shuffle Determines if the user wants to shuffle the dataset or not. loop Determines if the user wants to indefinitely loops through images or not. decode_size_policy max_width The maximum width of the decoded images, larger or smaller will be resized to closest max_height The maximum height of the decoded images, larger or smaller will be resized to closest rocal_decoder_type Determines the decoder_type, tjpeg or hwdec
- Returns
- Reference to the output image
◆ rocalJpegCaffeLMDBRecordSource()
RocalImage 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 required to read and decode Jpeg images stored in Caffe LMDB Records. It has internal sharding capability to load/decode in parallel is user wants. If images are not Jpeg compressed they will be ignored.
- Parameters
-
context Rocal context source_path A NULL terminated char string pointing to the location on the disk rocal_color_format The color format the images will be decoded to. internal_shard_count Defines the parallelism level by internally sharding the input dataset and load/decode using multiple decoder/loader instances. Using shard counts bigger than 1 improves the load/decode performance if compute resources (CPU cores) are available. is_output Determines if the user wants the loaded images to be part of the output or not. shuffle Determines if the user wants to shuffle the dataset or not. loop Determines if the user wants to indefinitely loops through images or not. decode_size_policy max_width The maximum width of the decoded images, larger or smaller will be resized to closest max_height The maximum height of the decoded images, larger or smaller will be resized to closest
- Returns
- Reference to the output image
◆ rocalJpegCaffeLMDBRecordSourcePartialSingleShard()
RocalImage 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 objects required to read and decode Jpeg images stored in Caffe2 LMDB Records. It has internal sharding capability to load/decode in parallel is user wants.
- Parameters
-
rocal_context Rocal context source_path A NULL terminated char string pointing to the location on the disk rocal_color_format The color format the images will be decoded to. shard_id Shard id for this loader shard_count Total shard count is_output Determines if the user wants the loaded images to be part of the output or not. area_factor Determines how much area to be cropped. Ranges from from 0.08 - 1. aspect_ratio Determines the aspect ration of crop. Ranges from 0.75 to 1.33. num_attempts Maximum number of attempts to generate crop. Default 10 shuffle Determines if the user wants to shuffle the dataset or not. loop Determines if the user wants to indefinitely loops through images or not. decode_size_policy max_width The maximum width of the decoded images, larger or smaller will be resized to closest max_height The maximum height of the decoded images, larger or smaller will be resized to closest
- Returns
- Reference to the output image
◆ rocalJpegCaffeLMDBRecordSourceSingleShard()
RocalImage 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 required to read and decode Jpeg images stored in Caffe2 LMDB Records. It has internal sharding capability to load/decode in parallel is user wants.
- Parameters
-
rocal_context Rocal context source_path A NULL terminated char string pointing to the location on the disk rocal_color_format The color format the images will be decoded to. shard_id Shard id for this loader shard_count Total shard count is_output Determines if the user wants the loaded images to be part of the output or not. shuffle Determines if the user wants to shuffle the dataset or not. loop Determines if the user wants to indefinitely loops through images or not. decode_size_policy max_width The maximum width of the decoded images, larger or smaller will be resized to closest max_height The maximum height of the decoded images, larger or smaller will be resized to closest rocal_decoder_type Determines the decoder_type, tjpeg or hwdec
- Returns
- Reference to the output image
◆ rocalJpegCOCOFileSource()
RocalImage 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 |
||
) |
Creates JPEG image reader and decoder. It allocates the resources and objects required to read and decode COCO Jpeg images stored on the file systems. It has internal sharding capability to load/decode in parallel is user wants. If images are not Jpeg compressed they will be ignored.
- Parameters
-
rocal_context Rocal context source_path A NULL terminated char string pointing to the location on the disk json_path Path to the COCO Json File rocal_color_format The color format the images will be decoded to. shard_count Defines the parallelism level by internally sharding the input dataset and load/decode using multiple decoder/loader instances. Using shard counts bigger than 1 improves the load/decode performance if compute resources (CPU cores) are available. is_output Determines if the user wants the loaded images to be part of the output or not. decode_size_policy max_width The maximum width of the decoded images, larger or smaller will be resized to closest max_height The maximum height of the decoded images, larger or smaller will be resized to closest rocal_decoder_type Determines the decoder_type, tjpeg or hwdec
- Returns
- Reference to the output image
◆ rocalJpegCOCOFileSourcePartial()
RocalImage 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 |
||
) |
Creates JPEG image reader and partial decoder. It allocates the resources and objects required to read and decode COCO Jpeg images stored on the file systems. It has internal sharding capability to load/decode in parallel is user wants. If images are not Jpeg compressed they will be ignored.
- Parameters
-
rocal_context Rocal context source_path A NULL terminated char string pointing to the location on the disk json_path Path to the COCO Json File rocal_color_format The color format the images will be decoded to. shard_count Defines the parallelism level by internally sharding the input dataset and load/decode using multiple decoder/loader instances. Using shard counts bigger than 1 improves the load/decode performance if compute resources (CPU cores) are available. is_output Determines if the user wants the loaded images to be part of the output or not. area_factor Determines how much area to be cropped. Ranges from from 0.08 - 1. aspect_ratio Determines the aspect ration of crop. Ranges from 0.75 to 1.33. num_attempts Maximum number of attempts to generate crop. Default 10 decode_size_policy max_width The maximum width of the decoded images, larger or smaller will be resized to closest max_height The maximum height of the decoded images, larger or smaller will be resized to closest
- Returns
- Reference to the output image
◆ rocalJpegCOCOFileSourcePartialSingleShard()
RocalImage 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 read and decode COCO Jpeg images stored on the file systems. It has internal sharding capability to load/decode in parallel is user wants. If images are not Jpeg compressed they will be ignored.
- Parameters
-
rocal_context Rocal context source_path A NULL terminated char string pointing to the location on the disk json_path Path to the COCO Json File rocal_color_format The color format the images will be decoded to. shard_id Shard id for this loader shard_count Defines the parallelism level by internally sharding the input dataset and load/decode using multiple decoder/loader instances. Using shard counts bigger than 1 improves the load/decode performance if compute resources (CPU cores) are available. is_output Determines if the user wants the loaded images to be part of the output or not. decode_size_policy max_width The maximum width of the decoded images, larger or smaller will be resized to closest max_height The maximum height of the decoded images, larger or smaller will be resized to closest area_factor Determines how much area to be cropped. Ranges from from 0.08 - 1. aspect_ratio Determines the aspect ration of crop. Ranges from 0.75 to 1.33.
- Returns
- Reference to the output image
◆ rocalJpegCOCOFileSourceSingleShard()
RocalImage 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 |
||
) |
- Parameters
-
rocal_context Rocal context source_path A NULL terminated char string pointing to the location on the disk json_path Path to the COCO Json File rocal_color_format The color format the images will be decoded to. shard_id Shard id for this loader shard_count Total shard count is_output Determines if the user wants the loaded images to be part of the output or not. decode_size_policy max_width The maximum width of the decoded images, larger or smaller will be resized to closest max_height The maximum height of the decoded images, larger or smaller will be resized to closest rocal_decoder_type Determines the decoder_type, tjpeg or hwdec
- Returns
- Reference to the output image
◆ rocalJpegFileSource()
RocalImage 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 decode Jpeg images stored on the file systems. It has internal sharding capability to load/decode in parallel is user wants. If images are not Jpeg compressed they will be ignored.
- Parameters
-
context Rocal context source_path A NULL terminated char string pointing to the location on the disk rocal_color_format The color format the images will be decoded to. shard_count Defines the parallelism level by internally sharding the input dataset and load/decode using multiple decoder/loader instances. Using shard counts bigger than 1 improves the load/decode performance if compute resources (CPU cores) are available. is_output Determines if the user wants the loaded images to be part of the output or not. shuffle Determines if the user wants to shuffle the dataset or not. loop Determines if the user wants to indefinitely loops through images or not. decode_size_policy max_width The maximum width of the decoded images, larger or smaller will be resized to closest max_height The maximum height of the decoded images, larger or smaller will be resized to closest rocal_decoder_type Determines the decoder_type, tjpeg or hwdec
- Returns
- Reference to the output image
◆ rocalJpegFileSourceSingleShard()
RocalImage 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 decode Jpeg images stored on the file systems. It accepts external sharding information to load a singe shard. only.
- Parameters
-
context Rocal context source_path A NULL terminated char string pointing to the location on the disk rocal_color_format The color format the images will be decoded to. shard_id Shard id for this loader shard_count Total shard count is_output Determines if the user wants the loaded images to be part of the output or not. shuffle Determines if the user wants to shuffle the dataset or not. loop Determines if the user wants to indefinitely loops through images or not. decode_size_policy max_width The maximum width of the decoded images, larger or smaller will be resized to closest max_height The maximum height of the decoded images, larger or smaller will be resized to closest rocal_decoder_type Determines the decoder_type, tjpeg or hwdec
- Returns
- Reference to the output image
◆ rocalJpegTFRecordSource()
RocalImage 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 required to read and decode Jpeg images stored on the file systems. It has internal sharding capability to load/decode in parallel is user wants. If images are not Jpeg compressed they will be ignored.
- Parameters
-
context Rocal context source_path A NULL terminated char string pointing to the location of the TF records on the disk rocal_color_format The color format the images will be decoded to. internal_shard_count Defines the parallelism level by internally sharding the input dataset and load/decode using multiple decoder/loader instances. Using shard counts bigger than 1 improves the load/decode performance if compute resources (CPU cores) are available. is_output Determines if the user wants the loaded images to be part of the output or not. shuffle Determines if the user wants to shuffle the dataset or not. loop Determines if the user wants to indefinitely loops through images or not. decode_size_policy max_width The maximum width of the decoded images, larger or smaller will be resized to closest max_height The maximum height of the decoded images, larger or smaller will be resized to closest rocal_decoder_type Determines the decoder_type, tjpeg or hwdec
- Returns
- Reference to the output image
◆ rocalJpegTFRecordSourceSingleShard()
RocalImage 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 required to read and decode Jpeg images stored on the file systems. It accepts external sharding information to load a singe shard. only.
- Parameters
-
context Rocal context source_path A NULL terminated char string pointing to the location of the TF records on the disk rocal_color_format The color format the images will be decoded to. shard_id Shard id for this loader shard_count Total shard count is_output Determines if the user wants the loaded images to be part of the output or not. shuffle Determines if the user wants to shuffle the dataset or not. loop Determines if the user wants to indefinitely loops through images or not. decode_size_policy max_width The maximum width of the decoded images, larger or smaller will be resized to closest max_height The maximum height of the decoded images, larger or smaller will be resized to closest rocal_decoder_type Determines the decoder_type, tjpeg or hwdec
- Returns
- Reference to the output image
◆ rocalMXNetRecordSource()
RocalImage 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 required to read and decode Jpeg images stored in MXNet Records. It has internal sharding capability to load/decode in parallel is user wants. If images are not Jpeg compressed they will be ignored.
- Parameters
-
context Rocal context source_path A NULL terminated char string pointing to the location on the disk rocal_color_format The color format the images will be decoded to. internal_shard_count Defines the parallelism level by internally sharding the input dataset and load/decode using multiple decoder/loader instances. Using shard counts bigger than 1 improves the load/decode performance if compute resources (CPU cores) are available. is_output Determines if the user wants the loaded images to be part of the output or not. shuffle Determines if the user wants to shuffle the dataset or not. loop Determines if the user wants to indefinitely loops through images or not. decode_size_policy max_width The maximum width of the decoded images, larger or smaller will be resized to closest max_height The maximum height of the decoded images, larger or smaller will be resized to closest rocal_decoder_type Determines the decoder_type, tjpeg or hwdec
- Returns
- Reference to the output image
◆ rocalMXNetRecordSourceSingleShard()
RocalImage 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 required to read and decode Jpeg images stored on the MXNet records. It accepts external sharding information to load a singe shard. only.
- Parameters
-
p_context Rocal context source_path A NULL terminated char string pointing to the location on the disk rocal_color_format The color format the images will be decoded to. shard_id Shard id for this loader shard_count Total shard count is_output Determines if the user wants the loaded images to be part of the output or not. shuffle Determines if the user wants to shuffle the dataset or not. loop Determines if the user wants to indefinitely loops through images or not. decode_size_policy max_width The maximum width of the decoded images, larger or smaller will be resized to closest max_height The maximum height of the decoded images, larger or smaller will be resized to closest rocal_decoder_type Determines the decoder_type, tjpeg or hwdec
- Returns
- Reference to the output image
◆ rocalRawCIFAR10Source()
RocalImage 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 raw data stored on the file systems.
- Parameters
-
context Rocal context source_path A NULL terminated char string pointing to the location on the disk rocal_color_format The color format the images will be decoded to. is_output Determines if the user wants the loaded images to be part of the output or not. out_width ; output width out_height ; output_height filename_prefix ; if set loader will only load files with the given prefix name
- Returns
- Reference to the output image
◆ rocalRawTFRecordSource()
RocalImage 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 the file systems.
- Parameters
-
rocal_context Rocal context source_path A NULL terminated char string pointing to the location on the disk rocal_color_format The color format the images will be decoded to. is_output Determines if the user wants the loaded images to be part of the output or not. shuffle to shuffle dataset loop repeat data loading out_width The output_width of raw image out_height The output height of raw image
- Returns
◆ rocalRawTFRecordSourceSingleShard()
RocalImage 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 the file systems.
- Parameters
-
rocal_context Rocal context source_path A NULL terminated char string pointing to the location on the disk rocal_color_format The color format the images will be decoded to. shard_id Shard id for this loader shard_count Total shard count shuffle to shuffle dataset loop repeat data loading out_width The output_width of raw image out_height The output height of raw image record_name_prefix : if nonempty reader will only read records with certain prefix
- Returns
◆ rocalResetLoaders()
RocalStatus ROCAL_API_CALL rocalResetLoaders | ( | RocalContext | context | ) |
- Parameters
-
context
- Returns
◆ rocalSequenceReader()
RocalImage 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 collection of streams.
- Parameters
-
context Rocal context source_path A NULL terminated char string pointing to the location on the disk rocal_color_format The color format the images in a sequence will be decoded to. internal_shard_count Defines the parallelism level by internally sharding the input dataset and load/decode using multiple decoder/loader instances. sequence_length The number of frames in a sequence. is_output Determines if the user wants the loaded sequences to be part of the output or not. shuffle Determines if the user wants to shuffle the sequences or not. loop Determines if the user wants to indefinitely loops through images or not. step Frame interval between each sequence. stride Frame interval between frames in a sequence.
- Returns
- Reference to the output image.
◆ rocalSequenceReaderSingleShard()
RocalImage 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 collection of streams. It accepts external sharding information to load a singe shard only.
- Parameters
-
context Rocal context source_path A NULL terminated char string pointing to the location on the disk rocal_color_format The color format the images in a sequence will be decoded to. shard_id Shard id for this loader shard_count Total shard count sequence_length The number of frames in a sequence. is_output Determines if the user wants the loaded sequences to be part of the output or not. shuffle Determines if the user wants to shuffle the dataset or not. loop Determines if the user wants to indefinitely loops through images or not. step Frame interval between each sequence. stride Frame interval between frames in a sequence.
- Returns
- Reference to the output image
◆ rocalVideoFileResize()
RocalImage 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, | ||
const std::vector< std::string > & | file_names_list, | ||
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 read and decode mp4 videos stored on the file systems. Resizes the decoded frames to the dest width and height.
- Parameters
-
context Rocal context source_path A NULL terminated char string pointing to the location on the disk. source_path can be a video file, folder containing videos or a text file color_format The color format the frames will be decoded to. rocal_decode_device Enables software or hardware decoding. Currently only software decoding is supported. internal_shard_count Defines the parallelism level by internally sharding the input dataset and load/decode using multiple decoder/loader instances. sequence_length The number of frames in a sequence. dest_width The output width of frames. dest_height The output height of frames. file_names_list List of input video filenames shuffle to shuffle sequences. is_output Determines if the user wants the loaded sequence of frames to be part of the output or not. loop repeat data loading. step Frame interval between each sequence. stride Frame interval between frames in a sequence. file_list_frame_num Determines if the user wants to read frame number or timestamps if a text file is passed in the source_path.
- Returns
◆ rocalVideoFileResizeSingleShard()
RocalImage 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, | ||
const std::vector< std::string > & | file_names_list, | ||
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 read and decode mp4 videos stored on the file systems. Resizes the decoded frames to the dest width and height. It accepts external sharding information to load a singe shard only.
- Parameters
-
context Rocal context source_path A NULL terminated char string pointing to the location on the disk. source_path can be a video file, folder containing videos or a text file color_format The color format the frames will be decoded to. rocal_decode_device Enables software or hardware decoding. Currently only software decoding is supported. shard_id Shard id for this loader. shard_count Total shard count. sequence_length The number of frames in a sequence. dest_width The output width of frames. dest_height The output height of frames. file_names_list List of input video filenames shuffle to shuffle sequences. is_output Determines if the user wants the loaded sequence of frames to be part of the output or not. loop repeat data loading. step Frame interval between each sequence. stride Frame interval between frames in a sequence. file_list_frame_num Determines if the user wants to read frame number or timestamps if a text file is passed in the source_path.
- Returns
◆ rocalVideoFileSource()
RocalImage ROCAL_API_CALL rocalVideoFileSource | ( | RocalContext | context, |
const char * | source_path, | ||
RocalImageColor | color_format, | ||
RocalDecodeDevice | rocal_decode_device, | ||
unsigned | internal_shard_count, | ||
unsigned | sequence_length, | ||
const std::vector< std::string > & | file_names_list, | ||
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 read and decode mp4 videos stored on the file systems.
- Parameters
-
context Rocal context source_path A NULL terminated char string pointing to the location on the disk. source_path can be a video file, folder containing videos or a text file color_format The color format the frames will be decoded to. rocal_decode_device Enables software or hardware decoding. Currently only software decoding is supported. internal_shard_count Defines the parallelism level by internally sharding the input dataset and load/decode using multiple decoder/loader instances. sequence_length The number of frames in a sequence. file_names_list List of input video filenames shuffle to shuffle sequences. is_output Determines if the user wants the loaded sequence of frames to be part of the output or not. loop repeat data loading. step Frame interval between each sequence. stride Frame interval between frames in a sequence. file_list_frame_num Determines if the user wants to read frame number or timestamps if a text file is passed in the source_path.
- Returns
◆ rocalVideoFileSourceSingleShard()
RocalImage 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, | ||
const std::vector< std::string > & | file_names_list, | ||
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 read and decode mp4 videos stored on the file systems. It accepts external sharding information to load a singe shard only.
- Parameters
-
context Rocal context source_path A NULL terminated char string pointing to the location on the disk. source_path can be a video file, folder containing videos or a text file color_format The color format the frames will be decoded to. rocal_decode_device Enables software or hardware decoding. Currently only software decoding is supported. shard_id Shard id for this loader. shard_count Total shard count. sequence_length The number of frames in a sequence. file_names_list List of input video filenames shuffle to shuffle sequences. is_output Determines if the user wants the loaded sequence of frames to be part of the output or not. loop repeat data loading. step Frame interval between each sequence. stride Frame interval between frames in a sequence. file_list_frame_num Determines if the user wants to read frame number or timestamps if a text file is passed in the source_path.
- Returns