MCPcopy Create free account
hub / github.com/DeepLabCut/DeepLabCut / get_segment_indices

Function get_segment_indices

deeplabcut/utils/make_labeled_video.py:58–71  ·  view source on GitHub ↗
(bodyparts2connect, all_bpts)

Source from the content-addressed store, hash-verified

56
57
58def get_segment_indices(bodyparts2connect, all_bpts):
59 bpts2connect = []
60 for bpt1, bpt2 in bodyparts2connect:
61 if bpt1 in all_bpts and bpt2 in all_bpts:
62 bpts2connect.extend(
63 zip(
64 *(
65 np.flatnonzero(all_bpts == bpt1),
66 np.flatnonzero(all_bpts == bpt2),
67 ),
68 strict=False,
69 )
70 )
71 return bpts2connect
72
73
74def CreateVideo(

Callers 3

CreateVideoFunction · 0.85
CreateVideoSlowFunction · 0.85
proc_videoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected