Skip to content

Commit

Permalink
Windows testing for fine-tuned models done
Browse files Browse the repository at this point in the history
  • Loading branch information
rasakereh committed Feb 15, 2024
1 parent f634e41 commit e9ee46c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions MedSAM/MedSAMLite/MedSAMLite.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
except:
pass # no installation anymore, shorter plugin load

MEDSAMLITE_VERSION = 'v0.03'
MEDSAMLITE_VERSION = 'v0.04'

#
# MedSAMLite
Expand Down Expand Up @@ -232,6 +232,9 @@ def setup(self) -> None:

self.ui.clbtnOperation.layout().addWidget(path_instruction, 0, 0)
self.ui.clbtnOperation.layout().addWidget(self.model_path_widget, 0, 1)

self.ui.clbtnOperation.layout().addWidget(self.ui.pbSendImage, 1, 0)
self.ui.clbtnOperation.layout().addWidget(self.ui.pbSegment, 1, 1)

self.model_path_widget.currentPath = os.path.join(self.logic.server_dir, 'medsam_lite.pth')
self.logic.new_model_loaded = True
Expand Down Expand Up @@ -647,7 +650,7 @@ def run_server(self, serverUrl, numpyServerAddress):
# Terminate whole server
server_port = int(serverUrl.split(':')[-1])
try:
server_process = list(filter(lambda proc: proc.laddr.port == server_port and psutil.Process(proc.pid).name() == 'python-real', psutil.net_connections()))[0]
server_process = list(filter(lambda proc: proc.laddr.port == server_port and 'python-real' in psutil.Process(proc.pid).name(), psutil.net_connections()))[0]
psutil.Process(server_process.pid).terminate()
except:
pass
Expand Down

0 comments on commit e9ee46c

Please sign in to comment.