Skip to content

aubricot/CV_for_flower_CT

Repository files navigation

CV_for_flower_CT

Computer vision for micro-CT datasets of flowers using UNETR and MONAI
Last updated 6 May 2025

The code in this repository is used to evaluate computer vision as a tool for analyzing floral micro-CT datasets of cacao (Theobroma cacao). It is built in Google Colab Notebooks with Python 3 and MONAI Core 1.5. Micro-CT datasets and labels were generated in 3D Slicer as .nrrd files. They are converted to NIFTI (.nii.gz) format and registered to eachother in preprocessing_whole_flower_nrrd2nifti.ipynb. UNETR is trained to recognize whole flower outlines from CT data in Cacao_Whole_Flower_Seg_unetr_train.ipynb. Results are visualized on input and output images to generate figures and interpret results in Cacao_Whole_Flower_Seg_unetr_inspect_results.ipynb.

Schema of CT training inputs and model ouputs for a cacao flower.

Sample model input image and label along with predicted output.

Interactive 3D models of UNETR Model ground truth (label), output (raw), and output (post-processed) are available on Sketchfab

Data and model availability

Three versions of the training datasets (micro-CT images of flowers and their corresponding segmentation files) are available on Zenodo (masked training data used to train best models, unmasked training data with cleaned segmentations and exclusion critera, unmasked training data with original segmentations and no exclusion criteria). Train notebooks for the 5 best trianing attempts and their corresponding train graphs are available on Zenodo. The best trained model acheived a Dice Score of 0.82 and is available on HuggingFace.

References

1Tomar 2021. What is UNET? Medium, 15 March 2025.
2Hatamizadeh et al. 2021. UNETR: Transformers for 3D Medical Image Segmentation. Accepted to IEEE Winter Conference on Applications of Computer Vision (WACV) 2022.
3MONAI GitHub.
4Cardoso et al. 2022. MONAI: An open-source framework for deep learning in healthcare. arXiv.
5Kikinis et al. 2013. 3D Slicer: A Platform for Subject-Specific Image Analysis, Visualization, and Clinical Support.
63D Slicer Software.

License

Code
Code in this repository is released under the MIT license. More information is available at the Open Source Initiative. Parts of Cacao_Whole_Flower_Seg_unetr.ipynb are listed under a different license.
Images
Images and their corresponding licenses will be updated shortly.

About

Computer vision for micro-CT datasets of flowers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published