Extended Data Fig. 2: Flynet workflow and definitions of wing kinematic angles. | Nature

Extended Data Fig. 2: Flynet workflow and definitions of wing kinematic angles.

From: Machine learning reveals the control mechanics of an insect wing hinge

Extended Data Fig. 2

a, The Flynet algorithm takes three synchronized frames as input. Each frame undergoes CNN processing, resulting in a 256-element feature vector extracted from the image. These three feature vectors are concatenated and analyzed by a fully connected (dense) layer with Scaled Exponential Linear Unit (SELU) activation, consisting of 1024 neurons. The output of the neural network is the predicted state (37 elements) of the five model components represented by a quaternion (q), translation vector (p), and wing deformation angle (ξ). Subsequently, the state vector is refined using 3D model fitting and particle swarm optimization (PSO). Normally distributed noise is added to the predicted state, forming the initial state for 16 particles. During the 3D model fitting, the particles traverse the state-space, maximizing the overlap between binary body and wing masks of the segmented frames (Ib) and the binary masks of the 3D model projected onto the camera views (Ip). The cost function (IbIp)/(IbIp) is evaluated iteratively for a randomly selected 3D model component. The PSO algorithm tracks the personal best cost encountered by each particle and the overall lowest cost (global best). After 300 iterations, the refined state is determined by selecting the global best for each 3D model component. See Supplementary Information for more details. b, Training and validation error of the Flynet CNN as a function of training epoch.

Back to article page