Abstract
This paper introduces a novel "sim2real" framework designed for high-accuracy pose estimation of laboratory animals, such as fruit flies and zebrafish, without the need for manual annotations on real images. The core innovation lies in the explicit decoupling of shape deformation from appearance transfer. By transforming simple synthetic models into realistic training data while preserving geometric joint locations, the proposed method bridges the domain gap between simulation and reality. Experimental results demonstrate significant improvements over existing unpaired image translation methods, providing a robust tool for neuroscience research.
Introduction
Neuroscientists require precise tracking of animal appendages—such as the six legs of a fruit fly—to understand how neural circuits control behavior. While deep learning has revolutionized human pose estimation, applying it to specialized laboratory organisms is challenging due to data scarcity and the labor-intensive nature of manual labeling. While synthetic data can be generated with perfect labels, the "sim2real" gap often renders these images ineffective for training models on real video. Furthermore, standard image translation tools like CycleGAN often introduce geometric distortions or "hallucinate" body parts, making original synthetic labels inaccurate for the translated images.
Methodology
The authors propose a Deformation-aware Unpaired Image Translation framework. Instead of a single-step translation, the process is divided into two distinct, controllable modules:
- Spatial Deformation ($G_S$): This module learns to warp the synthetic animal's shape to match the proportions and poses seen in real recordings. It employs a hierarchical approach using a Spatial Transformer Network (STN) for global transformations and a fully convolutional network for local, per-pixel warping. By working with binary silhouettes first, the model ensures geometric stability before textures are applied.
- Appearance Transfer ($G_I$): Once the shape is corrected, a U-Net generator "paints" realistic textures onto the deformed silhouette, focusing solely on matching the visual style of real infrared video.
Because the deformation is explicit and mathematical, the researchers can apply the exact same warping to the synthetic keypoints. This creates a perfectly labeled, realistic training set for standard pose detectors like the Stacked Hourglass network.
Experimental Results
The study evaluated the method on three common laboratory organisms: Drosophila melanogaster (fruit fly), Caenorhabditis elegans (worm), and Danio rerio (zebrafish). The proposed method consistently outperformed state-of-the-art unpaired translation methods:
- Drosophila Dataset: The model achieved a PCK-15 (Percentage of Correct Keypoints within 15 pixels) of 83.2%, compared to 72.9% for CycleGAN.
- Zebrafish Dataset: The improvement was even more dramatic, with a PCK-10 of 85.0% versus CycleGAN’s 68.7%.
Visually, the generated images successfully reconstructed thin structures like fly legs without the "hallucinated" extra limbs or broken segments common in other GAN approaches.
Key Insights and Limitations
A critical finding was that prioritizing geometry (via silhouettes) before texture leads to much higher stability. Additionally, the use of a "Straight Through Estimator" (STE) allowed for end-to-end training on non-differentiable binary masks.
However, the method currently depends on target segmentation masks and may struggle in highly cluttered environments. It is also limited in its ability to synthesize entirely new topological configurations (e.g., legs crossing) not present in the source data. Future work may incorporate temporal data or multi-view camera setups to resolve identity swapping in symmetric animals.
Summary updated