Skip to content

Conversation

@chantelleleveille
Copy link
Collaborator

@chantelleleveille chantelleleveille commented Nov 19, 2024

Add backdrop images to TFE

Generatating MIPS

  • Raw images are loaded from S3 (quilt)
  • Maximum Z projection images are generated the same way as Figure 1 image.
  • Image is downsampled by half to make it load very quickly on the website.

Note: When I made the max intensity z projects using skimage resize method the resulting image looks much better than the precomputed zarr resolution_level equivalent. I made it an option in the function to do it either way, but the default behavior is im1! See example below:

im1 = save_colony_backdrop_mips('small', figdir, downsample_factor=2, zarr_res_level=0)
im2 = save_colony_backdrop_mips('small', figdir, downsample_factor=None, zarr_res_level=1)
Skimage resize (im1) Precomputed Zarr (im2)
1 0

The difference is that the precomputed zarr uses skimage resize with the order of interpolation set to nearest neighbor, whereas the skimage resize default in this method is set to bi-linear!

TFE integration

  • Backdrops only need to be generated once. This step will be slow.
  • After that use the flag --make_backdrops False to use previously generated images (similar to --noframes)

Here is a preview link for the Large colony in the exploratory dataset. Preview Link (will only work internally)

@chantelleleveille chantelleleveille marked this pull request as ready for review November 22, 2024 00:06
Copy link
Contributor

@ShrimpCryptid ShrimpCryptid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Excited to see this change in the NucMorph datasets :)

@jcass11
Copy link
Collaborator

jcass11 commented Nov 22, 2024

Testing by running with default behavior for one colony and filter/dataset (small colony, exploratory) pdm run nuc_morph_analysis/lib/visualization/write_data_for_colorizer.py --dataset small --filter exploratory_dataset
I will follow up when it finishes!
I looked at the sample link and made sure the features look right/there's no flickering on segmentations or out of order frames (common accidents that creep in to TFE data) and generally played around and everything looked great/seamless
Beautiful work!

Copy link
Collaborator

@jcass11 jcass11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My test of this update ran without error and everything looks good! Thank you!

@chantelleleveille
Copy link
Collaborator Author

@pgarrison @cfrick13 this looks like it has 2 approvers but I still need one more because Peyton's doesn't count.

@ShrimpCryptid
Copy link
Contributor

@pgarrison @cfrick13 this looks like it has 2 approvers but I still need one more because Peyton's doesn't count.

😔

@chantelleleveille chantelleleveille added this pull request to the merge queue Nov 26, 2024
Merged via the queue into dev with commit d031dfe Nov 26, 2024
1 check passed
@chantelleleveille chantelleleveille deleted the TFE_mip branch November 26, 2024 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants