Open mohammadsohaib opened 2 months ago
Thanks for providing a download link; we'll give it a look. I'm hoping this is something we can fix with different parameters.
those strides look way too huge
mesmerize-core can help you determine optimal params in a more structured way: https://github.com/nel-lab/mesmerize-core
@kushalkolar Thanks for the suggestion, I will look into mesmerise as well. I did start with a small stride value eg:48 and then increased it.
@pgunn Could you provide any suggestions after reviewing the TIFF file? @kushalkolar mesmerize-core looks promising, however, i ran into an error while running the demo.
I ran some more experiments, and upon viewing the TIFF files, it appears that the algorithm did a good job. However, I am a bit puzzled as to why the local correlation and maximum projection still look poor.
I also conducted some tests of my own, mimicking the logic of CaImAn motion correction, albeit in a simpler manner (just for a sanity check of motion correction). Using a rigid template, I was able to achieve a pretty good result visualised with normalized cross-correlation. This kind of hints that the caiman rigid motion correction would/might do a satisfactory job as well. However, these local correlations graphs always look bad.
Your setup:
For validation, I have been analyzing both the maximum projection and correlation images as suggested in the demo. However, the motion-corrected images appear significantly degraded when compared to the original data.
I have attached a figure comparing the original and motion-corrected images, as well as a demo movie for reference.
Parameters Used: PW-Rigid parameters:
Dataset-dependent parameters: Objective Zoom (1.5x) 20X lens, frame rate: 30, frame size: 512X512 I would appreciate any insights or suggestions on what might be causing this issue, and how to improve the motion correction process.
Thank you for your assistance.
Link to the demo video: https://drive.google.com/file/d/1dC-sA7IWZwXLmfKHU2fP_mGZSqNFBUQN/view?usp=drive_link