From 6f06088ce8677d692db758c806ce134cf1b68c47 Mon Sep 17 00:00:00 2001 From: r83575 Date: Mon, 10 Nov 2025 15:51:33 +0200 Subject: [PATCH 1/2] move frame detection scripts into dedicated module and update import --- docs/benchmark_e2e.md | 2 +- docs/frame_comparison_results.md | 12 ++++++------ .../frame_comparison}/compare_frames_methods.py | 0 .../frame_comparison}/create_sample_videos.py | 0 src/{ => frame_comparison}/frame_change_detector.py | 0 {scripts => src/frame_comparison}/test_detector.py | 2 +- src/frames_skipping_pipeline.py | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) rename {scripts => src/frame_comparison}/compare_frames_methods.py (100%) rename {scripts => src/frame_comparison}/create_sample_videos.py (100%) rename src/{ => frame_comparison}/frame_change_detector.py (100%) rename {scripts => src/frame_comparison}/test_detector.py (90%) diff --git a/docs/benchmark_e2e.md b/docs/benchmark_e2e.md index 7da37c71..5aae99e2 100644 --- a/docs/benchmark_e2e.md +++ b/docs/benchmark_e2e.md @@ -6,7 +6,7 @@ This document describes how to run and interpret the end-to-end (E2E) performanc ## Prerequisites -- Test video file located at `/workspace/assets/test_videos/video.mp4` +- Test video file located at `/workspace/assets/videos/test_videos/video.mp4` - RTSP server implementation at `/workspace/src/rtsp/rtsp_server.py` - DeepStream pipeline at `/workspace/src/deepstream_pipeline.py` diff --git a/docs/frame_comparison_results.md b/docs/frame_comparison_results.md index 387eab52..528ff78d 100644 --- a/docs/frame_comparison_results.md +++ b/docs/frame_comparison_results.md @@ -22,12 +22,12 @@ Videos were created from frames of the domain RTSP sample video. ## Scripts -| Script | Purpose | -| ------------------------------ | ---------------------------------------------------------------------------------- | -| `create_sample_videos.py` | Generates the four short videos above. | -| `compare_frames_methods.py` | Tests and compares multiple frame comparison approaches. | -| `src/frame_change_detector.py` | Provides a reusable class for detecting visual changes between consecutive frames. | -| `scripts/test_detector.py` | Example usage of the detector in a simple video loop. | +| Script | Purpose | +| ----------------------------------------------- |----------------------------------------------------------------------------------- | +| `src/frame_comparison/create_sample_videos.py` | Generates the four short videos above. | +| `src/frame_comparison/compare_frames_methods.py`| Tests and compares multiple frame comparison approaches. | +| `src/frame_comparison/frame_change_detector.py` | Provides a reusable class for detecting visual changes between consecutive frames. | +| `src/frame_comparison/test_detector.py` | Example usage of the detector in a simple video loop. | --- diff --git a/scripts/compare_frames_methods.py b/src/frame_comparison/compare_frames_methods.py similarity index 100% rename from scripts/compare_frames_methods.py rename to src/frame_comparison/compare_frames_methods.py diff --git a/scripts/create_sample_videos.py b/src/frame_comparison/create_sample_videos.py similarity index 100% rename from scripts/create_sample_videos.py rename to src/frame_comparison/create_sample_videos.py diff --git a/src/frame_change_detector.py b/src/frame_comparison/frame_change_detector.py similarity index 100% rename from src/frame_change_detector.py rename to src/frame_comparison/frame_change_detector.py diff --git a/scripts/test_detector.py b/src/frame_comparison/test_detector.py similarity index 90% rename from scripts/test_detector.py rename to src/frame_comparison/test_detector.py index 6541abc2..9c98278a 100644 --- a/scripts/test_detector.py +++ b/src/frame_comparison/test_detector.py @@ -1,5 +1,5 @@ import cv2 -from src.frame_change_detector import FrameChangeDetector +from frame_change_detector import FrameChangeDetector def run_detector(video_path: str) -> None: diff --git a/src/frames_skipping_pipeline.py b/src/frames_skipping_pipeline.py index 781f3cda..641c47c7 100644 --- a/src/frames_skipping_pipeline.py +++ b/src/frames_skipping_pipeline.py @@ -9,7 +9,7 @@ import cv2 from gi.repository import GLib, Gst -from frame_change_detector import FrameChangeDetector +from frame_comparison.frame_change_detector import FrameChangeDetector # configurations RTSP_URL = "rtsp://127.0.0.1:8554/test" From 94f7795fe54fe6bcf39655f9e37c0aaed40016c4 Mon Sep 17 00:00:00 2001 From: r83575 Date: Mon, 10 Nov 2025 18:44:01 +0200 Subject: [PATCH 2/2] Updated --- src/frame_comparison/test_detector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frame_comparison/test_detector.py b/src/frame_comparison/test_detector.py index 9c98278a..03ca2fe8 100644 --- a/src/frame_comparison/test_detector.py +++ b/src/frame_comparison/test_detector.py @@ -19,4 +19,4 @@ def run_detector(video_path: str) -> None: if __name__ == "__main__": - run_detector("assets/frame_change_videos/videos/new_scene.mp4") + run_detector("assets/videos/frame_change_videos/new_scene.mp4")