Wildlife image acoustic print fusion recognition method based on cross-modal alignment

This invention proposes a cross-modal aligned wildlife image-soundprint fusion recognition method. It utilizes an improved Swin Transformer V2 and Mel spectrograms to extract features and solves the problem of recognizing image and soundprint modalities in complex environments in existing technologies through contrastive learning and bidirectional cross-attention mechanisms. This method achieves high-precision and robust multimodal recognition.

CN123220080APending Publication Date: 2026-12-04SHENZHEN INNOVIEW TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611397126.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-09
Publication Date
2026-12-04

AI Technical Summary

Technical Problem

In existing technologies, single image modalities have poor recognition performance under low visibility conditions, single voiceprint modalities are easily affected by noise, and multimodal fusion lacks an effective semantic alignment mechanism, resulting in insufficient recognition accuracy and poor robustness, making it difficult to meet the monitoring needs of complex environments in nature reserves.

Method used

A cross-modal aligned wildlife image voiceprint fusion recognition method is adopted. Image features are extracted by an improved Swing Transformer V2, and voiceprint features are extracted by combining Mel spectrograms. Deep semantic fusion of image and voiceprint features is achieved through contrastive learning and bidirectional cross-attention mechanism. Modality missing adaptive strategy is introduced, and ArcFace loss function is used to enhance classification ability.

Benefits of technology

It achieves high-precision multimodal recognition in complex environments, improves recognition accuracy and system robustness, ensures recognition reliability when modes are missing, and supports continuous monitoring of nature reserves.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123220080A_ABST
    Figure CN123220080A_ABST
Patent Text Reader

Abstract

This invention discloses a wildlife image-soundprint fusion recognition method based on cross-modal alignment. The method simultaneously acquires image and soundprint data using infrared trigger cameras and acoustic sensors deployed in nature reserves and performs preprocessing. Image features are extracted using an improved Swing Transformer V2, and soundprint features are extracted using MFCC combined with an audio spectrum transformer. The two features are aligned to a shared space through comparative learning using a modal projection matrix and InfoNCE. A bidirectional cross-attention mechanism is employed for feature fusion, combined with a gating mechanism to adaptively adjust modal contributions, and a learnable embedding vector is used to address modal missing features. Finally, the recognition result is output through an ArcFace classifier. This invention eliminates the cross-modal semantic gap through comparative learning and achieves deep feature interaction through cross-attention, effectively improving the accuracy and robustness of wildlife recognition in complex environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing and acoustic signal processing, and in particular to a method for wildlife image voiceprint fusion recognition based on cross-modal alignment. Background Technology

[0002] Wildlife monitoring in nature reserves mainly relies on two technical approaches: infrared-triggered camera image recognition and acoustic sensor voiceprint recognition. Image-based recognition methods typically use convolutional neural networks or visual Transformers to extract and classify features from acquired animal images, while voiceprint-based recognition methods combine acoustic features such as Mel-frequency cepstral coefficients and spectrograms with deep learning models to identify species. Both methods have been applied in reserve monitoring.

[0003] First, single image modalities suffer severe image quality degradation under low visibility conditions such as nighttime, dense fog, and heavy rain. Furthermore, they struggle to effectively detect animals with camouflage or those obscured by vegetation, and misidentification is common among closely related species due to their similar appearance. Second, single voiceprint modalities are susceptible to interference from environmental noise such as wind and rain. Simultaneous calls from multiple animals create signal aliasing, making separation difficult, and the highly similar vocal characteristics of some species also hinder differentiation. Third, existing methods attempting to fuse images and voiceprints into multiple modalities often employ simple feature splicing or weighted averaging strategies, lacking effective cross-modal semantic alignment mechanisms. This results in high feature redundancy, insufficient discriminative power, and poor system robustness when data from a particular modality is missing, making it difficult to meet the actual monitoring needs of nature reserves in their complex and variable environments.

[0004] Therefore, in response to the problems mentioned above, this invention proposes a method for wildlife image voiceprint fusion recognition based on cross-modal alignment. Summary of the Invention

[0005] To overcome the problems of insufficient fusion recognition accuracy and poor robustness when modalities are missing due to the semantic gap between image and voiceprint modalities in existing technologies, this invention proposes a wildlife image-voiceprint fusion recognition method based on cross-modal alignment. This method achieves cross-modal spatial alignment of image and voiceprint features through contrastive learning, performs deep semantic fusion using a bidirectional cross-attention mechanism, and introduces an adaptive strategy for modal missing features, thereby achieving high-precision and robust multimodal wildlife recognition.

[0006] The technical solution of this invention is: a method for wildlife image voiceprint fusion recognition based on cross-modal alignment, comprising the following steps:

[0007] S1, through infrared trigger cameras and acoustic sensor arrays deployed in nature reserves, simultaneously collects image data and voiceprint data of wild animals. The image data is sequentially processed by non-local mean denoising, contrast-limited adaptive histogram equalization enhancement, and size normalization. The voiceprint data is sequentially processed by pre-emphasis, framing, Hamming windowing, and energy-based endpoint detection, and the audio signal is converted into a Mel spectrogram.

