refactor: single predict.py entrypoint (production + CLI), archive experiments
ci / smoke (push) Canceled after 0s

This commit is contained in:
andrew committed 2026-09-10 15:56:17 +07:00
1 parent beb9c9fb6b
commit 52d3127302
36 files changed
+161 -48

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
import cv2
import time
def main():
source = "rtsp://192.168.192.96:8554/cam"
print("Connecting to stream...")
cap = cv2.VideoCapture(source)
if not cap.isOpened():
print("Error: Could not open RTSP source.")
return
print("Warming up reader...")
time.sleep(3.0)
# Read a few frames to clear the buffer
for _ in range(15):
ret, frame = cap.read()
if ret and frame is not None:
h, w, c = frame.shape
print(f"Captured frame with resolution: {w}x{h}")
cv2.imwrite("/home/jetson/karung/live_frame_native.png", frame)
print("Frame saved successfully on Jetson.")
else:
print("Error: Failed to read frame from stream.")
cap.release()
if __name__ == '__main__':
main()