diplomat.frontends.csv.label_videos.label_videos
- diplomat.frontends.csv.label_videos.label_videos(config: Union[List[Union[PathLike, str]], Union[PathLike, str]], videos: Union[List[Union[PathLike, str]], Union[PathLike, str]], body_parts_to_plot: Optional[List[str]] = None, video_extension: str = 'mp4', **kwargs) None[source]
Labeled videos with arbitrary csv files in diplomat’s csv format.
- Parameters:
config – The path (or list of paths) to the csv file(s) to label the videos with.
videos – Paths to video file(s) corresponding to the provided csv files.
body_parts_to_plot – A set or list of body part names to label, or None, indicating to label all parts.
video_extension – The file extension to use on the created labeled video, excluding the dot. Defaults to ‘mp4’.
kwargs –
The following additional arguments are supported:
pcutoff (Type: RangedFloat[min=0.0, max=1.0], Default: 0.1): The probability to cutoff results below.
dotsize (Type: int, Default: 4): The size of the dots.
alphavalue (Type: RangedFloat[min=0.0, max=1.0], Default: 0.7): The alpha value of the dots.
colormap (Type: to_colormap, Default: None): The colormap to use for tracked points in the video. Can be a matplotlib colormap or a list of matplotlib colors.
shape_list (Type: Optional[List[str]], Default: None): A list of shape names, shapes to use for drawing each individual’s dots.
line_thickness (Type: int, Default: 1): Thickness of lines drawn.
skeleton (Type: Union[List[Tuple[str, str]], Dict[str, List[str]], List[str], None, bool], Default: None): The skeleton to use for this this run of DIPLOMAT. Defaults to None, which uses the skeleton associated with the sleap project. Can be a list of strings, a list of tuples of strings, a dictionary of strings to strings or lists of strings, or True/False (True connects all parts, False connects no parts, disabling the skeleton).
skeleton_color (Type: to_rgba, Default: black): Color of the skeleton.
output_codec (Type: cv2_fourcc_string, Default: mp4v): The codec to use for the labeled video…
draw_hidden_tracks (Type: bool, Default: True): Whether or not to draw locations under the pcutoff value.
antialiasing (Type: bool, Default: True): Use antialiasing when drawing points.
upscale_factor (Type: RangedFloat[min=0.0, max=1000.0], Default: 1): A optional integer multiplier to use for increasing the size of the output video.