未验证 提交 ec96e3c7 编写于 作者: littletomatodonkey's avatar littletomatodonkey 提交者: GitHub

fix attr pred (#2002)

上级 b457c393
...@@ -319,6 +319,5 @@ class VehicleAttribute(object): ...@@ -319,6 +319,5 @@ class VehicleAttribute(object):
] * 10 + [self.type_threshold] * 9 ] * 10 + [self.type_threshold] * 9
pred_res = (np.array(res) > np.array(threshold_list) pred_res = (np.array(res) > np.array(threshold_list)
).astype(np.int8).tolist() ).astype(np.int8).tolist()
batch_res.append({"attributes": label_res, "output": pred_res})
batch_res.append([label_res, pred_res])
return batch_res return batch_res
...@@ -142,10 +142,7 @@ def main(config): ...@@ -142,10 +142,7 @@ def main(config):
"PostProcess"] or "VehicleAttribute" in config[ "PostProcess"] or "VehicleAttribute" in config[
"PostProcess"]: "PostProcess"]:
filename = batch_names[number] filename = batch_names[number]
attr_message = result_dict[0] print("{}:\t {}".format(filename, result_dict))
pred_res = result_dict[1]
print("{}:\t attributes: {}, \npredict output: {}".format(
filename, attr_message, pred_res))
else: else:
filename = batch_names[number] filename = batch_names[number]
clas_ids = result_dict["class_ids"] clas_ids = result_dict["class_ids"]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册