CellViT
CellViT copied to clipboard
edge_information["edge_patches"] can be None in cell_detection.py
Describe the bug Inside the function _clean_edge_cells of class CellPostProcessor inside cell_detection.py, it directly indexes the first element of edge_information["edge_patches"] via "edge_information["edge_patches"][0]", which can lead to an error, since the value of edge_information["edge_patches"] can be None, thus not subscriptable.
Screenshots
Additional context This bug shall easily be resolved by adding a None value check before indexing the first element:
if edge_information["edge_patches"] is None:
continue
Thanks for checking, I will put this on my list and check if this resolves the problem without any downstream error