oist / Usiigaci

Usiigaci: stain-free cell tracking in phase contrast microscopy enabled by supervised machine learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error upon merging masks

NoahDolev opened this issue · comments

Hi,

First, thank you for sharing your model.

I managed to implement your model and retrain it on 2p microscopy videos. I have some issues doing the model averaging part of the inference.

Traceback (most recent call last):
  File "Inference.py", line 356, in <module>
    postprocess(mask_duplicate_dir, avg_prediction_dir)
  File "Inference.py", line 271, in postprocess
    result = merge_multiple_detections(masks)
  File "Inference.py", line 194, in merge_multiple_detections
    overlapping_cells = list(np.unique(mask[cell_location]))
TypeError: 'NoneType' object is not subscriptable

Do you have any idea what could be causing this error?

Also, in a possibly related error, I occasionally see a non fatal error claiming the model can not write to the mask directory during inference. However, I notice that in spite of this message, there is indeed files written to these directories.

What do you think?

Cheers and thanks again,
Noah

Hi Noah,
Frankly, i've not run into the two problems you mentioned here on the systems we tested (ubuntu, mint linux, and windows 10).

do you see the files generated from each inference? (supposedly they should even if the averaging is not successful)

was the non fatal error from python side or on the tensorflow side.

It's recommended to install the specific tensorflow version we used.
I had some problesm before because the tensorflow development is going so quickly that our updates haven't catch up yet.