tbepler/topaz

denoise training using tif format movie file

ning-2022 opened this issue · 5 comments

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

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.

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

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?

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.