Skip to content

Commit

Permalink
Merge pull request WZMIAOMIAO#172 from WZMIAOMIAO/dev
Browse files Browse the repository at this point in the history
update code
  • Loading branch information
WZMIAOMIAO authored Mar 9, 2021
2 parents 81545da + 6c1d130 commit 674ef63
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pytorch_object_detection/yolov3_spp/trans_voc2yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def translate_info(file_names: list, save_root: str, class_dict: dict, train_val

# write object info into txt
with open(os.path.join(save_txt_path, file + ".txt"), "w") as f:
assert "object" in data.keys(), "file: '{}' lack of object key.".format(xml_path)
for index, obj in enumerate(data["object"]):
# 获取每个object的box信息
xmin = float(obj["bndbox"]["xmin"])
Expand Down

0 comments on commit 674ef63

Please sign in to comment.