AllenInstitute / visual_behavior_analysis

Python package for analyzing behavioral data for Brain Observatory: Visual Behavior
Other
22 stars 6 forks source link

visual_behavior.data_access.loading.get_sdk_segmentation_mask_image looks to be buggy... #664

Open njmei opened 4 years ago

njmei commented 4 years ago

FYI: @matchings

In the process of testing: https://github.com/AllenInstitute/AllenSDK/pull/1695 I discovered what looks to be bug in the visual_behavior implementation for getting a segmentation mask image.

See: https://gist.github.com/njmei/fe219cec20033e9817c89f5853b14692

In cell 3 of the gist I try using the visual_behavior method for accessing the segmentation mask image. The resulting mask image looks nothing like the average/max projection images.

In cell 6 of the gist I used only AllenSDK functions to get the segmentation mask image and got saner results.

DowntonCrabby commented 4 years ago

I'm wondering if the visual behavior method filters out invalid rois and the sdk version does not?

njmei commented 4 years ago

Yes, it is likely the case that the SDK version does not filter out invalid ROIs.

That said, it looks like the segmentation mask images demonstrated in the gist are far too different for it to be simply an invalid ROI filtering issue. As an example, take a look at the top left corner of both images and you'll see that there does not seem to be any correspondence whatsoever...