diplomat.frontends.deeplabcut.predict_frames_dlc.analyze_frames

diplomat.frontends.deeplabcut.predict_frames_dlc.analyze_frames(config: Union[PathLike, str], frame_stores: Union[List[Union[PathLike, str]], Union[PathLike, str]], predictor: Optional[str] = None, save_as_csv: bool = False, multi_output_format: typing_extensions.Literal[default, separate - bodyparts] = 'default', video_folders: Optional[Union[List[Union[PathLike, str]], Union[PathLike, str]]] = None, num_outputs: Optional[int] = None, shuffle: int = 1, training_set_index: int = 0, predictor_settings: Optional[Dict[str, Any]] = None) None[source]

Takes a DIPLOMAT Frame Store file (.dlfs) and makes predictions for the stored frames, using whatever predictor plugin is selected. This allows for the video to be run through the Deep Neural Network once, and then run through several prediction algorithms as many times as desired, saving time. It also allows for frames to be processed on one computer to be transferred to another computer for post-processing and predictions.

Parameters:
  • config – The path to the DLC config to use to interpret this data. The .DLFS will inherit the neural network of this project, allowing for frame labeling using this project.

  • frame_stores – The paths to the frame stores (.dlfs files), string or list of strings.

  • predictor – A String, the name of the predictor plugin to be used to make predictions. If not specified, defaults to the segmented frame pass engine (“SegmentedFramePassEngine”).

  • save_as_csv – A Boolean, True to save the results to the human readable .csv format, otherwise false.

  • multi_output_format – A string. Determines the multi output format used. “default” uses the default format, while “separate-bodyparts” separates the multi output predictions such that each is its own body part.

  • video_folders – None, a string, or a list of strings, folders to search through to find videos which correlate to the .dlfs files. If set to None, this method will search for the corresponding videos in the directory each .dlfs file is contained in.

  • num_outputs – int, default: from config.yaml, or 1 if not set in config.yaml. Allows the user to set the number of predictions for bodypart, overriding the option in the config file.

  • shuffle – int, optional. An integer specifying the shuffle index of the training dataset used for training the network. The default is 1.

  • training_set_index – int, optional. Integer specifying which TrainingsetFraction to use. By default the first (note that TrainingFraction is a list in config.yaml).

  • predictor_settings – Optional dictionary of strings to any. This will specify what settings a predictor should use, completely ignoring any settings specified in the config.yaml. Default value is None, which tells this method to use the settings specified in the config.yaml.