forked from mindspore-Ecosystem/mindspore
!1235 Auto remove CRLF of VOCDataset txt file
Merge pull request !1235 from xiefangqi/xfq_del_CRLF
This commit is contained in:
commit
9b8b699eb3
|
@ -270,7 +270,11 @@ Status VOCOp::ParseImageIds() {
|
||||||
}
|
}
|
||||||
std::string id;
|
std::string id;
|
||||||
while (getline(in_file, id)) {
|
while (getline(in_file, id)) {
|
||||||
image_ids_.push_back(id);
|
if (id[id.size() - 1] == '\r') {
|
||||||
|
image_ids_.push_back(id.substr(0, id.size() - 1));
|
||||||
|
} else {
|
||||||
|
image_ids_.push_back(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
in_file.close();
|
in_file.close();
|
||||||
image_ids_.shrink_to_fit();
|
image_ids_.shrink_to_fit();
|
||||||
|
|
Loading…
Reference in New Issue