This commit is contained in:
huangtao
2022-07-01 14:19:10 +08:00
parent a857768c9e
commit 4bb117c407
7 changed files with 245 additions and 15 deletions

View File

@ -150,7 +150,8 @@ def detect(opt, save_img=False):
"6923644272159", "6924882486100", "6956511907458"]
targets = []
for target in pred[0]:
targets.append({"Class": names[int(target[5].item())], "precision": target[4].item(), "xy1": [target[0].item(), target[1].item()],
targets.append({"Class": names[int(target[5].item())], "precision": target[4].item(),
"xy1": [target[0].item(), target[1].item()],
"xy2": [target[2].item(), target[3].item()]})
resu = {"TargetDetect": targets}
print(resu)