Closed lyprince closed 6 years ago
Hi Luke,
This array shapes comes from one patch that is smaller than your original dims. Do you still have this problem of mismatch?
If yes, can you send me a sample of you dataset and your parameters?
Guillaume
Hi Guillaume,
I don't know what the appropriate patch size is, so I still have the mismatch.
Here is a link to an example dataset: https://drive.google.com/file/d/1vY_VDeRLkUSlCMdOt8UV0P1w77bk0OWx/view?usp=sharing
and here is a link to parameters I'm using: https://drive.google.com/open?id=1gbmx7CuLns1JcKZKFlIAxxMyojxIYI3I
The parameters are the same as the example parameters at the moment, except for the frame rate and temporal downsampling factor.
Thanks, Luke
Hi Luke,
The bug was the temporal dowsampling factor. Thanks for letting me know. I fixed this bug and it should work now. Can you test again your dataset and keep me updated? (I didn't went to the end of the analysis so there might be other bugs).
Guillaume
Thanks Guillaume.
I tested with my dataset. It ran all the way through, but apparently no cells were found - the output matrices were empty. I thought it might be because I had used a lossy encoder ('mpeg4') to convert the video from its original .mkv format to .avi, so I tried it with a couple of lossless encoders. With h264 the file couldn't be opened, and with huffyuv some frames were not motion corrected properly and outputted as all NaNs, so CNMFE wouldn't run on it.
Can you recommend an encoder to use? Or should I adjust the parameters for detecting cells across frames? I'm new to this so I don't have much intuition for how these parameters affect the analysis.
@lyprince Just an advice after reading your post: don't use any encoder for miniscope data. Never. Unless you wrote one from scratch by yourself :)
I'm going to close this and open up some separate issues as there seem to be some issues with normcorre and cnmfe separately.
@DenisPolygalov I had to transcode the data as it was given to me in .mkv format written with a ffv1 encoder and yuv420p16le pixel format. Simply changing the container to .avi didn't work and couldn't be read - in converting a video to hdf5 format the parameters for PyAv to read the video didn't work. I eventually settled on a 'rawvideo' encoder and 'bgr24' pixel format as this is what is used in the example. Its lossless so it should be fine.
Hello, I am working on your movie. The cnmfe problem is mainly the parameters. I can detect neurons with this: parameters['cnmfe']['init_params']['thresh_init'] = 0.5 parameters['cnmfe']['init_params']['min_corr'] = 0.5 parameters['cnmfe']['init_params']['min_pnr'] = 0.75
You can change them directly in main_cnmf_e.py. I put them in the script as they are the most importants.
Although there is an issue with normcorre as well with some inf appearing. I am working on it right now.
Best Guillaume
Hi,
I'm trying to fit cnmfe to my own data. Its a video with 2357 frames, with dims=[486, 648].
A ValueError is thrown when initializing the fitting procedure:
Based on the dimensions of the data I don't know where these array shapes are coming from? Any help would be greatly appreciated
Luke