[0008] S2 employs an improved Swing Transformer V2 as the backbone network for image feature extraction. This network consists of four stages, with the number of Transformer Blocks in each stage being 2, 2, 18, 22, 2, 18, and 2, respectively. The embedding dimension is 128, and the window size is 8. After the output of the Transformer Block in each stage, a residual attention enhancement module is connected. This module includes a cascaded channel attention submodule and a spatial attention submodule. The multi-scale feature maps output from stages 2, 3, and 4 are fused through a feature pyramid network. After concatenation using global average pooling and global max pooling, dimensionality reduction is performed to obtain the image modal feature representation. ;

[0009] S3 extracts the 40-dimensional MFCC features and their first-order and second-order difference features from the Mel spectrogram. These three features are concatenated along the channel dimension to form a multi-scale acoustic feature. The Mel spectrogram is then divided into 16×16 time-frequency blocks, which are linearly projected and positionally encoded before being input into an audio spectrum transformer consisting of 12 layers of Transformer Encoders to extract deep voiceprint features. An adaptive average pooling process is then applied to the outputs of each layer of the audio spectrum transformer using a multi-scale time aggregation module with time windows of 1 second, 3 seconds, and 5 seconds. After concatenation and fusion, dimensionality reduction is achieved to obtain the voiceprint modal feature representation. ;

[0010] S4, representing image modal features using a learnable modal projection matrix. and voiceprint modal feature representation The images and voiceprint data were projected onto a unified shared feature space. The image-voiceprint data pairs collected synchronously at the same time and location were used as positive sample pairs, and the data pairs collected at different times or locations were used as negative sample pairs. The InfoNCE loss function was used for contrastive learning training, so that the image features and voiceprint features of the same animal individual are close to each other in the shared feature space, while the features of different animal individuals are far apart, thus eliminating the cross-modal semantic gap.

[0011] S5 employs a Transformer fusion module based on a bidirectional cross-attention mechanism to achieve deep fusion of image and voiceprint features: image-to-voiceprint cross-attention is calculated using image features as the query and voiceprint features as the key and value; voiceprint-to-image cross-attention is calculated using voiceprint features as the query and image features as the key and value; an 8-head multi-head attention mechanism is used, and the outputs of each head are concatenated and linearly transformed to obtain the fused features; a gating fusion mechanism is used, and the gating coefficients are calculated using the Sigmoid activation function to adaptively adjust the contribution weights of each modality feature; a modality missing adaptive module is introduced, and when a certain modality data is missing, the missing modality feature is replaced with a learnable modality missing embedding vector, and the modality gating weight is reset to zero, outputting multimodal fusion features.

[0012] S6. The multimodal fusion features are input into the classifier, which consists of two fully connected layers. The GELU activation function and Dropout are used in between to prevent overfitting. The ArcFace loss function is used for training, with a scaling factor s=64.0 and an angular interval m=0.50. The angular interval constraint is introduced to enhance the intra-class compactness and inter-class separability of the features. The probability distribution of each species is output through the Softmax function, and the species with the highest probability is taken as the recognition result.

[0013] S7, Set a high confidence threshold =0.85 and low confidence threshold =0.50, the recognition results are divided into three levels: high confidence recognition, medium confidence recognition, and recognition pending manual review; the output is a recognition result information package containing species name, Latin name, confidence score, recognition timestamp, collection location coordinates, image thumbnail and voiceprint spectrogram summary, which is stored in the protected area wildlife monitoring database and uploaded to the cloud monitoring platform.

[0014] The beneficial effects of this invention are:

[0015] 1. This invention maps image features and voiceprint features to a unified shared space through a learnable modal projection matrix, and uses a contrastive learning method based on the InfoNCE loss function for cross-modal feature alignment. This makes image features and voiceprint features of the same species closer to each other in the shared space and farther apart from each other of different species. This overcomes the problems of poor simple splicing and fusion effect and high feature redundancy caused by inconsistent spatial distribution of image and voiceprint features in the prior art.

[0016] 2. This invention employs a bidirectional cross-attention mechanism, calculating bidirectional attention weights using image features as the query and voiceprint features as the key / value, and vice versa. This enables deep interaction and semantic retrieval of information from two modalities at multiple levels. Combined with a gating fusion mechanism, the contribution weights of each modality are adaptively adjusted according to the input quality. This overcomes the problem that shallow fusion strategies such as simple feature splicing or weighted averaging in existing technologies cannot fully explore the deep correlations between modalities, thus significantly improving the multimodal fusion effect.

[0017] 3. This invention introduces a learnable modality missing embedding vector. When a certain modality data is missing, it automatically replaces the features of the missing modality and resets the gating weight of that modality to zero, so that the fusion module can still work normally under single modality input. This overcomes the problem that the system is prone to recognition failure or misjudgment when a certain modality is missing in the prior art, and ensures the continuous availability of the system in complex field environments. Attached Figure Description

[0018] Figure 1 The diagram shown is a schematic representation of the overall system framework of the present invention.

[0019] Figure 2 The diagram shown is a schematic of the edge deployment system architecture of the present invention;

[0020] Figure 3 The diagram shown is a schematic representation of the overall method flow of the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] Please see Figures 1-3 The present invention provides an embodiment:

[0023] A method for wildlife image voiceprint fusion recognition based on cross-modal alignment includes the following steps:

[0024] S1, firstly, multimodal data acquisition and preprocessing are performed, specifically:

[0025] S1.1, through infrared-triggered cameras and acoustic sensor arrays deployed in nature reserves, image data I and acoustic data A of wild animals are simultaneously acquired. The infrared-triggered cameras detect animal activity through passive infrared sensors and automatically trigger shooting, while simultaneously outputting a timestamp signal to synchronously trigger the acoustic sensors to start recording.

[0026] S1.2, Preprocessing of image data I. First, a nonlocal mean denoising algorithm is used to remove image noise. This algorithm uses a weighted average of similar pixel blocks in the image to effectively preserve the edge and texture details of the image while removing noise. Then, contrast-limited adaptive histogram equalization is used to enhance image contrast. This method divides the image into several small blocks, performs histogram equalization on each block, and avoids excessive noise amplification by limiting the contrast amplification. Finally, the image is scaled and normalized to a resolution of 224×224 pixels and standardized. The mean vector used for standardization is [0.485, 0.456, 0.406], and the standard deviation vector is [0.229, 0.224, 0.225].

[0027] S1.3, preprocess the voiceprint data A, first by pre-emphasis, and then by adjusting the filter coefficients. =0.97, used to compensate for energy attenuation in the high-frequency components of the speech signal. Then, framing processing is performed, with a frame length of 25ms and a frame shift of 10ms. A Hamming window is applied to each frame to reduce spectral leakage. An energy-based endpoint detection method is used to remove silent and ambient noise segments. The energy threshold for this method is set to 10% of the maximum signal energy; frames below this threshold are identified as silent segments and discarded. Finally, the audio signal is converted to a Mel spectrogram. During the conversion, the sampling rate is set to 16000Hz, the FFT points are set to 1024, and the number of Mel filter banks is set to 128.

[0028] S2, This step involves image feature extraction, specifically:

[0029] S2.1, an improved Swin Transformer V2 is adopted as the backbone network for image feature extraction. The Swin Transformer V2 consists of four stages, with each stage containing [2, 2, 18, 2] Transformer Blocks, an embedding dimension of 128, and a window size of 8. Unlike the standard Transformer, the Swin Transformer employs a windowed self-attention mechanism to restrict self-attention computation to non-overlapping local windows, and combines this with shift window operations to achieve cross-window information interaction, effectively reducing computational complexity.

[0030] S2.2 introduces a residual attention enhancement module (RAEM) in each stage of the Swing Transformer V2. This RAEM consists of two sub-modules: channel attention and spatial attention, which are applied sequentially to the output of each TransformerBlock in a cascaded manner.

[0031] The channel attention submodule focuses on "which channel features in the image are more discriminative" by applying different weights to each channel of the feature map to emphasize key channel information;

[0032] The spatial attention submodule focuses on "which spatial locations in the image are more worthy of attention" and generates spatial weight maps to enhance the feature responses of key animal regions (such as head patterns and body outlines) while suppressing responses of irrelevant regions such as the background.

[0033] RAEM adds the original features to the residual connections, which not only preserves the basic features extracted by the backbone network, but also enhances the model's attention to discriminative regions.

[0034] S2.3, the multi-scale feature maps output from stages 2, 3, and 4 of the Swin Transformer V2 are fused using a Feature Pyramid Network (FPN). The FPN transmits high-level semantic information to low-level features via a top-down path, and then fuses the features from each layer through lateral connections, resulting in a fused image feature map containing rich semantic and detailed information. Where C=512 and H=W=14. This fused feature contains both detailed information from shallow features (such as texture and edges) and semantic information from deep features (such as species category and overall morphology), providing a comprehensive visual representation for subsequent recognition.

[0035] S2.4, merging image feature maps Global average pooling and global max pooling are performed, and the results of the two pooling operations are concatenated and then passed through a fully connected layer for dimensionality reduction to obtain a high-dimensional feature representation of the image modality. Where d=512. Global average pooling helps capture the overall distribution information of the feature map, while global max pooling helps capture the most significant feature responses in the feature map. Using them in combination can improve the discriminative power of the features.

[0036] S3, This step involves extracting voiceprint features, specifically:

[0037] S3.1, perform multi-scale acoustic feature extraction on the preprocessed Mel spectrogram.

[0038] First, MFCC features are extracted. Then, the logarithm of the Mel spectrogram is taken, followed by a discrete cosine transform. The first 40 dimensions of coefficients are retained to obtain the MFCC feature sequence. MFCC features simulate the nonlinear perception characteristics of the human ear for sounds of different frequencies and are one of the most commonly used features in the field of voiceprint recognition.

[0039] Then, Delta features and Delta-Delta features are extracted, and first-order and second-order differences are calculated on the MFCC features to capture the dynamic temporal variation features of the voiceprint signal.

[0040] These dynamic features reflect the patterns of animal calls over time, which is crucial for recognizing calls with specific temporal structures (such as bird songs). Finally, the MFCC features, Delta features, and Delta-Delta features are concatenated along the channel dimension to obtain a multi-scale acoustic feature representation.

