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

Method label_frames

deeplabcut/gui/tabs/label_frames.py:121–135  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

119 self.root.logger.info(f"Labeled images will by colored by {choice.upper()}")
120
121 def label_frames(self):
122 dialog = QtWidgets.QFileDialog(self)
123 dialog.setFileMode(QtWidgets.QFileDialog.Directory)
124 dialog.setViewMode(QtWidgets.QFileDialog.Detail)
125 dialog.setDirectory(os.path.join(os.path.dirname(self.root.config), "labeled-data"))
126 if dialog.exec_():
127 folder = dialog.selectedFiles()[0]
128 has_h5 = False
129 for file in os.listdir(folder):
130 if file.endswith(".h5"):
131 has_h5 = True
132 break
133 if not has_h5:
134 folder = [folder, self.root.config]
135 _ = launch_napari(folder)
136
137 def check_labels(self):
138 check_labels(self.root.config, visualizeindividuals=self.root.is_multianimal)

Callers

nothing calls this directly

Calls 1

launch_napariFunction · 0.90

Tested by

no test coverage detected