                      with self._lock:
                          for name, image in self._preview_buffer.items():
                              cv2.imshow(name, image)  # pylint: disable=no-member
                          if not window_created:
                              window_created = bool(self._preview_buffer)
                      cv_key = cv2.waitKey(1000)  # pylint: disable=no-member
                  else:
                      cv_key = None
 
</s> remove             image_dir = getattr(self._args, "input_{}".format(side))
 </s> add             image_dir = getattr(self._args, f"input_{side}") </s> remove         images = dict()
 </s> add         images = {} </s> remove         self._preview_buffer = dict()
 </s> add         self._preview_buffer = {}
                            if not window_created:
                                self._create_resizable_window(name, image.shape)
                      with self._lock:
                          for name, image in self._preview_buffer.items():
                            if not window_created:
                                self._create_resizable_window(name, image.shape)
                              cv2.imshow(name, image)  # pylint: disable=no-member
                          if not window_created:
                              window_created = bool(self._preview_buffer)
                      cv_key = cv2.waitKey(1000)  # pylint: disable=no-member
                  else:
                      cv_key = None
keep add keep keep keep keep keep keep
 training - Enable resize in popup preview image 
scripts/train.py