[0041] S3.2 employs an audio spectrum transformer to extract deep voiceprint features. The Mel spectrogram is divided into 16×16 time-frequency blocks, linearly projected, and then input into an AST model composed of 12 Transformer Encoders with a model dimension of 768 and 12 attention heads. The AST model draws on the successful experience of visual Transformers, treating the audio spectrogram like an image for processing. Through a self-attention mechanism, it captures global dependencies in the time-frequency dimension, effectively modeling long-range temporal patterns and frequency structures in animal voiceprint signals.

[0042] S3.3, a multi-scale temporal aggregation module is designed to perform temporal pooling on the outputs of each layer of the AST with time windows of 1 second, 3 seconds, and 5 seconds, respectively, to capture the temporal patterns of the vocal print at different temporal granularities. Different species' calls have different temporal scale characteristics; for example, the calls of some species change rapidly (requiring analysis within a short time window), while the calls of other species have a longer temporal structure (requiring analysis within a long time window). MSTAT, through a multi-scale pooling strategy, ensures that the system can simultaneously capture short-term abrupt changes and long-term prosodic features. Then, features from different time scales are concatenated and fused.

[0043] S3.4, global average pooling is performed on the fused voiceprint features, followed by dimensionality reduction through a fully connected layer to obtain a high-dimensional feature representation of the voiceprint modality. , where d=512.

[0044] S4, this step performs cross-modal feature alignment, specifically:

[0045] S4.1 employs a contrastive learning method for cross-modal feature alignment. Image-voiceprint data pairs acquired synchronously at the same time and location are used as positive sample pairs, while data pairs acquired at different times or locations are used as negative sample pairs. This contrastive learning constructs positive and negative sample pairs to learn a feature space where positive sample pairs are close together and negative sample pairs are far apart.

[0046] S4.2, respectively, image features and voiceprint features Set the learnable modal projection matrix and The two modal features are projected onto a unified shared feature space:

[0047] ;

[0048] ;

[0049] and These are the bias terms for the image modality and the voiceprint modality, respectively. They are also learnable parameters, and their function is to provide translational degrees of freedom during feature projection, making the projection transformation more flexible and better able to adjust the feature distributions of the two modalities to a suitable position in the shared feature space. d is the feature dimension; in this embodiment, d=512.

[0050] The projection matrix is ​​learned through training, and its function is to map image features and voiceprint features that were originally distributed in different feature spaces into a common semantic space.

