Do not skip frames

This commit is contained in:
Jakob Lechner 2025-08-02 04:27:09 +02:00
parent 5e388f7fdc
commit 1d99f38876

View file

@ -15,7 +15,6 @@ STREAMS = {
"Kasse 2": "http://192.168.11.230:8080?action=stream",
}
FRAME_SKIP = 2
model = YOLO("yolo_weights/yolo11n.pt")
latest_frames = {}
@ -26,7 +25,6 @@ def process_stream(stream_id, url):
line_orientation = "vertical"
counter = Counter(stream_id, line_orientation, metrics)
cap = cv2.VideoCapture(url)
frame_idx = 0
while cap.isOpened():
ret, frame = cap.read()
@ -36,9 +34,6 @@ def process_stream(stream_id, url):
height, width, _ = frame.shape
frame_idx += 1
if frame_idx % FRAME_SKIP != 0:
continue
try:
results = model.track(