MCPcopy
hub / github.com/yosinski/deep-visualization-toolbox / display_frame

Method display_frame

live_vis.py:318–331  ·  view source on GitHub ↗
(self, frame)

Source from the content-addressed store, hash-verified

316 key, hex(key), key_label, tag, tag)
317
318 def display_frame(self, frame):
319 if self.settings.static_files_input_mode == "siamese_image_list":
320 frame1 = frame[0]
321 frame2 = frame[1]
322 full_pane_shape = self.panes['input'].data.shape[:2][::-1]
323 half_pane_shape = (full_pane_shape[0] / 2, full_pane_shape[1])
324 frame_disp1 = cv2.resize(frame1[:], half_pane_shape)
325 frame_disp2 = cv2.resize(frame2[:], half_pane_shape)
326 frame_disp = np.concatenate((frame_disp1, frame_disp2), axis=1)
327
328 else:
329 frame_disp = cv2.resize(frame[:], self.panes['input'].data.shape[:2][::-1])
330
331 self.panes['input'].data[:] = frame_disp
332
333 def draw_help(self):
334 self.help_buffer[:] = self.help_buffer[:] * .7

Callers 1

run_loopMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected