Hussein El-Hadidy commited on
Commit ·
53952ec
1
Parent(s): 89a012c
Latest realtime
Browse files- CPRRealTime/main.py +1 -1
- Yolo_Only.py +1 -1
- main.py +1 -1
CPRRealTime/main.py
CHANGED
|
@@ -89,7 +89,7 @@ class CPRAnalyzer:
|
|
| 89 |
#& Fundamental timing parameters (in seconds)
|
| 90 |
self.MIN_ERROR_DURATION = 1.0 # Require sustained errors for 1 second
|
| 91 |
self.REPORTING_INTERVAL = 5.0 # Generate reports every 5 seconds
|
| 92 |
-
self.SAMPLING_INTERVAL = 0.
|
| 93 |
self.KEEP_RATE_AND_DEPTH_WARNINGS_INTERVAL = 3.0
|
| 94 |
self.MIN_CHUNK_LENGTH_TO_REPORT = 3.0
|
| 95 |
self.MIN_INTERVAL_BEFORE_READING_A_POSTURE_WARNING = 0.5
|
|
|
|
| 89 |
#& Fundamental timing parameters (in seconds)
|
| 90 |
self.MIN_ERROR_DURATION = 1.0 # Require sustained errors for 1 second
|
| 91 |
self.REPORTING_INTERVAL = 5.0 # Generate reports every 5 seconds
|
| 92 |
+
self.SAMPLING_INTERVAL = 0.1 # Analyze every 0.2 seconds
|
| 93 |
self.KEEP_RATE_AND_DEPTH_WARNINGS_INTERVAL = 3.0
|
| 94 |
self.MIN_CHUNK_LENGTH_TO_REPORT = 3.0
|
| 95 |
self.MIN_INTERVAL_BEFORE_READING_A_POSTURE_WARNING = 0.5
|
Yolo_Only.py
CHANGED
|
@@ -5,7 +5,7 @@ from ultralytics import YOLO
|
|
| 5 |
model = YOLO("yolo11n-pose.pt")
|
| 6 |
|
| 7 |
# Stream URL (MJPEG HTTP stream)
|
| 8 |
-
stream_url = "http://192.168.137.
|
| 9 |
|
| 10 |
# Open video capture from stream
|
| 11 |
cap = cv2.VideoCapture(stream_url)
|
|
|
|
| 5 |
model = YOLO("yolo11n-pose.pt")
|
| 6 |
|
| 7 |
# Stream URL (MJPEG HTTP stream)
|
| 8 |
+
stream_url = "http://192.168.137.244:8080/video"
|
| 9 |
|
| 10 |
# Open video capture from stream
|
| 11 |
cap = cv2.VideoCapture(stream_url)
|
main.py
CHANGED
|
@@ -510,7 +510,7 @@ async def websocket_analysis(websocket: WebSocket):
|
|
| 510 |
# Ensure analyzer starts only once using a thread-safe lock
|
| 511 |
with analyzer_lock:
|
| 512 |
if not analysis_started:
|
| 513 |
-
source = "http://192.168.
|
| 514 |
requested_fps = 30
|
| 515 |
output_path = r"D:\CPR\End to End\Code Refactor\output\output.mp4"
|
| 516 |
|
|
|
|
| 510 |
# Ensure analyzer starts only once using a thread-safe lock
|
| 511 |
with analyzer_lock:
|
| 512 |
if not analysis_started:
|
| 513 |
+
source = "http://192.168.137.244:8080/video"
|
| 514 |
requested_fps = 30
|
| 515 |
output_path = r"D:\CPR\End to End\Code Refactor\output\output.mp4"
|
| 516 |
|