Visual acuity, the ability to perceive detail, is ecologically important, as it dictates what aspects of a visual scene an animal can resolve. The study of visual acuity in bee species helps biologists understand their evolutionary history and gain insight into their foraging strategies and navigation abilities. Sponsored by the Caves Lab, this project aims to design a pipeline that uses high-resolution 2D photos taken by the NSF-funded Big Bee Project to estimate visual acuity across different bee species. In the pipeline, we develop algorithmic approaches to measure the diameter of the ommatidia
Our codes are updated based on the open-source code provided in https://github.com/jpcurrea/ODA, which is the offcial implementation of Currea, J.P., Sondhi, Y., Kawahara, A.Y. et al. Measuring compound eye optics with microscope and microCT images. Commun Biol 6, 246 (2023).
Ommatidia Detection Algorithm & Contour Analysis
- Please follow the installation guide in https://github.com/jpcurrea/ODA.
- Manually download pytesseract package based on your machine types for scale bar detection
Segment Anything(SAM)
We deploy the newly released Segment Anything Model to help us segment the shape of bee's eyes with simple prompts, such as bounding box and points. We require a GPU with at least 8GB memory when making inferences with the SAM model. Cuda and following python packages are required to run SAM/segment_eyes.ipynb
:
- download CUDA 11.8
- open the terminal and type
nvcc -V
to check if CUDA runs successfuly - create a new conda environmet
conda create -n SAM python==3.8
- activate the environment:
conda activate SAM
- download PyTorch with pip commmand provided
- download the SAM checkpoint and save it in
test_bee/SAM
folder
Here, we provide 145 bee specimens collected at UCSB Cheadle Center. Each image was obtained by synthesizing multiple identical 6000*4000 pixel bee photos with varying focal points, allowing for the creation of high-resolution representations of different sections of the bee.
Please download the data and save it in the test_bee/data