Merge branch 'main' of http://down.luanhailiang.cn:9000/luanhailiang/billiard into main
commit
f450605468
8
app.py
8
app.py
|
@ -126,11 +126,15 @@ def worker(id,source,region=None,stream=False):
|
||||||
name = model.model.names[class_id]
|
name = model.model.names[class_id]
|
||||||
if name in names:
|
if name in names:
|
||||||
print("Name duplicate",name)
|
print("Name duplicate",name)
|
||||||
continue
|
# continue
|
||||||
ball = balls.get(name,{})
|
ball = balls.get(name,{})
|
||||||
|
# 检查 "xyxy" 键是否为 None
|
||||||
|
if ball.get("xyxy") is None:
|
||||||
|
ball["xyxy"] = []
|
||||||
# ball["tkid"] = int(tracker_id)
|
# ball["tkid"] = int(tracker_id)
|
||||||
ball["conf"] = round(float(confidence), 2)
|
ball["conf"] = round(float(confidence), 2)
|
||||||
ball["xyxy"] = [int(xyxy[0]), int(xyxy[1]), int(xyxy[2]), int(xyxy[3])]
|
site = [int(xyxy[0]), int(xyxy[1]), int(xyxy[2]), int(xyxy[3])]
|
||||||
|
ball["xyxy"].append(site)
|
||||||
ball["count"] = ball.get("count",0) + 1
|
ball["count"] = ball.get("count",0) + 1
|
||||||
if region - count < 3:
|
if region - count < 3:
|
||||||
ball["final"] = ball.get("final",0) + 1
|
ball["final"] = ball.get("final",0) + 1
|
||||||
|
|
BIN
videos/黑八1.mp4
BIN
videos/黑八1.mp4
Binary file not shown.
BIN
videos/黑八2.mp4
BIN
videos/黑八2.mp4
Binary file not shown.
BIN
videos/黑八3.mp4
BIN
videos/黑八3.mp4
Binary file not shown.
Loading…
Reference in New Issue