deepcell-label
deepcell-label copied to clipboard
Unreliable addition of cell types on Mac M1/M2
Describe the bug When selecting cell types to add through either the left hand "add cell" option or the plot, different cells are added than what is selected. This only happens about half of the time, but it makes adding cells completely unreliable. We have narrowed this issue down to something that is only showing up on Macs with the new M1 or M2 chip.
This is an example of selecting cells using the scatter plot. The first image shows selected cells with outlines and the second shows the cells that were actually added to the pink class. Some selected cells did not get added and some that were unselected were added anyway.
The same behavior appears when selecting individual cells on the canvas.
@msschwartz21 Did you work with an M1/M2 machine with DCL when you used it in the past? I wonder if you could replicate #362 now as well.
@ykevu I only recently got a new computer with an M1 chip so all of my previous usage of DCL was on an older mac. I can reproduce the issue Ellen described with this link (https://label.deepcell.org/project?projectId=JEer_0FNmjoJ&download=true).
I tested this on an M1 machine with the gpu disabled (via asahi linux) and AFAICT the mislabeling problem is not present. This indicates the the problem likely lies somewhere in stack related to the GPU, i.e. gpujs or below, and not with the deepcell-label code itself.
This is not necessarily great news as it means the path to identifying/fixing the problem is more complicated. OTOH a "quick fix" would be to disable hardware rendering when using deepcell label on macos w/ m1/m2 chips, but I have no idea how/whether this is possible in macos.