[0051] S4.3, use the InfoNCE loss function for contrastive learning training, for positive sample pairs ( , The loss function is defined as follows: (The set of samples is ) and negative sample pairs.

[0052] ;

[0053] in The cosine similarity function is used. This is the temperature hyperparameter (value 0.07). The voiceprint features are for negative samples. The InfoNCE loss function achieves effective feature discrimination learning by encouraging higher similarity between positive sample pairs than between negative sample pairs.

[0054] S4.4, through contrastive learning training, ensures that the image features and voiceprint features of the same animal individual are close to each other in the shared feature space, while the features of different animals are far apart, thereby eliminating the semantic gap between the image modality and the voiceprint modality and achieving cross-modal semantic alignment. After alignment, the distribution of image features and voiceprint features in the shared space tends to be consistent.

[0055] S5, this step involves fusing multimodal features, specifically:

[0056] S5.1, a Transformer fusion module based on a bidirectional cross-attention mechanism is designed to achieve deep fusion of image features and voiceprint features. This module includes cross-attention calculation in two directions: image-to-voiceprint cross-attention uses the image feature sequence as the query and the voiceprint feature sequence as the key and value, and calculates the attention weights as follows:

[0057] ;

[0058] The voiceprint-to-image cross-attention uses the voiceprint feature sequence as the query and the image feature sequence as the key and value, respectively, and calculates the attention weights as follows:

[0059] ;

[0060] in, , The query vector is obtained by linearly transforming the image features through a learnable query weight matrix. , The key vector is obtained by linearly transforming the voiceprint features through a learnable key weight matrix. , The value vector is obtained by linearly transforming the voiceprint features through a learnable value weight matrix.

[0061] The bidirectional cross-attention mechanism allows information from two modalities to interact at multiple levels. Image features can actively retrieve relevant information from voiceprint features, and voiceprint features can also actively retrieve relevant information from image features.

[0062] S5.2 employs a multi-head attention mechanism, with h=8 attention heads, and each head has a dimension of... =d / h=64, the outputs of the attention from each head are concatenated and then linearly transformed to obtain the fused features. The multi-head mechanism enables the model to simultaneously capture different semantic association patterns between images and voiceprints from multiple subspaces, enhancing the expressive richness of the fused features.

[0063] S5.3, design a gating fusion mechanism to adaptively adjust the contribution weights of each modal feature. The gating coefficients are calculated as follows:

[0064]

[0065] in It is the Sigmoid activation function. For element-wise multiplication, Indicates feature splicing, The learnable gated weight matrix, For the corresponding bias term, is a learnable parameter. Gating coefficient. It can adaptively adjust based on the quality and modal reliability of the input data. When the image quality is poor (such as at night in low light), the g value automatically decreases and the system relies more on voiceprint features; when the voiceprint quality is poor (such as in a high-noise environment), the g value automatically increases and the system relies more on image features.

[0066] S5.4 introduces a modality missing adaptive module. When a certain modality data is missing (e.g., only voiceprint data is available at night, or only image data is available when animals are silent), a learnable modality missing embedding vector is used. The feature of the missing modality is replaced, and the gating weight of the modality is reset to 0, so that the fusion module can still work normally in the scenario of missing modalities.

[0067] S5.5 will integrate features The input consists of a fusion post-processing module with two Transformer Encoder layers, which further extracts high-order interaction features across modalities. After layer normalization and residual connections, the final multimodal fusion feature representation is output. .

[0068] S6, This step involves species classification and identification, specifically:

[0069] S6.1, fusing multimodal features The input classifier module consists of two fully connected layers, with the GELU activation function and Dropout (dropout rate 0.5) used in between to prevent overfitting.

[0070] S6.2, the ArcFace loss function is used to enhance the discriminative ability of features. The loss function is defined as:

[0071] ;

[0072] Where s is the scaling factor (value 64.0) and m is the angular interval (value 0.50). To fuse the angle between the feature and the true class weight vector, The ArcFace loss incorporates the angle between the fused features and the weight vectors of other classes. By introducing an angular margin constraint, ArcFace makes features of the same species more compact in angular space and features of different species more separated, thereby improving the discriminative power of the classification boundary. Compared to the traditional Softmax loss, ArcFace loss significantly increases inter-class distance and decreases intra-class distance.

[0073] S6.3 outputs the probability distribution of each species through a fully connected layer and a softmax function. , where N is the total number of species categories.

[0074] S6.4, select the species with the highest probability as the identification result: At the same time, record the corresponding confidence score. .

[0075] S7, this step assesses and outputs the confidence level of the results, specifically:

[0076] S7.1, Set the confidence threshold =0.85 and =0.50. When the identification confidence level is ≥ When, it is marked as "high confidence identification"; when ≤Confidence level< When the confidence level is < 0, it is marked as "medium confidence identification"; when the confidence level is < 0, it is marked as "medium confidence identification". At that time, it is marked as "Pending manual review".

[0077] S7.2 outputs a recognition result information package, including species name, Latin name, confidence score, recognition timestamp, collection location coordinates (latitude and longitude), image thumbnail, and voiceprint spectrogram summary.

[0078] S7.3 stores the identification results in the protected area wildlife monitoring database and uploads them to the cloud monitoring platform in real time via wireless network, supporting subsequent population dynamics analysis, species distribution mapping, and conservation decision support.

[0079] Example 1:

[0080] In this embodiment, monitoring equipment was deployed at several typical habitat locations within the nature reserve. Each location was equipped with an infrared trigger camera (model: Reconyx HyperFire 2) and an acoustic sensor (model: AudioMoth v1.2.0, sampling rate 16kHz). The infrared trigger camera detected animal activity via a PIR sensor and automatically triggered recording, acquiring five high-resolution images (1920×1080 resolution) each time it was triggered. Simultaneously, a timestamp signal was output to synchronously trigger the acoustic sensor to begin recording 10 seconds of audio data.

[0081] Let's take a leopard cat (Prionailurus bengalensis) triggering event as an example. When the leopard cat entered the monitoring area, the infrared trigger camera detected the change in infrared radiation caused by the difference between its body temperature and the ambient temperature within a detection range of approximately 20 meters, and immediately triggered the recording. At the same time, the camera output a synchronous trigger signal to the acoustic sensor, which began to collect environmental audio data, recording the leopard cat's calls and background environmental sounds.

[0082] In the image preprocessing stage, a nonlocal means denoising algorithm implemented using the OpenCV library was employed to process the acquired images. The search window was set to 21×21, the template window to 7×7, and the h value to 10, effectively removing thermal noise and dark current noise generated by the image sensor. Subsequently, the CLAHE algorithm was used to enhance contrast, with clipLimit set to 2.0 and tileGridSize set to 8×8, improving the contrast between the leopard cat's markings and the background vegetation. Finally, the image was scaled to 224×224 resolution and normalized.

[0083] In the voiceprint preprocessing stage, pre-emphasis (coefficient 0.97) was implemented using the librosa library, and frame-by-frame processing was performed (25ms frame length corresponds to 400 sampling points, and 10ms frame shift corresponds to 160 sampling points), with a Hamming window applied to each frame. The energy-based VAD algorithm set the energy threshold to 10% of the maximum signal energy, effectively eliminating silent segments in the recording while preserving valid segments of the leopard cat's call. Finally, the Mel spectrogram was calculated, with n_fft set to 1024, hop_length set to 160, and n_mels set to 128.

[0084] In the image feature extraction stage, the improved Swin Transformer V2 backbone network processes the preprocessed image in stages. Stage 1 outputs a 56×56×128 feature map, Stage 2 outputs a 28×28×256 feature map, Stage 3 outputs a 14×14×512 feature map, and Stage 4 outputs a 7×7×1024 feature map. After each Transformer Block output, the RAEM module enhances the feature responses of the leopard cat's head markings and body contours through channel attention and spatial attention. The FPN fuses the features from Stages 2, 3, and 4 into a 14×14×512 fused feature map. After GAP and GMP pooling concatenation, dimensionality reduction yielded 512-dimensional image features. .

[0085] In the voiceprint feature extraction stage, 40-dimensional MFCC features and first-order and second-order difference features are extracted from the Mel spectrogram and concatenated into 120-dimensional multi-scale features. The AST model divides the Mel spectrogram into 16×16 time-frequency blocks, which are processed by 12 layers of Transformer Encoder. The MSTAT module performs adaptive average pooling with time windows of 1 second, 3 seconds, and 5 seconds, respectively, and the concatenated and fused features yield 512-dimensional voiceprint features. .

[0086] In the cross-modal feature alignment stage, the learnable projection matrix will and Mapped to a shared feature space. Since feature space alignment has been completed through contrastive learning during the training phase, the image features and voiceprint features of the leopard cat are now close to each other in the shared space, while the features of other species (such as the desert cat) are far apart in the space.

[0087] In the multimodal fusion stage, the bidirectional cross-attention module uses image features as the query and voiceprint features as the key and value for computation. Using voiceprint features as the query and image features as the key and value, calculate Eight attention heads capture cross-modal associations from multiple semantic subspaces. The gated fusion coefficient g is adaptively calculated based on the quality of the current input. Since the image clarity and speaker signal-to-noise ratio are both high in this embodiment, the g value is approximately 0.52, indicating a roughly balanced contribution from both modalities. The fused features are post-processed through two Transformer Encoder layers to obtain the final fused features. .

[0088] In the classification and recognition stage, the fused features are processed by a two-layer fully connected classifier (512→256→N), and then ArcFace loss (s=64.0, m=0.50) is used to enhance the discriminative power. Softmax outputs the probability of each category. The leopard cat category obtained the highest probability of 0.961, reaching the high-confidence recognition standard.

[0089] The final output package includes: species name "leopard cat", Latin name "Prionailurus bengalensis", confidence level "0.961", identification timestamp, GPS coordinates, image thumbnail, and a summary of the voiceprint mel spectrum. This result is transmitted to the reserve's relay station via a LoRa wireless module, then uploaded to the cloud monitoring platform via a 4G network and stored in a MySQL database. The entire processing flow, from acquisition to output, takes approximately 150ms on the edge device.

[0090] Example 2:

[0091] In this embodiment, the training process, dataset construction, and optimization strategies of the model of the present invention are described, specifically:

[0092] For the construction of the training dataset, the image dataset of this invention was selected from infrared-triggered camera images collected in 12 nature reserves across China, covering 50 species of wild animals (including 32 mammal species and 18 bird species), with 500-2000 labeled images per species, totaling approximately 42,000 images. All images were manually labeled with species tags by wildlife taxonomy experts. The dataset was divided into training, validation, and test sets in a 7:1.5:1.5 ratio. The voiceprint dataset contains synchronously collected recordings of wild animal calls, with 200-800 recording segments (5-15 seconds each) per species, totaling approximately 18,000 segments, also divided in a 7:1.5:1.5 ratio. The multimodal pairing dataset contains approximately 12,000 synchronously triggered image-voiceprint data pairs, used for contrastive learning and fusion module training.

[0093] In terms of training strategy, this invention adopts a phased training scheme. The first phase trains the image feature extraction module (for image classification) and the voiceprint feature extraction module (for voiceprint classification) separately, each for 100 epochs. The second phase fixes the parameters of the feature extraction modules and trains the cross-modal alignment module (contrast learning part) for 50 epochs. The third phase jointly trains the fusion module and the classifier for 80 epochs. All training uses the AdamW optimizer, with a cosine annealing learning rate (initial 1e-4, minimum 1e-6), a batch size of 32, and a weight decay of 0.05.

[0094] The images in this invention employ random horizontal flipping, random rotation (±15°), color jitter (brightness 0.2, contrast 0.2, saturation 0.2), and MixUp (…). =0.2), CutMix ( =1.0) and random erasure (probability 0.25). Voiceprint data were subjected to time stretching / compression (±10%), pitch transformation (±2 semitones), addition of random noise (SNR 10-30dB) and SpecAugment (time mask and frequency mask). These enhancement strategies effectively expanded the diversity of training samples and improved the generalization ability of the model.

