rename vars

This commit is contained in:
Josh Hawkins 2024-12-20 18:21:30 -06:00
parent c708e3b656
commit ff1193ecbf
2 changed files with 8 additions and 4 deletions

View File

@ -164,8 +164,8 @@ class CameraState:
text,
f"{obj['score']:.0%} {int(obj['area'])}"
+ (
f" {float(obj['estimated_speed']):.1f}"
if obj["estimated_speed"] != 0
f" {float(obj['current_estimated_speed']):.1f}"
if obj["current_estimated_speed"] != 0
else ""
),
thickness=thickness,

View File

@ -138,7 +138,7 @@ class TrackedObject:
"region": obj_data["region"],
"score": obj_data["score"],
"attributes": obj_data["attributes"],
"estimated_speed": self.estimated_speed,
"current_estimated_speed": self.current_estimated_speed,
}
thumb_update = True
@ -387,7 +387,11 @@ class TrackedObject:
box[3],
self.obj_data["label"],
f"{int(self.thumbnail_data['score']*100)}% {int(self.thumbnail_data['area'])}"
+ (f" {self.estimated_speed:.1f}" if self.estimated_speed != 0 else ""),
+ (
f" {self.thumbnail_data['current_estimated_speed']:.1f}"
if self.thumbnail_data["current_estimated_speed"] != 0
else ""
),
thickness=thickness,
color=color,
)