aelefebv / nellie

Nellie: Automated organelle segmentation, tracking, and hierarchical feature extraction in 2D/3D live-cell microscopy
Other
30 stars 4 forks source link

a difference between the code and the paper about Frangi Filter #19

Closed Jane007-GUO closed 4 months ago

Jane007-GUO commented 4 months ago

I found a difference between the code and the paper about Frangi Filter in line 169 of nellie\segmentetion\filtering.py

1713948410459

in the paper rb_sq=(abs(λ1)/sqrt(abs(λ2)abs(λ3)))**2, but in the code the numerator is λ2, i wonder if it's a mistake or the author has some other considerations.

Thanks~

aelefebv commented 4 months ago

Wow! Great catch. This was not intentional. I am running simulation-based validation studies now. I’ll see if changing this parameter to the traditional Frangi parameter works better, otherwise I will leave it.

Thanks a lot for going through the code!

aelefebv commented 4 months ago

So, I've just run the validation studies, and it turns out keeping the second largest eigenvalue as the numerator marginally improves f1 and IoU of objects of different sizes and intensities. This actually makes sense since this deemphasizes purely linear structures and balances it for detection towards both linear and blob-like structures. It is now officially a feature, and not a bug. Thanks again for pointing this out!

Jane007-GUO commented 4 months ago

It's really interesting and also gives me some inspiration for designing structural response functions. I am glad to be of help and wish you all the best in your work : )