提交 9e48e3da 编写于 作者: X xiefangqi

del CR in VOC txt

上级 69edd8e2
...@@ -270,8 +270,12 @@ Status VOCOp::ParseImageIds() { ...@@ -270,8 +270,12 @@ Status VOCOp::ParseImageIds() {
} }
std::string id; std::string id;
while (getline(in_file, id)) { while (getline(in_file, id)) {
if (id[id.size() - 1] == '\r') {
image_ids_.push_back(id.substr(0, id.size() - 1));
} else {
image_ids_.push_back(id); image_ids_.push_back(id);
} }
}
in_file.close(); in_file.close();
image_ids_.shrink_to_fit(); image_ids_.shrink_to_fit();
num_rows_ = image_ids_.size(); num_rows_ = image_ids_.size();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册