Comments (8)
Hi there!
I'm having an issue with Batch Processing, as well. I have the most up-to-date version of conda, and just tried installing FaceMap both through creating a new conda environment as described in the README and through pip install/pip --upgrade
in another new environment, and neither way is working. I should mention that I ran into a Pip error during the conda installation (and subsequently had errors that said WARNING: Ignoring invalid distribution ~yqt5-sip
(though pyqt5 did get installed). After these errors occurred I went through the environment.yml file and installed all the packages either through pip
or conda
as described in the .yml
file.
There are separate problems I'm experiencing depending on the installation method, so I'll describe them both.
When installing with pip
, it seems that it is not saving the selected ROIs in the output folder when that button is pressed, and then when loading multiple videos the Batch Process button remains grey.
When using the save ROIs button, here is the error shown in the command window:
Error reading frame
Traceback (most recent call last):
File "C:\Users\Micha\Anaconda3\envs\Lu Lab\lib\site-packages\facemap\gui.py", line 501, in go_to_frame
self.jump_to_frame()
File "C:\Users\Micha\Anaconda3\envs\Lu Lab\lib\site-packages\facemap\gui.py", line 533, in jump_to_frame
self.next_frame()
File "C:\Users\Micha\Anaconda3\envs\Lu Lab\lib\site-packages\facemap\gui.py", line 565, in next_frame
self.imgs[i][:,:,:,2] = im[i]
IndexError: list index out of range
Y:/Jui-Yen Huang/Derived Files/Data/In vivo Calcium Imaging/20210516_0528_jRGECO1a_FGFR-tri-Ncre64-2/20210516_jRGECO1a_FGFR-tri-Ncre64-2_P11/Behavior
Traceback (most recent call last):
File "C:\Users\Micha\Anaconda3\envs\Lu Lab\lib\site-packages\facemap\gui.py", line 637, in save_ROIs
'filenames': self.filenames, 'iframes': self.iframes}
AttributeError: 'MainW' object has no attribute 'iframes'
Y:/Jui-Yen Huang/Derived Files/Data/In vivo Calcium Imaging/20210516_0528_jRGECO1a_FGFR-tri-Ncre64-2/20210516_jRGECO1a_FGFR-tri-Ncre64-2_P11/Behavior
Traceback (most recent call last):
File "C:\Users\Micha\Anaconda3\envs\Lu Lab\lib\site-packages\facemap\gui.py", line 637, in save_ROIs
'filenames': self.filenames, 'iframes': self.iframes}
AttributeError: 'MainW' object has no attribute 'iframes'
Y:/Jui-Yen Huang/Derived Files/Data/In vivo Calcium Imaging/20210516_0528_jRGECO1a_FGFR-tri-Ncre64-2/20210516_jRGECO1a_FGFR-tri-Ncre64-2_P11/Behavior
Traceback (most recent call last):
File "C:\Users\Micha\Anaconda3\envs\Lu Lab\lib\site-packages\facemap\gui.py", line 637, in save_ROIs
'filenames': self.filenames, 'iframes': self.iframes}
AttributeError: 'MainW' object has no attribute 'iframes'
When installing with conda
, the Batch Process button is available, and I am able to save the ROIs, but then pressing the Batch Process button first causes an OpenCV error and then either crashes the application or makes following attempts not work either. Here is the OpenCV error I am getting:
[ERROR:0] global C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-obtuy4a_\opencv\modules\videoio\src\cap.cpp (162) cv::VideoCapture::open VIDEOIO(CV_IMAGES): raised OpenCV exception:
OpenCV(4.5.2) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-obtuy4a_\opencv\modules\videoio\src\cap_images.cpp:267: error: (-215:Assertion failed) number < max_number in function 'cv::icvExtractPattern'
QGraphicsScene::removeItem: item 0x1b7c074b0b0's scene (0x0) is different from this scene (0x1b7c0e3b1b0)
Traceback (most recent call last):
File "C:\Users\Micha\FaceMap\facemap\menus.py", line 17, in
openFolder.triggered.connect(lambda: io.open_folder(parent))
File "C:\Users\Micha\FaceMap\facemap\io.py", line 37, in open_folder
load_movies(parent)
File "C:\Users\Micha\FaceMap\facemap\io.py", line 251, in load_movies
parent.jump_to_frame()
File "C:\Users\Micha\FaceMap\facemap\gui.py", line 747, in jump_to_frame
self.imgs[i][:,:,:,1] = self.img[i].copy()
ValueError: could not broadcast input array from shape (1080,1920,3) into shape (0,0,3)
Do you know what I can do to get the Batch Processing working?
Thanks for the help and for making all these awesome packages!!
-- Michael
from facemap.
Hello @Michaelhess17,
Please pull recent changes from the main branch (using the instructions below) to avoid "AttributeError: 'MainW' object has no attribute 'iframes'"
git clone https://github.com/MouseLand/facemap.git
Remove old conda environment for facemap and follow steps 1-5 for using the updated environment.yml file.
For batch processing, please follow the instructions after cloning the updated version. The opencv error seems to indicate some issue with loading video so make sure you are able to load the video and 'process ROIs' before proceeding with 'process batch'.
from facemap.
Hello @dgbarson,
Are you trying batch processing of multiple ROIs from multiple videos taken simultaneously?
If your files are overwritten, I'd recommend storing file1.avi, file2.avi.. in separate folders and then use batch process for the different sets of ROIs independently.
from facemap.
Hey again!
I tried installing Facemap by creating a Conda environment with the GitHub environment.yml on a couple of machines (one with an outdated version of Conda, and one that's up-to-date) and I am still receiving the same error ("AttributeError: 'MainW' object has no attribute 'iframes'"), unfortunately!
Do you know anything else we might try?
Thanks again!
from facemap.
Hi @Michaelhess17, the error tells me that your version of the code is different from the main branch. You can confirm that by searching for 'iframes' variable in your code and check against the relevant file and line number on the main branch. Hence, you will have to make sure your code is the same as main branch to avoid the error.
from facemap.
from facemap.
from facemap.
Thank you so much! As far as I can tell, this is working now!
from facemap.
Related Issues (20)
- error while trying to analyze motion svd HOT 2
- BUG: savepath issue within the run function in process.py HOT 3
- BUG: Error in reading frame? HOT 1
- BUG: singular values for more than 1 ROI are not stored in `S_mot` and `S_mov`
- BUG: IndexError when processing multiple non-simultaneous videos HOT 1
- FEATURE: increase default batch_size
- BUG: OverflowError HOT 1
- ROI Inspection in Multiple Video Files Using GUI HOT 2
- BUG:IndexError: list index out of range (process_ROIs-savename = process.run) HOT 12
- BUG: 'motion' variable is an array of ideantical values although avgmotion return a reasonable output HOT 5
- DOC: <Finetune model to refine keypoints for a video> HOT 5
- bug report about neural date load HOT 1
- FEATURE: GPU enablement in Python API HOT 1
- Data confusion HOT 1
- FEATURE: multiple paw keypoints HOT 4
- BUG: keypoints predictions often outside image
- BUG: ops_user.npy saving different directory HOT 1
- BUG: SVD error "IndexError: list index out of range" HOT 2
- BUG: <Enter comprehensive title here> HOT 1
- Error installing facemap on Linux: PyQt6 - Preparing metadata (pyproject.toml) did not run successfully. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facemap.