-
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
[Enhancement] Set Blob Size Based On YOLO Config #22
base: master
Are you sure you want to change the base?
Conversation
while (std::getline(ifs_cfg, cfg_line)) { | ||
if (cfg_line.find("width") != std::string::npos) { | ||
width = std::stoi(jitsuyo::split_string(cfg_line, "=")); | ||
} else if (cfg_line.find("height") != std::string::npos) { | ||
height = std::stoi(jitsuyo::split_string(cfg_line, "=")); | ||
break; | ||
} | ||
} |
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.
This loop assumes that width
is always above height
in the cfg. You can do something like this in case the cfg is written otherwise:
while (std::getline(ifs_cfg, cfg_line)) { | |
if (cfg_line.find("width") != std::string::npos) { | |
width = std::stoi(jitsuyo::split_string(cfg_line, "=")); | |
} else if (cfg_line.find("height") != std::string::npos) { | |
height = std::stoi(jitsuyo::split_string(cfg_line, "=")); | |
break; | |
} | |
} | |
int flag = 0; | |
while (std::getline(ifs_cfg, cfg_line)) { | |
if (flag >= 2) break; | |
if (cfg_line.find("width") != std::string::npos) { | |
width = std::stoi(jitsuyo::split_string(cfg_line, "=")); | |
flag++; | |
} else if (cfg_line.find("height") != std::string::npos) { | |
height = std::stoi(jitsuyo::split_string(cfg_line, "=")); | |
flag++; | |
} | |
} |
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.
if (height != 0 && width != 0) {
break;
}
instead of flag
, what about this?
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.
ow yeah, that's better
Jira Link:
Description
Set blob size based on width and height on yolo config
Type of Change
How Has This Been Tested?
Checklist:
feature/JIRA-ID-SHORT-DESCRIPTION
if has a JIRA ticketenhancement/SHORT-DESCRIPTION
if has/has no JIRA ticket and contain enhancementhotfix/SHORT-DESCRIPTION
if the change doesn't need to be tested (urgent)