Stardist_ZeroCostDL4Mic errror running

Hi @Ricardo_Henriques ,

I was trying to run Stardist_ZeroCostLD4Mic including new images in the training set. The training looks ok, but in step 5 - Use the network I got this error:

OSError                                   Traceback (most recent call last)
<ipython-input-13-95cd261c8237> in <module>()
     48   if n_channel > 1:
     49     print("Normalizing image channels %s." % ('jointly' if axis_norm is None or 2 in axis_norm else 'independently'))
---> 50   model = StarDist2D(None, name=inference_model_name, basedir=inference_model_path)
     51   #model.optimize_thresholds(X_val, Y_val)
     52 

7 frames
/usr/local/lib/python3.6/dist-packages/stardist/models/model2d.py in __init__(self, config, name, basedir)
    251     def __init__(self, config=Config2D(), name=None, basedir='.'):
    252         """See class docstring."""
--> 253         super().__init__(config, name=name, basedir=basedir)
    254 
    255 

/usr/local/lib/python3.6/dist-packages/stardist/models/base.py in __init__(self, config, name, basedir)
    164 
    165     def __init__(self, config, name=None, basedir='.'):
--> 166         super().__init__(config=config, name=name, basedir=basedir)
    167         threshs = dict(prob=None, nms=None)
    168         if basedir is not None:

/usr/local/lib/python3.6/dist-packages/csbdeep/models/base_model.py in __init__(self, config, name, basedir)
     90             # config was provided -> update before it is saved to disk
     91             self._update_and_check_config()
---> 92         self._set_logdir()
     93         if config is None:
     94             # config was loaded from disk -> update it after loading

/usr/local/lib/python3.6/dist-packages/csbdeep/models/base_model.py in wrapper(*args, **kwargs)
     28                 warn is False or warnings.warn("Suppressing call of '%s' (due to basedir=None)." % f.__name__)
     29             else:
---> 30                 return f(*args, **kwargs)
     31         return wrapper
     32     return _suppress_without_basedir

/usr/local/lib/python3.6/dist-packages/csbdeep/models/base_model.py in _set_logdir(self)
    122         config_file =  self.logdir / 'config.json'
    123         if self.config is None:
--> 124             if config_file.exists():
    125                 config_dict = load_json(str(config_file))
    126                 self.config = self._config_class(**config_dict)

/usr/lib/python3.6/pathlib.py in exists(self)
   1334         """
   1335         try:
-> 1336             self.stat()
   1337         except OSError as e:
   1338             if e.errno not in (ENOENT, ENOTDIR):

/usr/lib/python3.6/pathlib.py in stat(self)
   1156         os.stat() does.
   1157         """
-> 1158         return self._accessor.stat(self)
   1159 
   1160     def owner(self):

/usr/lib/python3.6/pathlib.py in wrapped(pathobj, *args)
    385         @functools.wraps(strfunc)
    386         def wrapped(pathobj, *args):
--> 387             return strfunc(str(pathobj), *args)
    388         return staticmethod(wrapped)
    389 

OSError: [Errno 107] Transport endpoint is not connected: '/content/gdrive/My Drive/Colab Notebooks/Stardist_v2/Stardist/Models/My_model/config.json'

Any idea of what am I doing wrong?
Thank you

Mafalda

Forget it.
It worked, by restarting the session and not running again the training.
Maybe just Colab-Drive problems.

Thks

Hi Mafalda,

If you don’t mind, raise it as an issue here:
https://github.com/HenriquesLab/ZeroCostDL4Mic/issues

It’s easier for us to give feedback, trace and fix issues there.

All the best,
-Ricardo