AllenInstitute / ophys_etl_pipelines

Pipelines and modules for processing optical physiology data
Other
9 stars 5 forks source link

Test stability of ROI growth #322

Closed danielsf closed 3 years ago

danielsf commented 3 years ago

During the 8/27/2021 status update, Michael asked how stable the Feature Vector Segmenter's growth phase is against perturbations in the seed pixel (if you seed an ROI with a pixel that is not the absolute brightest in that ROI, does the FVS still find the same ROI). We can perform that test using a prototyping branch Scott used to generate visualizations of the ROI growth phase for the 8/27/2021 talk.

Tasks

Validation

danielsf commented 3 years ago

I have tested the stability of the ROI growth algorithm on ROIs from experiment 785569447. It appears to be very stable against perturbations to the seed pixel.

Below are galleries of plots demonstrating this stability. In each case, the first row shows the unperturbed growth. Subsequent rows show ROI growth when the seed pixel has been randomly displaced.

The first column shows the metric image thumbnail of the ROI. The green circle is the unperturbed seed pixel. The red circle shows the actual (perturbed) seed pixel used for that row. The red x's are the other pixels used in selecting timestamps for pixel-to-pixel correlation.

The first column shows the ROI mask after one iteration of ROI growth.

The second column shows the ROI mask after ROI growth has converged.

As you can see, while, in some cases, the first column can be sensitive to seed pixel perturbations, the final, converged ROI, is rather insensitive to seed pixel perturbations.

perturbation_0.png

perturbation_1.png

perturbation_2.png

perturbation_3.png

perturbation_4.png

perturbation_5.png

danielsf commented 3 years ago

The code to do this analysis and generate these figures exists in this branch

https://github.com/AllenInstitute/ophys_etl_pipelines/tree/danielsf/segmentation/visualize/growth

specifically, in this script

https://github.com/AllenInstitute/ophys_etl_pipelines/blob/danielsf/segmentation/visualize/growth/sfd_sandbox/segmentation/review_210827/perturb_growth.py