juglab / n2v

This is the implementation of Noise2Void training.
Other
387 stars 107 forks source link

Problem with config #104

Closed LeGabriel closed 3 years ago

LeGabriel commented 3 years ago

Hello,

I hope you are doing well.

I have a problem When I try to use the example file for denoising_2D_RGB for prediction.

It gives me an error :

Traceback (most recent call last): File "C:\Users\Gabriel\Desktop\autres\Noise\TestingBoy.py", line 11, in model = N2V(config=None, name=model_name, basedir=basedir) File "C:\Users\Gabriel\AppData\Local\Programs\Python\Python37\lib\site-packages\n2v\models\n2v_standard.py", line 93, in init self._set_logdir() File "C:\Users\Gabriel\AppData\Local\Programs\Python\Python37\lib\site-packages\n2v\models\n2v_standard.py", line 425, in _set_logdir raise FileNotFoundError("config file doesn't exist: %s" % str(config_file.resolve())) FileNotFoundError: config file doesn't exist: models\n2v_2D\config.json

Do you have any idea on how to solve this ?

Thanks a lot for you work.

Gabriel

tibuch commented 3 years ago

Hi @LeGabriel,

Sorry this issue slipped my attention. It looks like you are trying to load a model that does not exist. If you run the denoising_2D_RGB training notebook first, the model file should be created.

I will put a note into the prediction notebook. Thank you for reporting :)

LeGabriel commented 3 years ago

No problem! I just realised this problem by using another version of this algorithm. This problem was quickly solved in the end, the mistake was mine :)

Thanks a lot for your answer ;)

patquem commented 1 year ago

Hello, Is there a way to specifiy a user location for model saving. For me, this should be the role of the 'basedir' argument, but what ever you type in, N2V doesn't take into account the 'basedir' location and waits for a model in ./models. Patrick

tibuch commented 1 year ago

In train you provide basedir and model_name and in predict you have to provide the same combination.

patquem commented 1 year ago

Hi @tibuch, Thanks a lot for your answer. you are perfeclty right, I didn't use the same basedir for training and prediction. Shame on me. Patrick