Hello. I would like to simply pass buffers through hailotilecropper and hailotileaggregator. I want to run object detection on high-resolution images using tappas/apps/h8/gstreamer/general/tiling/README.rst at master · hailo-ai/tappas · GitHub every x seconds and managed to disable inference using the pass-through property of the hailonet element. I need to do similar for the 2 aforementioned elements since they are compute-intensive. Thank you.
Hey @FlorinCiobotea,
Since the hailotilecropper and hailotileaggregator elements don’t have a built-in pass-through feature, you can minimize their computational load by adjusting their properties to effectively act as “pass-through” components in your GStreamer pipeline. Here’s how you can achieve this:
-
Configure
hailotilecropperfor Pass-Through:- Set
tiles-along-x-axisandtiles-along-y-axisto1to disable tiling. - Set
overlap-x-axisandoverlap-y-axisto0to disable overlap calculations. - Use single-scale mode by setting
tiling-mode=0. - Example:
gst-launch-1.0 \ filesrc location=input.mp4 ! \ decodebin ! \ hailotilecropper tiles-along-x-axis=1 tiles-along-y-axis=1 overlap-x-axis=0 overlap-y-axis=0 tiling-mode=0 ! \ videoconvert ! autovideosink
- Set
-
Configure
hailotileaggregatorfor Pass-Through:- Since tiling is effectively disabled by the above configuration,
hailotileaggregatorwill not need to perform complex operations. Use the default configuration to maintain minimal resource usage. - Pipeline example:
gst-launch-1.0 \ hailotilecropper tiles-along-x-axis=1 tiles-along-y-axis=1 overlap-x-axis=0 overlap-y-axis=0 tiling-mode=0 ! \ hailotileaggregator ! \ videoconvert ! autovideosink
- Since tiling is effectively disabled by the above configuration,
-
Run Inference Every X Seconds:
- Use the
videorateelement to limit the frame rate going into thehailonetelement. - Set
max-rate=1/xto process one frame everyxseconds. - Example:
gst-launch-1.0 \ filesrc location=input.mp4 ! \ decodebin ! \ videorate max-rate=1/x ! \ hailotilecropper tiles-along-x-axis=1 tiles-along-y-axis=1 overlap-x-axis=0 overlap-y-axis=0 tiling-mode=0 ! \ hailonet hef-path=model.hef ! \ hailotileaggregator ! \ videoconvert ! autovideosink
- Use the
By configuring hailotilecropper with these property values, you effectively minimize its computational load while maintaining compatibility with your pipeline. The hailotileaggregator can be used with its default configuration since tiling is disabled.
This setup allows you to run inference at your desired intervals using the videorate element, while keeping the computational overhead of hailotilecropper and hailotileaggregator to a minimum.
Let me know if you have any further questions or need additional assistance!