1、修改了之前因将os.path更换成Path后产生的bug

2、由于tdqm库会对exe程序的运行产生崩溃影响,因此删除了tqdm库
3、修改乐requirements.txt的部分内容
This commit is contained in:
hhj 2025-01-12 13:14:26 +08:00
parent 1561759f80
commit 5a165cb69e
3 changed files with 6 additions and 7 deletions

View File

@ -15,7 +15,6 @@ from matplotlib import pyplot as plt, gridspec
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg, NavigationToolbar2QT
from pyedflib import EdfReader
from datetime import datetime
from tqdm import tqdm
from pathlib import Path
from PyQt5.QtCore import QCoreApplication, QThread, pyqtSignal
from PyQt5.QtWidgets import QFileDialog, QMainWindow, QMessageBox, QButtonGroup, QApplication
@ -194,10 +193,10 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.Artifact_Label_Path = self.dir_path / "Artifact_label"
self.Artifact_Offset_Path = self.dir_path / "Artifact_label" / "20220421Artifact_offset_value.xlsx"
if self.PSG_Data_Path.exists() and self.BCG_Data_Path.exists() and self.BCG_Label_Path.exists() and self.Artifact_Label_Path.exists() and self.Artifact_Label_Path.exists():
sampIDs = self.BCG_Data_Path.glob()
sampIDs = self.BCG_Data_Path.glob('*.*')
sampID_for_comboBox = []
for sampID in sampIDs:
sampID = sampID.replace("samp.npy", "")
sampID = sampID.name.replace("samp.npy", "")
sampID_for_comboBox.append(sampID)
bcg_path = self.BCG_Data_Path / f"{sampID}samp.npy"
ecg_path = self.PSG_Data_Path / f"A{str(sampID).rjust(7, '0')}.edf"
@ -236,7 +235,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.pushButton_confirmLabel.setEnabled(True)
self.pushButton_confirmLabel.setText("开始打标")
MainWindow.setWindowTitle(self, QCoreApplication.translate("MainWindow",
"Main_Quality_Relabel_GUI - Data Path: " + self.dir_path))
"Main_Quality_Relabel_GUI - Data Path: " + str(self.dir_path)))
info("Successfully Loaded Data Path.")
self.textBrowser_update("操作:数据路径选择成功")
else:
@ -836,7 +835,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.bcg_event_label_index_list = df2.index.tolist()
info("Traversaling XinXiao events...")
self.textBrowser_update("提示:正在遍历心晓事件")
for one_data in tqdm(df.index):
for one_data in df.index:
one_data = df.loc[one_data]
SP = one_data["Start"] * self.frequency
EP = one_data["End"] * self.frequency

View File

@ -11,7 +11,7 @@ base_event = ["Hypopnea", "Central apnea", "Obstructive apnea", "Mixed apnea"]
# 输入设置
sampID = 888
dir_path = r"E:\data_annotation\6SleepApnea_annotation_GUI_demo\data"
dir_path = r"D:\code\SA_Label\data"
# 数据路径设置
PSG_Data_Path = Path(os.path.join(dir_path, "PSG"))

View File

@ -9,5 +9,5 @@ PyQt5_sip==12.16.1
PyYAML==6.0.1
scipy==1.15.1
six==1.17.0
tqdm==4.66.4
openpyxl==3.1.5