Do not skip frames
This commit is contained in:
parent
5e388f7fdc
commit
1d99f38876
1 changed files with 0 additions and 5 deletions
|
|
@ -15,7 +15,6 @@ STREAMS = {
|
||||||
"Kasse 2": "http://192.168.11.230:8080?action=stream",
|
"Kasse 2": "http://192.168.11.230:8080?action=stream",
|
||||||
}
|
}
|
||||||
|
|
||||||
FRAME_SKIP = 2
|
|
||||||
model = YOLO("yolo_weights/yolo11n.pt")
|
model = YOLO("yolo_weights/yolo11n.pt")
|
||||||
|
|
||||||
latest_frames = {}
|
latest_frames = {}
|
||||||
|
|
@ -26,7 +25,6 @@ def process_stream(stream_id, url):
|
||||||
line_orientation = "vertical"
|
line_orientation = "vertical"
|
||||||
counter = Counter(stream_id, line_orientation, metrics)
|
counter = Counter(stream_id, line_orientation, metrics)
|
||||||
cap = cv2.VideoCapture(url)
|
cap = cv2.VideoCapture(url)
|
||||||
frame_idx = 0
|
|
||||||
|
|
||||||
while cap.isOpened():
|
while cap.isOpened():
|
||||||
ret, frame = cap.read()
|
ret, frame = cap.read()
|
||||||
|
|
@ -36,9 +34,6 @@ def process_stream(stream_id, url):
|
||||||
|
|
||||||
height, width, _ = frame.shape
|
height, width, _ = frame.shape
|
||||||
|
|
||||||
frame_idx += 1
|
|
||||||
if frame_idx % FRAME_SKIP != 0:
|
|
||||||
continue
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
results = model.track(
|
results = model.track(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue