-
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
Audio PR 4 - File List Reader and Meta-data reader #23
base: swetha/audio_pr3/pre_emphasis_filter
Are you sure you want to change the base?
Audio PR 4 - File List Reader and Meta-data reader #23
Conversation
swetha097
commented
Aug 2, 2023
•
edited
Loading
edited
- Add support for file_list_reader to read source files from file_list instead of folder_path (similar to file_source_reader)
- Add support for meta-data reader (label_reader_file_list) to read and add labels to map from file_list.txt
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.
Please address these minor review comments wrt to formatting
FileListReader(); | ||
|
||
private: | ||
//! opens the folder containnig the images |
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.
Please check spelling
_curr_file_idx = 0; | ||
} | ||
|
||
|
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.
Remove extra blank lines
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.
Done
continue; | ||
} | ||
_in_batch_read_count++; | ||
_in_batch_read_count = (_in_batch_read_count%_batch_count == 0) ? 0 : _in_batch_read_count; |
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.
Please add space before and after % if its the norm in MIVisionX too.
if(_in_batch_read_count > 0 && _in_batch_read_count < _batch_count) | ||
{ | ||
replicate_last_image_to_fill_last_shard(); | ||
LOG("FileReader ShardID [" + TOSTR(_shard_id) + "] Replicated " + _folder_path+_last_file_name + " " + TOSTR((_batch_count - _in_batch_read_count) ) + " times to fill the last batch") |
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.
change
_folder_path+_last_file_name
to
_folder_path + _last_file_name
continue; | ||
} | ||
_in_batch_read_count++; | ||
_in_batch_read_count = (_in_batch_read_count%_batch_count == 0) ? 0 : _in_batch_read_count; |
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.
add spaces appropriately
@@ -27,7 +27,7 @@ THE SOFTWARE. | |||
/// \param rocal_context | |||
/// \param source_path path to the folder that contains the dataset or metadata file | |||
/// \return RocalMetaData object, can be used to inquire about the rocal's output (processed) tensors |
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.
Add docs for file_list_path
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.
done
@@ -0,0 +1,54 @@ | |||
/* | |||
Copyright (c) 2019 - 2023 Advanced Micro Devices, Inc. All rights reserved. |
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.
Change this 2023 since audio support has been added in this year and this is a new file. Change the copyright year for all new files to 2023
void reset() override; | ||
|
||
//! Returns the name of the latest file opened | ||
std::string id() override { return _last_id;}; |
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.
Add space after ;
file_path = _folder_path + "/"+ file_path; | ||
|
||
|
||
// std::cout << "\n entry Path String" << entry_path << '\n'; |
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.
Remove all debug statements in this file
std::vector<std::string> entry_name_list; | ||
// open_subdirectory(_folder_path.c_str()); | ||
auto ret = Reader::Status::OK; | ||
std::ifstream fp (_file_list_path); |
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.
Remove space before (
// std::cout << "\n entry Path String" << entry_path << '\n'; | ||
|
||
// std::cout << filesys::is_regular_file(entry.path()) << "\n"; | ||
if (filesys::is_regular_file(file_path )) |
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.
Remove extra spaces before and after ()
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.
@swetha097 Please resolve the spacing issues in all new files added to the branch
…el_reader_file_list.cpp & .h files)
….com/swetha097/MIVisionX into swetha/audio_pr4/meta_data