diff --git a/inference/interact/gui.py b/inference/interact/gui.py index 8bfb8a91..9c52214e 100644 --- a/inference/interact/gui.py +++ b/inference/interact/gui.py @@ -26,12 +26,12 @@ except: print('torch.MPS not available.') -from PyQt6.QtWidgets import (QWidget, QApplication, QComboBox, QCheckBox, +from PySide6.QtWidgets import (QWidget, QApplication, QComboBox, QCheckBox, QHBoxLayout, QLabel, QPushButton, QTextEdit, QSpinBox, QFileDialog, QPlainTextEdit, QVBoxLayout, QSizePolicy, QButtonGroup, QSlider, QRadioButton) -from PyQt6.QtGui import QPixmap, QKeySequence, QImage, QTextCursor, QIcon, QShortcut -from PyQt6.QtCore import Qt, QTimer +from PySide6.QtGui import QPixmap, QKeySequence, QImage, QTextCursor, QIcon, QShortcut +from PySide6.QtCore import Qt, QTimer from model.network import XMem @@ -672,7 +672,7 @@ def on_play_video(self): self.timer.stop() self.play_button.setText('Play Video') else: - self.timer.start(1000 / 30) + self.timer.start(1000 // 30) self.play_button.setText('Stop Video') def on_export_visualization(self): diff --git a/inference/interact/gui_utils.py b/inference/interact/gui_utils.py index 2fec779c..76276f5c 100644 --- a/inference/interact/gui_utils.py +++ b/inference/interact/gui_utils.py @@ -1,5 +1,5 @@ -from PyQt6.QtCore import Qt -from PyQt6.QtWidgets import (QBoxLayout, QHBoxLayout, QLabel, QSpinBox, QVBoxLayout, QProgressBar) +from PySide6.QtCore import Qt +from PySide6.QtWidgets import (QBoxLayout, QHBoxLayout, QLabel, QSpinBox, QVBoxLayout, QProgressBar) def create_parameter_box(min_val, max_val, text, step=1, callback=None): diff --git a/interactive_demo.py b/interactive_demo.py index 9c6bf83a..2b71a15f 100644 --- a/interactive_demo.py +++ b/interactive_demo.py @@ -8,6 +8,9 @@ if 'QT_QPA_PLATFORM_PLUGIN_PATH' not in os.environ: os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = '' +import signal +signal.signal(signal.SIGINT, signal.SIG_DFL) + import sys from argparse import ArgumentParser @@ -18,7 +21,7 @@ from inference.interact.fbrs_controller import FBRSController from inference.interact.s2m.s2m_network import deeplabv3plus_resnet50 as S2M -from PyQt6.QtWidgets import QApplication +from PySide6.QtWidgets import QApplication from inference.interact.gui import App from inference.interact.resource_manager import ResourceManager from contextlib import nullcontext diff --git a/requirements_demo.txt b/requirements_demo.txt index f6840545..b25fb94a 100644 --- a/requirements_demo.txt +++ b/requirements_demo.txt @@ -1,3 +1,3 @@ -PyQt6 +PySide6 Cython scipy \ No newline at end of file