Skip to content

Conversation

ferjm
Copy link
Member

@ferjm ferjm commented Sep 4, 2025

This PR enhances the edgeimpulsevideoinfer GStreamer element to automatically handle video frame resizing internally, eliminating the need for users to manually resize frames before inference.

Previously, users were required to ensure video frames matched the ML model's expected input dimensions (e.g., 224x224). This forced complex GStreamer pipelines with external videoscale elements and manual resolution management:

# Old approach - complex pipeline with manual resizing
gst-launch-1.0 qtiqmmfsrc camera=0 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! \
  videoconvert ! videoscale ! video/x-raw,format=RGB,width=224,height=224 ! \
  edgeimpulsevideoinfer threshold="3.minScore=0.5" ! edgeimpulseoverlay ! \
  videoconvert ! videoscale ! video/x-raw,format=RGB,width=1920,height=1080 ! \
  waylandsink display="wayland-1" sync=false fullscreen=true
# New approach - clean, simple pipeline
gst-launch-1.0 qtiqmmfsrc camera=0 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! \
  videoconvert ! edgeimpulsevideoinfer threshold="3.minScore=0.5" ! \
  edgeimpulseoverlay ! waylandsink display="wayland-1" sync=false fullscreen=true

@ferjm ferjm merged commit a8c709a into main Sep 4, 2025
1 check passed
@ferjm ferjm deleted the inner-resize branch September 4, 2025 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant