tbepler / topaz

Pipeline for particle picking in cryo-electron microscopy images using convolutional neural networks trained from positive and unlabeled examples. Also featuring micrograph and tomogram denoising with DNNs.
GNU General Public License v3.0
170 stars 62 forks source link

denoise training using tif format movie file #148

Closed ning-2022 closed 2 years ago

ning-2022 commented 2 years ago

Hi, I have a question about denoise training of topaz, that is how to use the tif format movie file collected from titan krios EM for denoise training. I know that in the tutorial, the author use the mrc format movie file to train the denoise model. Any suggestions are welcome. Thanks in advance!

Ning

tbepler commented 2 years ago

Topaz can parse tif files without any issue. However, denoise train does not work on the movie frames. These need to be aligned and summed first.

ning-2022 commented 2 years ago

Thanks for your help. I had successfully split the movie frames and summed them into two group mrc files. However, a new problem had been appeared when I tried to train the denoise model for micrographs. Here is the error information:

...... 93 0.9685644149780274 0
94 0.9719996452331543 0
95 0.9726578831672669 0
96 0.972616457939148 0
97 0.9692490220069885 0
98 0.971499752998352 0
99 0.9668266415596009 0
100 0.9698738217353821 0
Traceback (most recent call last): File "/home/spuser/WN/anaconda3/envs/topaz/bin/topaz", line 33, in sys.exit(load_entry_point('topaz-em==0.2.5', 'console_scripts', 'topaz')()) File "/home/spuser/WN/anaconda3/envs/topaz/lib/python3.6/site-packages/topaz/main.py", line 148, in main args.func(args) File "/home/spuser/WN/anaconda3/envs/topaz/lib/python3.6/site-packages/topaz/commands/denoise.py", line 535, in main if not os.path.exists(args.output): File "/home/spuser/WN/anaconda3/envs/topaz/lib/python3.6/genericpath.py", line 19, in exists os.stat(path) TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

I just use the command:
topaz denoise -a partA/ -b partB/ --save-prefix models/ Please help me, I'm not good at python programming.

Ning

tbepler commented 2 years ago

Actually, this looks like a bug in topaz denoise. You can work around it by setting the --output flag to a directory name (like --output ./).

Really, when training the denoising model without passing any additional micrographs to denoise, though, we shouldn't require this parameter. @DarnellGranberry can you add a quick check for len(micrographs) < 1 and skip processing if it is to avoid this problem?

DarnellGranberry commented 2 years ago

Just added the check. @ning-2022 if you're using v0.2.5 (from pip/conda), then you will still need to use the workaround Tristan gave; if you installed from source, then you can pull master for the updated lines.

ning-2022 commented 2 years ago

Thanks for your help. This problem has been solved by the solution you gave.

Best,

Ning

从 Windows 版邮件https://go.microsoft.com/fwlink/?LinkId=550986发送

发件人: Darnell @.> 发送时间: 2022年6月30日 23:49 收件人: @.> 抄送: @.>; @.> 主题: Re: [tbepler/topaz] denoise training using tif format movie file (Issue #148)

Just added the check. @ning-2022https://github.com/ning-2022 if you're using v0.2.5 (from pip/conda), then you will still need to use the workaround Tristan gave; if you installed from source, then you can pull master for the updated lines.

― Reply to this email directly, view it on GitHubhttps://github.com/tbepler/topaz/issues/148#issuecomment-1171384990, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AZS5ZQEZB3TCX2KMJETGMQDVRW6WXANCNFSM5YRFHE6A. You are receiving this because you were mentioned.Message ID: @.***>