Data Postprocessing

The postprocessing module allows to transform series of predictions into scenes which have a starting and an ending timestamp.

class src.postprocessing.graph_postprocessing.Scene(names: list)[source]

Bases: object

Class that represents a scene with its occurring entities, a start and an ending timestamp.

set_end(milliseconds)[source]

Set the end-timestamp in the scene.

Parameters

milliseconds (int) – Milliseconds that have passed since the beginning of the video.

set_names(names: list)[source]

Set the names of entities in the scene.

Parameters

names (list) – Names of the occurring entities.

set_start(milliseconds)[source]

Set the start-timestamp in the scene.

Parameters

milliseconds (int) – Milliseconds that have passed since the beginning of the video.

src.postprocessing.graph_postprocessing.extract_scenes(recognitions: list, timestamps: list, frame_threshold: int = 3)[source]

Extract scenes out of frame-wise predictions.

Parameters
  • recognitions (list) – List of lists containing the frame-wise predictions.

  • timestamps (list) – List with the corresponding timestamps for the predictions.

  • frame_threshold (int) – Number of similar/not similar consecutive frames to start/end a scene.

Returns

A number of Scenes.

Return type

scenes (list)