Skip to content

Commit

Permalink
upgrade to pyside6
Browse files Browse the repository at this point in the history
  • Loading branch information
hkchengrex committed Oct 12, 2023
1 parent 4589acc commit 0151ab8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
8 changes: 4 additions & 4 deletions inference/interact/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions inference/interact/gui_utils.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
5 changes: 4 additions & 1 deletion interactive_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements_demo.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
PyQt6
PySide6
Cython
scipy

0 comments on commit 0151ab8

Please sign in to comment.