-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add semantic segmentation support #38
base: lk_rocalTensor_vxfix
Are you sure you want to change the base?
Changes from all commits
0825a03
326e253
330f685
120b6ae
b854c6c
a6a7253
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ THE SOFTWARE. | |
#include "meta_data.h" | ||
#include "meta_data_reader.h" | ||
#include "timing_debug.h" | ||
#include "maskApi.h" | ||
fiona-gladwin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
class COCOMetaDataReader: public MetaDataReader | ||
{ | ||
|
@@ -37,7 +38,7 @@ class COCOMetaDataReader: public MetaDataReader | |
void release() override; | ||
void print_map_contents(); | ||
bool set_timestamp_mode() override { return false; } | ||
|
||
std::pair<uint32_t, uint32_t> get_max_size() override { return std::make_pair(_max_height, _max_width); } | ||
const std::map<std::string, std::shared_ptr<MetaData>> & get_map_content() override { return _map_content;} | ||
COCOMetaDataReader(); | ||
private: | ||
|
@@ -47,11 +48,22 @@ class COCOMetaDataReader: public MetaDataReader | |
void add(std::string image_name, BoundingBoxCords bbox, Labels labels, ImgSize image_size, uint image_id = 0); | ||
void add(std::string image_name, BoundingBoxCords bbox, Labels labels, ImgSize image_size, MaskCords mask_cords, std::vector<int> polygon_count, std::vector<std::vector<int>> vertices_count); // To add Mask coordinates to Metadata struct | ||
bool exists(const std::string &image_name) override; | ||
void generate_pixelwise_mask(std::string filename, RLE* rle_in); | ||
std::map<std::string, std::shared_ptr<MetaData>> _map_content; | ||
std::map<std::string, std::shared_ptr<MetaData>>::iterator _itr; | ||
std::map<std::string, ImgSize> _map_img_sizes; | ||
std::map<std::string, ImgSize> ::iterator itr; | ||
std::map<int, int> _label_info; | ||
std::map<int, int> _label_info = {{1,1},{2,2},{3,3},{4,4},{5,5},{6,6},{7,7},{8,8}, \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hardcoding the contiguous label mapping for coco is not preferred. Use a for loop to generate the mapping in meta_data_reader.cpp where its needed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We already have this support right @SundarRajan28 ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This label generation can't be done on-fly like mask in semantic and it needs this information while storing RLE value |
||
{9,9},{10,10},{11,11},{13,12},{14,13},{15,14},{16,15},{17,16}, \ | ||
{18,17},{19,18},{20,19},{21,20},{22,21},{23,22},{24,23},{25,24},{27,25},{28,26}, \ | ||
{31,27},{32,28},{33,29},{34,30},{35,31},{36,32},{37,33},{38,34},{39,35},{40,36}, \ | ||
{41,37},{42,38},{43,39},{44,40},{46,41},{47,42},{48,43},{49,44},{50,45},{51,46}, \ | ||
{52,47},{53,48},{54,49},{55,50},{56,51},{57,52},{58,53},{59,54},{60,55},{61,56}, \ | ||
{62,57},{63,58},{64,59},{65,60},{67,61},{70,62},{72,63},{73,64},{74,65},{75,66}, \ | ||
{76,67},{77,68},{78,69},{79,70},{80,71},{81,72},{82,73},{84,74},{85,75},{86,76}, \ | ||
{87,77},{88,78},{89,79},{90,80}}; | ||
uint32_t _max_width = 0; | ||
uint32_t _max_height = 0; | ||
std::map<int, int> ::iterator _it_label; | ||
TimingDBG _coco_metadata_read_time; | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a cloned repo or just a single cpp file? If its a repo, better to add it as a dependency in Dockerfile and figure out how to import the RLE structs from there since they removed all 3rd party libs from rocAL and added them as dependencies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure Sundar. We can discuss on it