[0095] This invention employs knowledge distillation to transfer knowledge from the teacher model (a complete 186M-parameter model) to the student model (45M-parameter model). The distillation temperature is T=4.0, and the distillation loss is a weighted sum of KL divergence loss and hard-label cross-entropy loss (weight ratio 1:1). The student model uses EfficientNetV2-S as the image backbone and a lightweight AST (6-layer Transformer) as the voiceprint backbone. After distillation, the student model achieves an accuracy of 92.1% (a 2.5% decrease compared to the teacher model's 94.6%), with a 3.8x improvement in inference speed. Using TensorRT 8.6 to convert the model to an FP16 precision inference engine, the single inference latency on a Jetson Orin Nano is 147ms.

[0096] After training, the cross-modal feature alignment performance was evaluated using a retrieval task: the Top-1 accuracy for retrieving voiceprints from images reached 76.3%, and the Top-1 accuracy for retrieving images from voiceprints reached 72.8%, validating the effectiveness of the alignment module. On a test set of 50 wild animal species, the final classification accuracy reached 94.6%.

[0097] Example 3:

[0098] In this embodiment, the recognition performance of the present invention in a nighttime scenario with only voiceprint data is described, specifically:

[0099] In nighttime monitoring of nature reserves, although infrared-triggered cameras possess night vision capabilities, the lack of color information and reduced resolution in infrared images result in extremely low distinguishability between closely related species such as leopard cats and desert cats. In one nighttime triggering event, the system detected clear animal calls collected by the acoustic sensor, but the simultaneously captured infrared images were of poor quality, and the animal's markings were not clearly visible.

[0100] In this scenario, the MIAM module detects that the effective features of the image modality are insufficient to support reliable recognition, and automatically utilizes the learnable modality missing embedding vector. The image modal features are replaced, and the gating weight of that modality is reset to 0. At this point, the fusion module becomes a single-modal recognition mode dominated by the voiceprint modality, and the gating coefficient g automatically decreases to near 0, fusing features... Primarily from the cross-attention branch of voiceprint to image (Actually, it is a self-attention weighted average of voiceprint features).

[0101] The final classifier outputs the recognition result "leopard cat" based on voiceprint features, with a confidence level of 0.876, meeting the high-confidence recognition standard. Tests show that in scenarios with only voiceprint data, the recognition accuracy of this invention is 73.8%, significantly higher than the hard degradation strategy of "recognition failure," ensuring the continuous availability of the system.

[0102] Conversely, in scenarios where the animal is silent but the image is clear, the MIAM module uses... The gating coefficient g is automatically increased to near 1 to replace the voiceprint features, and the fused features mainly come from the cross-attention branch from image to voiceprint. (Actually, it is a self-attention weighted image feature), the system is downgraded to a pure image recognition mode, and the accuracy reaches 80.1%.

[0103] Example 4:

[0104] In this embodiment, the rapid registration and incremental identification capabilities of the present invention for newly added species are described, specifically:

[0105] When new species are added to the protected area for monitoring (such as species not included in the original monitoring list), this invention supports an incremental learning scheme based on a prototype network. The addition of the Chinese serow (Capricornis milneedwardsii) is used as an example.

[0106] First, collect 5-10 multimodal labeled samples (images and synchronized voiceprint data) of Chinese serows. Then, obtain the fused features of each sample through a complete feature extraction and alignment fusion process. The average value is taken as the prototype vector of the species. , where K is the number of samples (8 samples in this embodiment).

[0107] Once the prototype vectors are calculated, they are registered in the recognition library, eliminating the need to retrain the entire model. During subsequent recognition, the system calculates the cosine distance between the fused features of the sample to be identified and the prototype vectors of various types, and takes the species corresponding to the closest prototype as the recognition result.

[0108] Test results show that after adding 10 species to the original 50 species, the accuracy rate of identifying the original species decreased from 94.6% to 93.8% (a decrease of only 0.8%), while the average accuracy rate of identifying the 10 newly added species was 88.3%. Considering that there are only 5-10 labeled samples for each species, this recognition effect fully verifies the good scalability and small sample learning ability of this invention.

[0109] Example 5:

[0110] In this embodiment, the complete deployment architecture of the present invention in nature reserves is described, specifically:

[0111] This invention employs a three-tier architecture of "edge-transmission network-cloud" for practical deployment. At each monitoring point, an infrared trigger camera, an acoustic sensor, and an NVIDIA Jetson Orin Nano edge computing device (8GB memory) are deployed. The edge device runs a student model (45M parameters, 180MB storage space) compressed through knowledge distillation, performing real-time multimodal data acquisition, preprocessing, feature extraction, fusion recognition, and result output. When the confidence level is lower than... When the value is 0.50, the system automatically uploads the original image and voiceprint data to the cloud for manual review.

[0112] In terms of transmission network, 4G modules are used for real-time transmission in areas with 4G signal coverage; in areas without signal, LoRa long-range wireless communication (operating frequency 433MHz, transmission distance up to 5km) is used to transmit the identification result summary to the relay station, and then the relay station uploads it to the cloud via 4G or fiber optic.

[0113] The cloud-based monitoring platform is deployed on a cloud server and includes four main functional modules: data storage (MySQL + MinIO object storage), data visualization (real-time dashboard based on Grafana), population dynamics analysis (mining seasonal migration patterns based on time series analysis), and an alarm system (alarms for the appearance of endangered species and alarms for abnormal activities).

[0114] The deployment of this invention reduces the cost of manual patrols in the nature reserve by about 60%, expands the monitoring coverage area by 3-5 times, and provides reliable data support for wildlife population dynamics monitoring, species diversity assessment, and endangered species protection decisions.

[0115] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for wild animal image voiceprint fusion recognition based on cross-modal alignment, characterized in that, Includes the following steps: S1, through infrared trigger cameras and acoustic sensors deployed in nature reserves, simultaneously collects image data and voiceprint data of wild animals, and preprocesses the image data and voiceprint data respectively; S2, the improved Swin Transformer V2 is used as an image feature extraction backbone network, multi-scale image features are extracted through a residual attention enhancement module and a feature pyramid network, and an image modal feature representation is obtained ; S3, multi-scale acoustic feature extraction is performed on the preprocessed voiceprint data, including MFCC features and first-order difference and second-order difference features, and an audio spectrum transformer is used to extract deep voiceprint features, and through a multi-scale time aggregation module, features of different time resolutions are fused to obtain voiceprint modal feature representation ; S4, projecting the image modality feature representation and the voiceprint modality feature representation to a unified shared feature space, and performing cross-modality feature alignment by using a contrastive learning method based on an InfoNCE loss function; S5 employs a Transformer fusion module based on a bidirectional cross-attention mechanism, calculating bidirectional cross-attention with image features as the query and voiceprint features as the key and value, and with voiceprint features as the query and image features as the key and value, respectively. The contribution weights of each modality feature are adaptively adjusted through a gating fusion mechanism to obtain multimodal fusion features. S6 inputs the multimodal fusion features into the classifier, uses the ArcFace loss function to enhance the feature discrimination ability, outputs the probability distribution of each species through the Softmax function, and takes the species with the highest probability as the recognition result.

2. The wild animal image voiceprint fusion recognition method based on cross-modal alignment according to claim 1, characterized in that, The preprocessing in step S1 includes: Image data is subjected to nonlocal mean denoising, contrast-limited adaptive histogram equalization enhancement, and size normalization. The voiceprint data is pre-emphasized, framed, Hamming windowed, and energy-based endpoint detection is performed, and the audio signal is converted into a Mel spectrogram.

3. The method for wildlife image voiceprint fusion recognition based on cross-modal alignment according to claim 1, characterized in that, The improved Swing Transformer V2 in step S2 includes: There are 4 stages, with the number of Transformer Blocks in each stage being [2, 2, 18, 2], the embedding dimension being 128, and the window size being 8; A residual attention enhancement module is connected after the output of the Transformer Block at each stage. This residual attention enhancement module includes a channel attention submodule and a spatial attention submodule, which are applied to the output of the Transformer Block in a series manner. The output features from stages 2, 3, and 4 are fused by a feature pyramid network, and then dimensionality is reduced after concatenation using global average pooling and global max pooling to obtain the image modal feature representation.

4. The method for wildlife image voiceprint fusion recognition based on cross-modal alignment according to claim 1, characterized in that, The multi-scale acoustic feature extraction in step S3 includes: 40-dimensional MFCC features were extracted, and their first-order difference features and second-order difference features were calculated. The three were then concatenated to form multi-scale acoustic features. The Mel spectrogram is divided into 16×16 time-frequency blocks, which are then linearly projected and positionally encoded before being input into an audio spectrum transformer consisting of 12 TransformerEncoders. The multi-scale time aggregation module performs adaptive average pooling on the outputs of each layer of the audio spectrum converter with time windows of 1 second, 3 seconds, and 5 seconds, respectively, and then splices and fuses them for dimensionality reduction.

5. The method for wildlife image voiceprint fusion recognition based on cross-modal alignment according to claim 1, characterized in that, The cross-modal feature alignment in step S4 includes: Image-voiceprint data pairs collected synchronously at the same time are used as positive samples, and data pairs collected at different times are used as negative samples. The InfoNCE loss function is used, and cosine similarity and temperature coefficient are calculated. =0.07, which makes the features of positive sample pairs closer to each other in the shared feature space, and the features of negative sample pairs farther apart.

6. The method for wildlife image voiceprint fusion recognition based on cross-modal alignment according to claim 1, characterized in that: The method also uses a modality missing adaptive module. When a modality is missing, the feature of the missing modality is replaced by a learnable modality missing embedding vector, and the gating weight of the missing modality is reset to zero, so that the Transformer fusion module can work normally in the modality missing scenario.

7. The method for wildlife image voiceprint fusion recognition based on cross-modal alignment according to claim 1, characterized in that: In step S6, the classifier uses the ArcFace loss function, with a scaling factor s=64.0 and an angular interval m=0.

50. The angular interval constraint is introduced to enhance the intra-class compactness and inter-class separability of the features.

8. The method for wildlife image voiceprint fusion recognition based on cross-modal alignment according to claim 1, characterized in that, The method also includes a result confidence assessment step: Set a high confidence threshold =0.85 and low confidence threshold =0.50; When the recognition confidence level is ≥ Time markers are used for high-confidence identification; when ≤Confidence level< The time marker is used for medium confidence identification; when the confidence level is < The time stamp is marked as pending manual review; The output recognition result information package includes species name, Latin name, confidence score, recognition timestamp, collection location coordinates, image thumbnail, and voiceprint spectrogram summary.

9. The method for wildlife image voiceprint fusion recognition based on cross-modal alignment according to claim 1, characterized in that, The method also includes model compression and edge deployment steps: Knowledge distillation technology was used, with the complete model as the teacher model and the lightweight model as the student model for distillation training, at a distillation temperature of T=4.

0. The distilled student model is converted into an FP16 precision inference engine and deployed on an edge computing device to achieve real-time inference; The lightweight model uses EfficientNetV2-S as its image backbone network and a 6-layer Transformer as its voiceprint backbone network, which is a lightweight audio spectrum transformer.

10. The method for wildlife image voiceprint fusion recognition based on cross-modal alignment according to claim 1, characterized in that, The method also includes a new species incremental learning step: When a new species is added to the monitoring list, 5-10 multimodal labeled samples of the species are collected, and the fused features are extracted from each sample. The average value is then used as the prototype vector of the species. During identification, the cosine distance between the fusion features of the sample to be identified and the vectors of various prototypes is calculated, and the species corresponding to the prototype with the closest distance is taken as the identification result, so as to achieve rapid registration of new species.