Display Aggregators¶
Display detected objects and faces in output image files.
The aggregator functions here take as input detected faces and objects. It draws bounding boxes over the repective frames and saves the png files locally. Requires that the PNG annotator was run and the original images are saved somewhere locally.
-
class
dvt.aggregate.display.DisplayAggregator(**kwargs)[source]¶ Bases:
dvt.abstract.AggregatorDisplay detected faces and objects as overlay over image frames.
-
min_obj_score¶ minimum confidence score to include a detected object in the computation
Type: float
-
min_face_score¶ minimum confidence score to include a detected face in the computation
Type: float
-
shot_names¶ a list of shot names, from the longest shot to the tightest. Set to None to use the default settings.
Type: list
-
shot_sizes¶ as list of shot size cut-offs given as a proportion (vertical) of face size to the entire shot. Should be an increasing list starting at zero and the same length as shot_names. Set to None to use the default settings.
Type: list
-
size¶ What should the size of the output images be? Set to None, the default, to preserve the size as given in the input file. Given as the desired height; the width will be scaled to keep the aspect ratio.
Type: int
-
name¶ A description of the aggregator. Used as a key in the output data.
Type: str
-
aggregate(ldframe, **kwargs)[source]¶ Create output png files showing the annotated data.
Parameters: - ldframe (dict) – A dictionary of DictFrames from a FrameAnnotator.
- frames (list) – An optional list of frames. Otherwise, will annotate any frame with a detected face or object.
-
name= 'display'
-