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:
objectClass 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.
- 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)