Savant icon indicating copy to clipboard operation
Savant copied to clipboard

Image_file sink adapter outputs all frames from video in 0.2.10 while SKIP_FRAMES_WITHOUT_OBJECTS=True

Open heyryanw opened this issue 1 year ago • 5 comments

Title.

It's hard to discern from the code what exactly the criteria for an "object" in the frame is though. We run two passes in a pipeline - first yolo, then OCR - and are finding that all frames from a video stream through the pipeline get outputted as images. If this is intended, perhaps a way to define the criteria for what a recognized object would be via metadata would make the MatchQuery more customizable as a feature improvement, versus having to alter Savant code directly to allow users to alter this behavior.

heyryanw avatar Jun 06 '24 14:06 heyryanw

So the problem is that the flag does not affect the behavior? The adapter saves all the images, regardless object presence or absence?

As a quick workaround you can implement a Sink with ClientSDK, enable output frame format to JPEG in the module and filter with MatchQuery or programmatically directly in the ClientSDK sink.

bwsw avatar Jun 06 '24 15:06 bwsw

To fix in:

  • 0.2.x
  • 0.3.x
  • develop

bwsw avatar Jun 10 '24 13:06 bwsw

So the problem is that the flag does not affect the behavior? The adapter saves all the images, regardless object presence or absence?

As a quick workaround you can implement a Sink with ClientSDK, enable output frame format to JPEG in the module and filter with MatchQuery or programmatically directly in the ClientSDK sink.

Dug further into this, and it seems this was caused by constant low confidence detections of static objects in our stream, so this is a model thing. It would be great so maybe set a threshold for this setting to improve this, however.

heyryanw avatar Jun 18 '24 12:06 heyryanw

Hi! The model threshold is a "module" setting, not an adapter setting. Why do you think it is relevant?

bwsw avatar Jun 18 '24 12:06 bwsw

We enabled higher thresholds in the mode.yml to be above weak detections, but still saw almost all frames being written to disk. We may need to test this a different way to be sure, but I'm sure you can confirm faster than I will be able to.

heyryanw avatar Jun 18 '24 16:06 heyryanw