Semantic segmentation support#7
Conversation
sampath1117
left a comment
There was a problem hiding this comment.
Please address first round of review comments
| * \return RocalMetaData object, can be used to inquire about the rocal's output (processed) tensors | ||
| */ | ||
| 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); | ||
| extern "C" RocalMetaData ROCAL_API_CALL rocalCreateCOCOReader(RocalContext rocal_context, const char* source_path, bool is_output, bool is_polygon_mask = false, bool is_pixelwise_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); |
There was a problem hiding this comment.
Please update the description of this function w.r.t new parameter additions (is_polygon_mask, is_pixelwise_mask)
| /// \param rocal_context | ||
| /// \param mask_ids The list of polygon id provided by user | ||
| /// \param sel_vertices_count List of vertices count for the selected polygons | ||
| /// \param sel_mask_ids List of Polygons ids for the selected polygons |
There was a problem hiding this comment.
Please check and modify the variable names sel_vertices_count, sel_mask_ids. The prefix sel looks not very intuitive
|
|
||
| /// | ||
| /// \param rocal_context | ||
| extern "C" RocalTensorList ROCAL_API_CALL rocalRandomMaskPixel(RocalContext p_context); |
There was a problem hiding this comment.
Please add the description for this function
| /// \param is_foreground Select pixel from foreground if it is truw | ||
| /// \param value Select pixel coordinate whose value is equal to it | ||
| /// \param is_threshold Select pixel coordinate whose value is greater than given value param when bool is set as true | ||
| extern "C" void ROCAL_API_CALL rocalSetRandomPixelMaskConfig(RocalContext p_context, bool is_foreground=false, unsigned int value=0, bool is_threshold=true); |
There was a problem hiding this comment.
Please add space before and after = operator.
Applicable to all such new additions in this file
| ROCAL_EXTSOURCE_RAW_UNCOMPRESSED = 2, | ||
| }; | ||
|
|
||
| enum RocalRandomObjectBBoxFormat |
There was a problem hiding this comment.
Please add description about this enum, similar to other enums
| for (int j = 0; j < polygon_size[i]; j++) { | ||
| std::vector<double> in; | ||
| for (int k = 0; k < vertices_count[i][j]; k++, count++) { | ||
| in.push_back(mask_cords[count]); |
There was a problem hiding this comment.
what is this in variable here?
Please check and change to better variable name if possible
| @@ -0,0 +1,207 @@ | |||
| # Copyright (c) 2018 - 2023 Advanced Micro Devices, Inc. All rights reserved. | |||
There was a problem hiding this comment.
Please change the copyright to 2024
| #include "meta_data_graph_factory.h" | ||
| #include "randombboxcrop_meta_data_reader_factory.h" | ||
| #include "node_copy.h" | ||
| #include "seed_rng.h" |
There was a problem hiding this comment.
I think #include "seed_rng.h" is already added in master_graph.h
Need not reinclude here
| _output_random_object_bbox.clear(); | ||
| _output_random_object_bbox.resize(_user_batch_size, std::vector<unsigned>(4, 0)); | ||
| for (unsigned id = 0; id < _user_batch_size; id++) { | ||
| int *in_mask_buffer = (int *)(input->at(id)->buffer()); |
There was a problem hiding this comment.
Please use static cast here
| auto random_mask_pixel_info = default_random_mask_pixel_info; | ||
| _random_mask_pixel_list.push_back(new Tensor(random_mask_pixel_info)); | ||
| auto random_object_bbox_info = default_random_object_bbox_info; | ||
| _random_object_bbox_list.push_back(new Tensor(random_object_bbox_info)); |
There was a problem hiding this comment.
Please ensure to release the memory allocated for this new tensor in the release function of master graph
rocAL/rocAL/source/pipeline/master_graph.cpp
Line 348 in 9af23be
I could see vx tensor is getting release here, not sure if the actual tensor is getting freed also
No description provided.