tbepler/topaz

Running topaz denoise

ojasvijain opened this issue · 7 comments

Hi I wanted some help in running topaz denoise. I am trying to follow the jupyter notebook for using the topaz denoising algorithm and want to use the pretrained model for some micrographs.

I created a conda environment called "topaz_denoising" and have cloned the repository in another folder called topaz/
now my directory structure looks like:

envs/topaz_denoising
topaz/topaz/./
data/micrographs/*.mrc (files)

can you help me with what commands i should run? currently the one in the jupyter notebook
topaz denoise --patch-size 1024 -o data/EMPIAR-10025/denoised/ data/EMPIAR-10025/rawdata/micrographs/*.mrc
is not working for me since it cant recognise topaz and denoise as commands.

Thanks!

Hello,

You don't need to clone the repository to install topaz. You can install it with conda in your newly created conda environment by following these directions: https://github.com/tbepler/topaz#install-topaz

You also don't need the Jupyter notebook to run commands. Once you have installed topaz and activated the environment, the following commands should confirm that topaz is installed and available in your terminal:

which topaz
topaz --version

From there, you should be able to run topaz denoise on your micrographs. I recommend saving your command in a text file or a script, to keep a record of which parameters you used.

I hope this helps!

Thank you for your response!

I followed the installation steps you mentioned. I'm getting the following error when i run
topaz --version

image

I have no idea what causes this error, sorry. All I can think of it to try again in an empty conda environment, in case this wasn't already what you did.
Last time I used this installation method it worked without any problem, on two different computers.

Thank you for your response

Surprisingly, it worked when I ran it again today morning, not sure why it gave that error yesterday!

I am now facing this issue while using the pretrained denoising unet model on running this command:
topaz denoise /vast/projects/miti2324/data/cryoppp_data/cryoppp/10017/micrographs/*.mrc -o /vast/projects/miti2324/trial_algorithms/topaz_denoising/output_imgs/ -m ./pretrained/denoise/unet_L2_v0.2.1.sav --patch-size 1024

The error is:
image

Looks like an error in loading the model in the script. What do you recommend I do?

The error seems pretty clear: Found no NVIDIA driver on your system.
Whether this is accurate or not I don't know, so first check that the command nvidia-smi returns a table with a list of GPUs. If it does, then there's a problem with your topaz installation not seeing the GPU. If it doesn't, then you need to try on a system with an nvidia GPU and the nvidia driver installed.

I have nvidia installed but the error still persists. I guess it just throws a warning for the GPU but should still work on the CPU.

However, the error per se seems to be while loading the model, especially in the model.eval() code block in main. Is this due to a version conflict? Here is my package list
image

It seems like the model path i was providing was incorrect so i just deleted with argument for it.

Its working perfectly now! Thanks