[Paper Review] Head and Tail Localization of C. elegans
This paper proposes a deep learning approach using a VGG16-based convolutional neural network to directly regress head and tail coordinates of *C. elegans* in single-worm images, bypassing manual feature engineering. The method achieves 96.82% average PCK@15 accuracy on evaluation data, demonstrating robustness to lighting and imaging variations without hyperparameter tuning.
C. elegans is commonly used in neuroscience for behaviour analysis because of it's compact nervous system with well-described connectivity. Localizing the animal and distinguishing between its head and tail are important tasks to track the worm during behavioural assays and to perform quantitative analyses. We demonstrate a neural network based approach to localize both the head and the tail of the worm in an image. To make empirical results in the paper reproducible and promote open source machine learning based solutions for C. elegans behavioural analysis, we also make our code publicly available.
Motivation & Objective
- To develop a robust, automated method for distinguishing the head and tail of *C. elegans* in behavioral imaging data.
- To eliminate reliance on manually tuned thresholds and features that are sensitive to lighting and imaging conditions.
- To enable end-to-end training for coordinate regression without prior feature engineering.
- To improve reproducibility and scalability of *C. elegans* behavioral analysis across diverse experimental setups.
- To provide a publicly available, open-source solution for automated worm tracking and analysis.
Proposed method
- A fully convolutional neural network based on VGG16 is used to generate separate 5×5 heatmap predictions for head and tail locations.
- Heatmaps are normalized using a softmax function to represent the probability distribution over pixel locations for head and tail.
- The model is trained using mean squared error (MSE) loss between predicted and ground truth coordinates, with Jensen-Shannon divergence as a regularizer to control heatmap spread.
- Data augmentation includes random brightness adjustments (up to 12.5%) and 90°, 180°, and 270° rotations to improve generalization.
- Images are preprocessed by adaptive thresholding to extract bounding boxes, which are resized to 150×150 pixels and cropped to isolate the worm.
- The final model predicts head and tail coordinates directly from the heatmap peak locations, avoiding manual thresholding for angular features.
Experimental results
Research questions
- RQ1Can a deep learning model accurately localize the head and tail of *C. elegans* without relying on handcrafted features like angular bends or intensity thresholds?
- RQ2How does the model perform across varying lighting and imaging conditions without manual hyperparameter tuning?
- RQ3To what extent does the model generalize to unseen images when trained on diverse imaging conditions?
- RQ4Can the model achieve high localization accuracy using end-to-end coordinate regression with minimal architectural complexity?
- RQ5How does the model’s performance compare to existing methods that depend on threshold-based detection of head/tail features?
Key findings
- The model achieved 96.82% average PCK@15 accuracy on the evaluation set, indicating that predicted head and tail coordinates were within 15 pixels of the ground truth in 96.82% of cases.
- Head localization accuracy was 96.65% at PCK@15, while tail localization reached 96.98% at the same threshold, showing strong performance for both ends.
- The model achieved 94.24% PCK@7 accuracy for the head and 85.82% for the tail, demonstrating slightly better head detection at finer localization thresholds.
- The model maintained high performance across diverse imaging conditions due to end-to-end training and data augmentation, reducing sensitivity to lighting and scale variations.
- The method outperformed traditional approaches that rely on thresholded angular features or intensity differences, which are prone to error under lighting changes.
- The code is publicly available on GitHub, enabling reproducibility and extension to multi-worm tracking in future work.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.