MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / proc_video

Function proc_video

deeplabcut/utils/make_labeled_video.py:790–987  ·  view source on GitHub ↗

Helper function for create_videos. Parameters ---------- Returns ------- result : bool ``True`` if a video is successfully created.

(
    videos,
    destfolder,
    filtered,
    DLCscorer,
    DLCscorerlegacy,
    track_method,
    cfg,
    individuals,
    color_by,
    bodyparts,
    codec,
    bodyparts2connect,
    trailpoints,
    save_frames,
    outputframerate,
    Frames2plot,
    draw_skeleton,
    skeleton_color,
    displaycropped,
    fastmode,
    keypoints_only,
    overwrite,
    video,
    init_weights="",
    pcutoff: float | None = None,
    confidence_to_alpha: Callable[[float], float] | None = None,
    plot_bboxes: bool = True,
    bboxes_pcutoff: float = 0.6,
)

Source from the content-addressed store, hash-verified

788
789
790def proc_video(
791 videos,
792 destfolder,
793 filtered,
794 DLCscorer,
795 DLCscorerlegacy,
796 track_method,
797 cfg,
798 individuals,
799 color_by,
800 bodyparts,
801 codec,
802 bodyparts2connect,
803 trailpoints,
804 save_frames,
805 outputframerate,
806 Frames2plot,
807 draw_skeleton,
808 skeleton_color,
809 displaycropped,
810 fastmode,
811 keypoints_only,
812 overwrite,
813 video,
814 init_weights="",
815 pcutoff: float | None = None,
816 confidence_to_alpha: Callable[[float], float] | None = None,
817 plot_bboxes: bool = True,
818 bboxes_pcutoff: float = 0.6,
819):
820 """Helper function for create_videos.
821
822 Parameters
823 ----------
824
825
826 Returns
827 -------
828 result : bool
829 ``True`` if a video is successfully created.
830 """
831 videofolder = Path(video).parent
832 if destfolder is None:
833 destfolder = videofolder # where your folder with videos is.
834 else:
835 destfolder = Path(destfolder)
836
837 if pcutoff is None:
838 pcutoff = cfg["pcutoff"]
839
840 auxiliaryfunctions.attempt_to_make_folder(destfolder)
841
842 os.chdir(destfolder) # THE VIDEO IS STILL IN THE VIDEO FOLDER
843 print(f"Starting to process video: {video}")
844 vname = str(Path(video).stem)
845
846 if init_weights != "":
847 DLCscorer = "DLC_" + Path(init_weights).stem

Callers

nothing calls this directly

Calls 10

get_segment_indicesFunction · 0.85
CreateVideoSlowFunction · 0.85
create_videoFunction · 0.85
uniqueMethod · 0.80
itemsMethod · 0.80
keysMethod · 0.80
getMethod · 0.45
fpsMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected