Commit 20e90bcf authored by oscar's avatar oscar

提交更新

parent 51ab22f9
...@@ -847,7 +847,7 @@ if __name__ == '__main__': ...@@ -847,7 +847,7 @@ if __name__ == '__main__':
for jsn in t_idx: for jsn in t_idx:
save_json["annotations"].append(jsn) save_json["annotations"].append(jsn)
jsn_path = os.path.join(generate_root_path,generate_child_dir + ".json") jsn_path = os.path.join(generate_root_path + dir_g,generate_child_dir + ".json")
with open(jsn_path,'w') as file_obj: with open(jsn_path,'w') as file_obj:
json.dump(save_json,file_obj,cls=NumpyEncoder,indent=4) json.dump(save_json,file_obj,cls=NumpyEncoder,indent=4)
totel_count = {'big': 0, 'little':0,'pedestrian':0,'mid':0,'cyclist':0} totel_count = {'big': 0, 'little':0,'pedestrian':0,'mid':0,'cyclist':0}
...@@ -858,7 +858,7 @@ if __name__ == '__main__': ...@@ -858,7 +858,7 @@ if __name__ == '__main__':
totel_count['mid'] += count['mid'] totel_count['mid'] += count['mid']
totel_count['cyclist'] += count['cyclist'] totel_count['cyclist'] += count['cyclist']
cloud_box_count.append(totel_count) cloud_box_count.append(totel_count)
count_jsn_path = os.path.join(generate_root_path,"count.json") count_jsn_path = os.path.join(generate_root_path + dir_g,"count.json")
with open(count_jsn_path,'w') as file_o: with open(count_jsn_path,'w') as file_o:
json.dump(cloud_box_count,file_o,cls=NumpyEncoder,indent=4) json.dump(cloud_box_count,file_o,cls=NumpyEncoder,indent=4)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment