seung-lab / kimimaro

Skeletonize densely labeled 3D image segmentations with TEASAR. (Medial Axis Transform)
GNU General Public License v3.0
135 stars 23 forks source link

feat: avocado protection (🥑) #43

Closed william-silversmith closed 4 years ago

william-silversmith commented 4 years ago

Addresses #40

This will get us to about 70% avocado protection but doesn't seem to fix sliced avocados nor dirty avocados yet. I have some ideas though...

william-silversmith commented 4 years ago

Avocado 🥑

image

Double Avocado 🙀 🥑 🥑

image

Can fix this by running the avocado fixer until steady state is reached.

Smashed Avocado 🥑 🔨

image

lmao

Sliced Avocado 🔪 🥑

image

Dirty Avocado 🗑️ 🥑

Inclusions touch the border preventing hole filling from functioning.

image
william-silversmith commented 4 years ago

In one sample:

image
william-silversmith commented 4 years ago

Actually, some of the smashed avocados will be repaired by this technique, so more like 70% repairable?

william-silversmith commented 4 years ago

Looking at the sample again, it's fixing 11 out of 14 completely. Of the three: 2 are "dirty avocados". One has inclusions confined to the border, so it will be fine. One has inclusions that extend into the cell, which is more problematic. The last is a sliced avocado that failed it seems because the slice extended across two slices and blocked 3/6 votes, failing to achieve a majority.

For dirty avocados, maybe we can try painting the wall before filling?

william-silversmith commented 4 years ago

There's a bug in fastremap and we'll need to update for this test to work.

william-silversmith commented 4 years ago

Slow but it seems to mostly work. Dirty avocados won't be fully fixed if the inclusions touch the edges of the box. We're using a fudge factor of 2.5 to try to capture nucleii.

With the latest changes, it looks like 13/14 avocados are fully fixed (93%) with one partially fixed in my test set.