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

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

rocAL: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocal/checkouts/docs-6.2.1/rocAL/include/api/rocal_api_meta_data.h Source File
rocal_api_meta_data.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_META_DATA_H
24 #define MIVISIONX_ROCAL_API_META_DATA_H
25 #include "rocal_api_types.h"
26 
42 extern "C" RocalMetaData ROCAL_API_CALL rocalCreateLabelReader(RocalContext rocal_context, const char* source_path, const char* file_list_path = "");
43 
54 extern "C" RocalMetaData ROCAL_API_CALL rocalCreateVideoLabelReader(RocalContext rocal_context, const char* source_path, unsigned sequence_length, unsigned frame_step, unsigned frame_stride, bool file_list_frame_num = true);
55 
62 extern "C" RocalMetaData ROCAL_API_CALL rocalCreateTFReader(RocalContext rocal_context, const char* source_path, bool is_output,
63  const char* user_key_for_label, const char* user_key_for_filename);
64 
71 extern "C" RocalMetaData ROCAL_API_CALL rocalCreateTFReaderDetection(RocalContext rocal_context, const char* source_path, bool is_output,
72  const char* user_key_for_label, const char* user_key_for_text,
73  const char* user_key_for_xmin, const char* user_key_for_ymin, const char* user_key_for_xmax, const char* user_key_for_ymax,
74  const char* user_key_for_filename);
75 
88 extern "C" RocalMetaData ROCAL_API_CALL rocalCreateCOCOReader(RocalContext rocal_context, const char* source_path, bool is_output, bool mask = false, bool ltrb = true, bool is_box_encoder = false, bool avoid_class_remapping = false, bool aspect_ratio_grouping = false, bool is_box_iou_matcher = false);
89 
99 extern "C" RocalMetaData ROCAL_API_CALL rocalCreateCOCOReaderKeyPoints(RocalContext rocal_context, const char* source_path, bool is_output, float sigma = 0.0, unsigned pose_output_width = 0, unsigned pose_output_height = 0);
100 
107 extern "C" RocalMetaData ROCAL_API_CALL rocalCreateTextFileBasedLabelReader(RocalContext rocal_context, const char* source_path);
108 
115 extern "C" RocalMetaData ROCAL_API_CALL rocalCreateCaffeLMDBLabelReader(RocalContext rocal_context, const char* source_path);
116 
123 extern "C" RocalMetaData ROCAL_API_CALL rocalCreateCaffeLMDBReaderDetection(RocalContext rocal_context, const char* source_path);
124 
131 extern "C" RocalMetaData ROCAL_API_CALL rocalCreateCaffe2LMDBLabelReader(RocalContext rocal_context, const char* source_path, bool is_output);
132 
139 extern "C" RocalMetaData ROCAL_API_CALL rocalCreateCaffe2LMDBReaderDetection(RocalContext rocal_context, const char* source_path, bool is_output);
140 
147 extern "C" RocalMetaData ROCAL_API_CALL rocalCreateMXNetReader(RocalContext rocal_context, const char* source_path, bool is_output);
148 
154 extern "C" void ROCAL_API_CALL rocalGetImageName(RocalContext rocal_context, char* buf);
155 
162 extern "C" unsigned ROCAL_API_CALL rocalGetImageNameLen(RocalContext rocal_context, int* buf);
163 
170 extern "C" RocalTensorList ROCAL_API_CALL rocalGetImageLabels(RocalContext rocal_context);
171 
178 extern "C" unsigned ROCAL_API_CALL rocalGetBoundingBoxCount(RocalContext rocal_context);
179 
186 extern "C" unsigned ROCAL_API_CALL rocalGetMaskCount(RocalContext p_context, int* buf);
187 
194 extern "C" RocalTensorList ROCAL_API_CALL rocalGetMaskCoordinates(RocalContext p_context, int* bufcount);
195 
202 extern "C" RocalTensorList ROCAL_API_CALL rocalGetBoundingBoxLabel(RocalContext rocal_context);
203 
210 extern "C" RocalTensorList ROCAL_API_CALL rocalGetBoundingBoxCords(RocalContext rocal_context);
211 
217 extern "C" void ROCAL_API_CALL rocalGetImageSizes(RocalContext rocal_context, int* buf);
218 
224 extern "C" void ROCAL_API_CALL rocalGetROIImageSizes(RocalContext rocal_context, int* buf);
225 
233 extern "C" RocalMetaData ROCAL_API_CALL rocalCreateTextCifar10LabelReader(RocalContext rocal_context, const char* source_path, const char* file_prefix);
234 
242 extern "C" void ROCAL_API_CALL rocalGetOneHotImageLabels(RocalContext rocal_context, void* buf, int numOfClasses, RocalOutputMemType output_mem_type);
243 
244 extern "C" void ROCAL_API_CALL rocalRandomBBoxCrop(RocalContext p_context, bool all_boxes_overlap, bool no_crop, RocalFloatParam aspect_ratio = NULL, bool has_shape = false, int crop_width = 0, int crop_height = 0, int num_attempts = 1, RocalFloatParam scaling = NULL, int total_num_attempts = 0, int64_t seed = 0);
245 
251 extern "C" void ROCAL_API_CALL rocalGetSequenceStartFrameNumber(RocalContext rocal_context, unsigned int* buf);
252 
258 extern "C" void ROCAL_API_CALL rocalGetSequenceFrameTimestamps(RocalContext rocal_context, float* buf);
259 
269 extern "C" void ROCAL_API_CALL rocalBoxEncoder(RocalContext p_context, std::vector<float>& anchors, float criteria,
270  std::vector<float>& means, std::vector<float>& stds, bool offset = false, float scale = 1.0);
271 
278 extern "C" void ROCAL_API_CALL rocalCopyEncodedBoxesAndLables(RocalContext p_context, float* boxes_buf, int* labels_buf);
279 
285 extern "C" RocalMetaData ROCAL_API_CALL rocalGetEncodedBoxesAndLables(RocalContext p_context, int num_encoded_boxes);
286 
292 extern "C" void ROCAL_API_CALL rocalGetImageId(RocalContext p_context, int* buf);
293 
299 extern "C" void ROCAL_API_CALL rocalGetJointsDataPtr(RocalContext p_context, RocalJointsData** joints_data);
300 
309 extern "C" void ROCAL_API_CALL rocalBoxIouMatcher(RocalContext p_context, std::vector<float>& anchors,
310  float high_threshold, float low_threshold, bool allow_low_quality_matches = true);
311 
317 extern "C" RocalTensorList ROCAL_API_CALL rocalGetMatchedIndices(RocalContext p_context);
318 
319 #endif // MIVISIONX_ROCAL_API_META_DATA_H
void ROCAL_API_CALL rocalGetSequenceFrameTimestamps(RocalContext rocal_context, float *buf)
get sequence time stamps
RocalMetaData ROCAL_API_CALL rocalCreateVideoLabelReader(RocalContext rocal_context, const char *source_path, unsigned sequence_length, unsigned frame_step, unsigned frame_stride, bool file_list_frame_num=true)
creates video label reader
RocalMetaData ROCAL_API_CALL rocalGetEncodedBoxesAndLables(RocalContext p_context, int num_encoded_boxes)
RocalTensorList ROCAL_API_CALL rocalGetBoundingBoxLabel(RocalContext rocal_context)
get bounding box label
void ROCAL_API_CALL rocalCopyEncodedBoxesAndLables(RocalContext p_context, float *boxes_buf, int *labels_buf)
copy encoded boxes and labels
unsigned ROCAL_API_CALL rocalGetBoundingBoxCount(RocalContext rocal_context)
get bounding box count
void ROCAL_API_CALL rocalGetOneHotImageLabels(RocalContext rocal_context, void *buf, int numOfClasses, RocalOutputMemType output_mem_type)
get one hot image labels
void ROCAL_API_CALL rocalGetJointsDataPtr(RocalContext p_context, RocalJointsData **joints_data)
get joints data pointer
void ROCAL_API_CALL rocalGetROIImageSizes(RocalContext rocal_context, int *buf)
get ROI image sizes
unsigned ROCAL_API_CALL rocalGetImageNameLen(RocalContext rocal_context, int *buf)
get image name lengths
RocalMetaData ROCAL_API_CALL rocalCreateCOCOReader(RocalContext rocal_context, const char *source_path, bool is_output, bool mask=false, bool ltrb=true, bool is_box_encoder=false, bool avoid_class_remapping=false, bool aspect_ratio_grouping=false, bool is_box_iou_matcher=false)
create coco reader
RocalMetaData ROCAL_API_CALL rocalCreateCaffeLMDBReaderDetection(RocalContext rocal_context, const char *source_path)
create caffe LMDB label reader for object detection
RocalMetaData ROCAL_API_CALL rocalCreateMXNetReader(RocalContext rocal_context, const char *source_path, bool is_output)
create MXNet reader
RocalTensorList ROCAL_API_CALL rocalGetImageLabels(RocalContext rocal_context)
get image labels
RocalMetaData ROCAL_API_CALL rocalCreateTFReaderDetection(RocalContext rocal_context, const char *source_path, bool is_output, const char *user_key_for_label, const char *user_key_for_text, const char *user_key_for_xmin, const char *user_key_for_ymin, const char *user_key_for_xmax, const char *user_key_for_ymax, const char *user_key_for_filename)
create tf reader detection
unsigned ROCAL_API_CALL rocalGetMaskCount(RocalContext p_context, int *buf)
get mask count
RocalMetaData ROCAL_API_CALL rocalCreateCaffe2LMDBReaderDetection(RocalContext rocal_context, const char *source_path, bool is_output)
create caffe2 LMDB label reader for object detection
RocalTensorList ROCAL_API_CALL rocalGetMaskCoordinates(RocalContext p_context, int *bufcount)
get mask coordinates
RocalMetaData ROCAL_API_CALL rocalCreateTextCifar10LabelReader(RocalContext rocal_context, const char *source_path, const char *file_prefix)
create text cifar10 label reader
void ROCAL_API_CALL rocalBoxIouMatcher(RocalContext p_context, std::vector< float > &anchors, float high_threshold, float low_threshold, bool allow_low_quality_matches=true)
API to enable box IOU matcher and pass required params to pipeline.
RocalTensorList ROCAL_API_CALL rocalGetMatchedIndices(RocalContext p_context)
API to return the matched indices for the bounding box and anchors.
RocalMetaData ROCAL_API_CALL rocalCreateTFReader(RocalContext rocal_context, const char *source_path, bool is_output, const char *user_key_for_label, const char *user_key_for_filename)
create tf reader
void ROCAL_API_CALL rocalGetSequenceStartFrameNumber(RocalContext rocal_context, unsigned int *buf)
get sequence starting frame number
void ROCAL_API_CALL rocalGetImageName(RocalContext rocal_context, char *buf)
get image name
RocalMetaData ROCAL_API_CALL rocalCreateCaffe2LMDBLabelReader(RocalContext rocal_context, const char *source_path, bool is_output)
create caffe2 LMDB label reader
RocalTensorList ROCAL_API_CALL rocalGetBoundingBoxCords(RocalContext rocal_context)
get bounding box coordinates
void ROCAL_API_CALL rocalBoxEncoder(RocalContext p_context, std::vector< float > &anchors, float criteria, std::vector< float > &means, std::vector< float > &stds, bool offset=false, float scale=1.0)
rocal box encoder
RocalMetaData ROCAL_API_CALL rocalCreateCOCOReaderKeyPoints(RocalContext rocal_context, const char *source_path, bool is_output, float sigma=0.0, unsigned pose_output_width=0, unsigned pose_output_height=0)
create coco reader key points
void ROCAL_API_CALL rocalGetImageId(RocalContext p_context, int *buf)
get image id
RocalMetaData ROCAL_API_CALL rocalCreateLabelReader(RocalContext rocal_context, const char *source_path, const char *file_list_path="")
creates label reader
RocalMetaData ROCAL_API_CALL rocalCreateCaffeLMDBLabelReader(RocalContext rocal_context, const char *source_path)
create caffe LMDB label reader
void ROCAL_API_CALL rocalGetImageSizes(RocalContext rocal_context, int *buf)
get image sizes
RocalMetaData ROCAL_API_CALL rocalCreateTextFileBasedLabelReader(RocalContext rocal_context, const char *source_path)
create text file based label reader
void * RocalFloatParam
typedef void* Float Param
Definition: rocal_api_types.h:53
void * RocalContext
typedef void* rocAL Context
Definition: rocal_api_types.h:63
The AMD rocAL Library - Types.
RocalOutputMemType
Definition: rocal_api_types.h:286
#define ROCAL_API_CALL
Definition: rocal_api_types.h:35
rocAL Joints Data struct - HRNet training expects meta data (joints_data) in below format,...
Definition: rocal_api_types.h:90