fix attr pred (#2002)

This commit is contained in:
littletomatodonkey 2022-06-09 08:20:58 +08:00 committed by GitHub
parent b457c393eb
commit ec96e3c782
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -319,6 +319,5 @@ class VehicleAttribute(object):
] * 10 + [self.type_threshold] * 9
pred_res = (np.array(res) > np.array(threshold_list)
).astype(np.int8).tolist()
batch_res.append([label_res, pred_res])
batch_res.append({"attributes": label_res, "output": pred_res})
return batch_res

View File

@ -142,10 +142,7 @@ def main(config):
"PostProcess"] or "VehicleAttribute" in config[
"PostProcess"]:
filename = batch_names[number]
attr_message = result_dict[0]
pred_res = result_dict[1]
print("{}:\t attributes: {}, \npredict output: {}".format(
filename, attr_message, pred_res))
print("{}:\t {}".format(filename, result_dict))
else:
filename = batch_names[number]
clas_ids = result_dict["class_ids"]