From 106655b686d93fb30a77296a894673ec78f5d768 Mon Sep 17 00:00:00 2001 From: Carsen Stringer Date: Wed, 30 Oct 2024 17:26:14 -0400 Subject: [PATCH 1/5] update in sklearn to PCA._fit output --- facemap/gui/ops_user.npy | Bin 415 -> 0 bytes facemap/utils.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100755 facemap/gui/ops_user.npy diff --git a/facemap/gui/ops_user.npy b/facemap/gui/ops_user.npy deleted file mode 100755 index e1ba391899d101d559bd9e38f98f2b5fb29d4a7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 415 zcmbu3PfNov7{=3Wx~=oSet_QE!C0^2#eqY?VkZ+N9;BpgwiVK(Z<0=i8+egzXFsrJ zPCtRq;eqFuAL0EBAMfs;Ei^@MZc0@m-3!N^58RI9j)c^b@JPs%Ztyi>iW;saq@ZSd z?T)i>{ulebn(#6&X5BV2wST2l&kAb8F0LSi2Io*;ua?jlLemSX*fMMmb{K}YUnV~lTxw{=>lfHtz`loT zMp1Fb;UK8vmKjA^WGqtII45v;(=%if+%%=gltu;76F9=I+5SZ2)Hi2me9TDf_r)t` qf~3k Date: Thu, 31 Oct 2024 09:53:37 -0400 Subject: [PATCH 2/5] fix corneal reflection loading --- facemap/gui/io.py | 13 +++++++------ setup.py | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/facemap/gui/io.py b/facemap/gui/io.py index 6b2a443..38a4953 100644 --- a/facemap/gui/io.py +++ b/facemap/gui/io.py @@ -185,6 +185,7 @@ def open_proc(parent, file_name=None): parent.sigma_box.setText(str(r["pupil_sigma"])) else: psig = None + parent.ROIs.append( roi.sROI( rind=r["rind"], @@ -201,8 +202,6 @@ def open_proc(parent, file_name=None): ivid=r["ivid"], ) ) - parent.update_ROI_vis_comboBox() - parent.ROIs[-1].position(parent) if "reflector" in r: for i, reflector_roi in enumerate(r["reflector"]): @@ -214,8 +213,7 @@ def open_proc(parent, file_name=None): reflector_roi["xrange"][-1] - reflector_roi["xrange"][0], ] - parent.rROI[-1].append( - roi.reflectROI( + parent.rROI[-1].append(roi.reflectROI( iROI=r["iROI"], wROI=i, pos=pos, @@ -223,8 +221,11 @@ def open_proc(parent, file_name=None): yrange=reflector_roi["yrange"], xrange=reflector_roi["xrange"], ellipse=reflector_roi["ellipse"], - ) - ) + )) + + parent.update_ROI_vis_comboBox() + parent.ROIs[-1].position(parent) + if parent.fullSVD: parent.iROI = k - 1 else: diff --git a/setup.py b/setup.py index dbb2fec..8f258d1 100644 --- a/setup.py +++ b/setup.py @@ -4,12 +4,12 @@ import setuptools install_deps = [ - "numpy>=1.16", + "numpy>=1.16,<2.0", "scipy", "natsort", "tqdm", "numba>=0.43.1", - "opencv-python-headless", + "opencv-python-headless<4.10", "torch>=1.9", "h5py", "scikit-learn", From 222fb6faff19085e1f455606a5684e3bd285a43b Mon Sep 17 00:00:00 2001 From: Carsen Stringer Date: Thu, 31 Oct 2024 09:57:03 -0400 Subject: [PATCH 3/5] adding drag and drop for _proc.npy files --- facemap/gui/gui.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/facemap/gui/gui.py b/facemap/gui/gui.py index 10f6814..aad12c0 100644 --- a/facemap/gui/gui.py +++ b/facemap/gui/gui.py @@ -385,7 +385,10 @@ def dropEvent(self, event): url = event.mimeData().urls()[0] if url.isLocalFile() and url.toString().endswith(('.mp4', '.avi')): video_path = url.toLocalFile() - io.open_file(self, (video_path, 'Movie files (*.h5 *.mj2 *.mp4 *.mkv *.avi *.mpeg *.mpg *.asf *m4v)')) + io.open_file(self, (video_path, 'Movie files (*.h5 *.mj2 *.mp4 *.mkv *.avi *.mpeg *.mpg *.asf *.m4v)')) + elif url.isLocalFile() and url.toString().endswith((".npy", ".mat")): + proc_path = url.toLocalFile() + io.open_proc(self, proc_path) def make_buttons(self): # ~~~~~~~~~~~~~~~~~~~~~~~~ SVD variables ~~~~~~~~~~~~~~~~~~~~~~~~ From e82438620495544144c2b4c2f2459f7987989547 Mon Sep 17 00:00:00 2001 From: Carsen Stringer Date: Thu, 21 Nov 2024 10:42:44 -0500 Subject: [PATCH 4/5] enabling pupil only processing and turning off fullscreen --- facemap/gui/gui.py | 23 +++++++++++------------ facemap/process.py | 1 + 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/facemap/gui/gui.py b/facemap/gui/gui.py index aad12c0..4d4b90c 100644 --- a/facemap/gui/gui.py +++ b/facemap/gui/gui.py @@ -74,7 +74,7 @@ def __init__( QtCore.QCoreApplication.setApplicationName("Facemap") pg.setConfigOptions(imageAxisOrder="row-major") - self.setGeometry(15, 5, 1470, 800)#(55, 5, 1470, 800) + self.setGeometry(15, 5, 1700, 800)#(55, 5, 1470, 800) self.setWindowTitle("Facemap") self.setStyleSheet("QMainWindow {background: 'black';}") self.styleUnpressed = ( @@ -120,7 +120,7 @@ def __init__( self.central_widget.setLayout(self.scene_grid_layout) # --- cells image self.sizeObject = QtGui.QGuiApplication.primaryScreen().availableGeometry() - self.resize(self.sizeObject.width(), self.sizeObject.height()) + #self.resize(self.sizeObject.width(), self.sizeObject.height()) self.video_window = pg.GraphicsLayoutWidget() self.video_window.viewport().setAttribute(QtCore.Qt.WidgetAttribute.WA_AcceptTouchEvents, False) @@ -1238,16 +1238,15 @@ def process_batch(self): print(files) for file_idx, f in enumerate(files): proc = np.load(f, allow_pickle=True).item() - if proc["motSVD"] or proc["movSVD"]: - savename = process.run( - proc["filenames"], - motSVD=proc["motSVD"], - movSVD=proc["movSVD"], - GUIobject=QtWidgets, - proc=proc, - savepath=proc["save_path"], - ) - self.update_status_bar("Processed " + savename) + savename = process.run( + proc["filenames"], + motSVD=proc["motSVD"], + movSVD=proc["movSVD"], + GUIobject=QtWidgets, + proc=proc, + savepath=proc["save_path"], + ) + self.update_status_bar("Processed " + savename) if self.keypoints_checkbox.isChecked(): self.filenames = proc["filenames"] self.bbox = proc["pose_settings"]["bbox"] diff --git a/facemap/process.py b/facemap/process.py index 1d46e19..b688dac 100644 --- a/facemap/process.py +++ b/facemap/process.py @@ -710,6 +710,7 @@ def run( Lybin, Lxbin, iinds = binned_inds(Ly, Lx, sbin) LYbin, LXbin, sybin, sxbin = utils.video_placement(Lybin, Lxbin) + # number of mot/mov ROIs nroi = 0 if rois is not None: for r in rois: From 8f36db471c497e008d164732c4d74149e715ad3d Mon Sep 17 00:00:00 2001 From: Carsen Stringer Date: Wed, 27 Nov 2024 14:09:51 -0500 Subject: [PATCH 5/5] removing mac / windows tests --- facemap/.github/workflows/test_and_deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/facemap/.github/workflows/test_and_deploy.yml b/facemap/.github/workflows/test_and_deploy.yml index 1fb3ff4..60431b9 100755 --- a/facemap/.github/workflows/test_and_deploy.yml +++ b/facemap/.github/workflows/test_and_deploy.yml @@ -20,7 +20,8 @@ jobs: runs-on: ${{ matrix.platform }} strategy: matrix: - platform: [ubuntu-latest, windows-latest, macos-latest] + platform: [ubuntu-latest] + #, windows-latest, macos-latest] python-version: [3.8, 3.9, "3.10"] steps: