Mountain butterfly identifying and monitoring system based on improved Inception v3
By adopting the mountain butterfly recognition monitoring system with improved Inception v3 in a mountain environment, and using video surveillance and machine learning models for butterfly video decomposition and identification, the problems of discontinuity and incompleteness of butterfly monitoring data in the existing technology are solved, and long-term, continuous and real-time monitoring of butterfly populations is achieved, meeting the needs of accurate and efficient monitoring.
Patent Information
- Application Number
- CN202510113168.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-23
AI Technical Summary
The prior art has data discontinuity and incompleteness in butterfly monitoring in mountainous environments, and it is impossible to achieve long-term, continuous and real-time monitoring of butterfly populations, resulting in the inability to meet the needs of accurate and efficient monitoring.
A mountain butterfly recognition and monitoring system based on improved Inception v3 is adopted, which includes a butterfly monitoring module, an image acquisition module, a butterfly recognition module and a dataset construction module. Butterfly videos are collected through video surveillance, decomposed into images, and is recognized and classified using machine learning models (such as LSTM, YOLOv11 and improved Inception V3).
Long-term, continuous and real-time monitoring of butterfly populations has been achieved, the accuracy and completeness of monitoring data has been improved, the needs of precise monitoring of butterflies have been met, and the development of mountain climate change, conservation biology and biodiversity monitoring research has been promoted.
Smart Images

Figure CN120032391A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical fields of ecology, conservation biology and biodiversity monitoring, and in particular relates to a mountain butterfly recognition and monitoring system based on improved Inception v3. Background Art
[0002] In the fields of ecology, conservation biology and biodiversity monitoring technology, monitoring butterfly population dynamics is crucial to understanding ecosystem health and change. Existing technologies mainly rely on manual monitoring methods, such as the "Pollard Walk" transect method and direct counting method (Checklist), as well as trapping methods such as the trap cage method. These methods have been widely used in plains and hilly areas, but face many challenges in mountain forest habitats. The transect method provides basic data for butterfly diversity monitoring by recording the species and number of butterflies on fixed transects. The direct counting method focuses on longer observations at specific locations, such as breeding grounds and habitats, to record butterfly activities. The trap cage method uses bait to attract butterflies and is suitable for areas with high diversity, but there is a problem of taxonomic bias.
[0003] Although existing monitoring technologies have provided certain data for butterfly research, their application in mountain environments is obviously insufficient. The line sampling method and direct counting method are highly dependent on the professional knowledge and experience of the monitors, and it is difficult to maintain constant monitoring conditions in the changeable mountain climate and complex terrain, resulting in discontinuity and incompleteness of the data. Although the trap method is easy to operate, the butterfly groups it captures are limited and cannot fully reflect the diversity of the butterfly community. In addition, these methods cannot achieve long-term, continuous, and real-time monitoring of butterfly populations, and the data processing and analysis workload is large and inefficient. Therefore, the existing technology cannot meet the needs of accurate and efficient monitoring of butterfly populations, especially in key biodiversity hotspots such as mountains. These problems limit the in-depth understanding and effective protection of butterfly population dynamics. There is an urgent need for a new technical solution to overcome these limitations and achieve long-term dynamic monitoring of butterfly populations in the wild. Summary of the invention
[0004] In order to solve the above technical problems, the present invention proposes a mountain butterfly recognition and monitoring system based on improved Inception v3 to solve the problems existing in the above prior art.
[0005] To achieve the above objectives, in a first aspect, the present invention provides a mountain butterfly recognition and monitoring system based on improved Inception v3, comprising:
[0006] The butterfly monitoring module is used to determine available monitoring mountain tops and deploy video monitoring equipment at mountain tops where butterflies gather at high concentrations and fly in circles actively, to collect butterfly videos;
[0007] An image acquisition module, used for decomposing the butterfly video by a video decomposition method to obtain a butterfly image;
[0008] A butterfly recognition module is used to recognize the butterfly image through a machine learning model and output the butterfly species; wherein the machine learning model includes: a time recognition model based on an LSTM network, a target detection model based on a YOLOv11 network, and a species classification model based on an improved InceptionV3 network; the time recognition model is used to perform time series analysis on the behavior pattern of the butterfly; the target detection model is used to perform target detection on the butterfly image; and the species classification model is used to classify the identified butterfly image into species;
[0009] The dataset construction module is used to generate a butterfly species screenshot identification set based on the butterfly species identification results.
[0010] Preferably, the butterfly monitoring module comprises:
[0011] A monitoring point selection unit is used to select available mountain tops according to conditions such as altitude, mountain shape, evergreen broad-leaved forest coverage, and large butterfly gathering, and set mountain tops that meet the mountain butterfly monitoring conditions as monitoring points;
[0012] The monitoring equipment installation unit is used to determine the installation location of the monitoring equipment according to the activity range and area of the butterflies at the monitoring point; select suitable monitoring cameras, poles, solar panels and controllers according to the shooting distance, coverage, angle and resolution requirements; assemble the monitoring equipment at the determined location, and select and install WIFI signal transmitter amplifier accessories according to the signal distribution on the top of the mountain;
[0013] Wherein, the to-be-monitored point selection unit and the monitoring equipment installation unit are respectively connected to the image acquisition unit.
[0014] Preferably, the image acquisition module comprises:
[0015] A video decomposition unit, used for decomposing the butterfly video into a plurality of original images frame by frame;
[0016] An image processing unit is used to amplify a plurality of original images, save them separately according to the groups, obtain a plurality of biological cluster images, and divide the plurality of biological cluster images into a training set and a test set;
[0017] Wherein, the video decomposition unit and the image processing unit are respectively connected to the butterfly recognition module.
[0018] Preferably, the butterfly recognition module comprises:
[0019] A model training unit, used to train the machine learning model using the training set to obtain a trained machine learning model;
[0020] The model testing unit is used to input the test set into the trained machine learning model and output the recognition result of the butterfly species.
[0021] Preferably, the model training unit includes
[0022] A first model training subunit is used for selecting a butterfly biological cluster from multiple biological clusters based on a target detection model of a YOLOv11 network;
[0023] The second model training subunit is used to classify the butterfly biological cluster based on the species classification model of the improved InceptionV3 network to obtain multiple species atlases; and number the butterfly images in each species atlas in numerical order.
[0024] Preferably, the improved InceptionV3 network includes:
[0025] Customize the Inception unit to decompose some conventional convolution kernels in the traditional Inception structure; embed the direction-aware convolution kernel to identify texture features in different directions; assign different values to the convolution kernel matrix elements according to the sensitivity of texture features in different directions; distribute the Inception module embedded with the direction-aware convolution kernel at the key layers of the network at preset intervals to optimize the feature extraction of mountain butterfly images;
[0026] The fusion structure unit is used to determine the range of specific layer values based on the trade-off experiment between feature complexity and network depth in the mountain butterfly recognition task; plan the layout of the ResNet residual block connected after each InceptionV3 network layer with the specific number of layers, and determine the overall architecture design combining the ResNet residual structure with the InceptionV3;
[0027] Among them, the customized Inception unit and the fusion structure unit are respectively connected to the data set construction module.
[0028] Preferably, in the fusion structure unit, a residual connection is added after the outputs of the branches of the convolution kernels and pooling operations of different sizes inside the Inception module of InceptionV3, and after the Inception module splices the feature maps of different branches;
[0029] Add residual connections between multiple Inception modules of InceptionV3, and between the global average pooling layer and the fully connected layer with softmax activation function.
[0030] In a second aspect, the present invention further discloses a method for identifying and monitoring mountain butterflies based on an improved Inception v3, which is used to implement any of the above-mentioned systems, and the method comprises the following steps:
[0031] Obtain available monitoring mountain tops, and deploy video surveillance equipment at mountaintop locations where butterflies gather at high concentrations and fly in circles actively, to collect butterfly videos;
[0032] Decomposing the butterfly video by a video decomposition method to obtain a butterfly image;
[0033] The butterfly image is identified by a machine learning model, and the butterfly species is output; wherein the machine learning model includes: a time recognition model based on an LSTM network, a target detection model based on a YOLOv11 network, and a species classification model based on an improved InceptionV3 network; the time recognition model is used to perform time series analysis on the behavior pattern of the butterfly; the target detection model is used to perform target detection on the butterfly image; and the species classification model is used to classify the identified butterfly image into species;
[0034] Based on the identification results of butterfly species, a butterfly species screenshot identification set is generated.
[0035] In a third aspect, the present invention further discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the model recognition step of the system described in the first aspect.
[0036] In a fourth aspect, the present invention further discloses a computer program product, including a computer program, which, when executed by a processor, implements the model recognition step of the system described in the first aspect.
[0037] Compared with the prior art, the present invention has the following advantages and technical effects:
[0038] The invention provides a mountain butterfly recognition and monitoring system based on improved Inceptionv3, comprising: a butterfly monitoring module, used for determining available monitoring mountain tops, and arranging video monitoring equipment at locations where butterflies gather at high concentrations and fly in circles actively on mountain tops, so as to collect butterfly videos; an image acquisition module, used for decomposing the butterfly videos by a video decomposition method to obtain butterfly images; a butterfly recognition module, used for recognizing the butterfly images by a machine learning model, and outputting butterfly species; wherein the machine learning model comprises: a time recognition model based on an LSTM network, a target detection model based on a YOLOv11 network, and a species classification model based on an improved InceptionV3 network; performing time series analysis on the behavior patterns of butterflies by using the time recognition model; performing target detection on the butterfly images by using the target detection model; and classifying the recognized butterfly images by using the species classification model; and a data set construction module, used for generating a butterfly species screenshot recognition set according to the recognition results of the butterfly species.
[0039] The present invention can effectively solve the current problems of high labor input, high professional requirements, and high cost operation in wild butterfly monitoring. It has the characteristics of intelligence and high universality, and can significantly improve the current level of wild butterfly monitoring, meet the needs of accurate monitoring of all butterfly groups, and promote the development of mountain climate change biology, conservation biology, and biodiversity monitoring research with butterflies as the object. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0041] Figure 1 A schematic diagram of a monitoring system according to an embodiment of the present invention;
[0042] Figure 2 Schematic diagram of the performance of the binary classification model of Papilio chrysotoptera and other butterflies according to an embodiment of the present invention; (A) is a confusion matrix diagram, and (B) is a ROC curve and AUC area diagram;
[0043] Figure 3 The flight period diagram of the spring and summer generations of the Jiulianshan population of the golden-spotted swallowtail butterfly in 2023 and the mountaintop behavior and activity regularity diagram of the Jiulianshan population of the golden-spotted swallowtail butterfly in the embodiment of the present invention, (A) is a flight frequency change diagram, and (B) is a mountaintop behavior and activity regularity diagram;
[0044] Figure 4: (A) is the time distribution of the application of the embodiment of the present invention and the transect method to the mountaintop monitoring of the golden-spotted swallowtail butterfly, and the comparison of the number of individuals encountered daily and the encounter rate during the spring flight period. (B) is a comparison chart of the number of individuals encountered daily and the encounter rate in 2023, and (C) is a comparison chart of the number of individuals encountered daily and the encounter rate in 2024. DETAILED DESCRIPTION
[0045] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0046] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0047] Embodiment 1
[0048] like Figure 1 As shown, this embodiment provides a mountain butterfly recognition and monitoring system based on improved Inception v3, including:
[0049] The butterfly monitoring module is used to determine available monitoring mountaintops and deploy video monitoring equipment at locations where butterflies gather at high concentrations and fly in circles actively, to collect butterfly videos;
[0050] Further, the butterfly monitoring module includes:
[0051] A monitoring point selection unit is used to select available mountain tops according to conditions such as altitude, mountain shape, evergreen broad-leaved forest coverage, and large butterfly gathering, and set mountain tops that meet the mountain butterfly monitoring conditions as monitoring points;
[0052] Specifically, available mountaintops were selected based on the preliminary survey results of butterfly mountaintop behavior and the conditions of the monitoring area. The conditions for monitoring mountaintops include: (1) located in evergreen broad-leaved forests or forest edges; (2) the highest point has an altitude of ≥1000m; (3) the mountain is tall and prominent, and the microclimate is rich (the temperature is lower than the surrounding area, the humidity is higher than the surrounding area, etc.); (4) >3 large butterflies can be seen gathering; (5) during the gathering period, >3 large butterflies can be seen flying around and chasing each other at this point, and the behavior occurs frequently during the observation period. At the monitoring points that meet all the above conditions, the locations where butterfly mountaintop behavior occurs frequently are selected and monitoring equipment is set up.
[0053] The monitoring equipment installation unit is used to determine the installation position of the monitoring equipment according to the activity range and area of the butterflies at the monitoring point; select suitable monitoring cameras, poles, solar panels and controllers according to the shooting distance, coverage, angle and resolution requirements; assemble the monitoring equipment at the determined point, and select and install WIFI signal transmitter amplifier accessories according to the signal distribution on the top of the mountain; wherein the resolution requirement is 5 million pixels or above, and the shooting angle is ≥120°;
[0054] This embodiment takes the dynamic monitoring of the mountain top of the large butterfly Teinopalpus aureus as an example. According to the previous local investigation records on the flight activities and habits of Teinopalpus aureus and other butterflies on the mountain top, the mountain top and location are selected, and monitoring is arranged. The monitoring is set to record from 5:30 to 18:00 every day, and the video bit stream is set to ensure that the video resolution is 2560×1920 or above, and the length of each monitoring video file is set at the same time; after turning on the monitoring, if a zoom camera is used, the monitoring screen is preset to the original position according to the actual situation on the mountain top, so that it will automatically return to the original position every time the power is turned on and restarted;
[0055] During the alleged monitoring operation, use the mobile phone APP or computer client to view the picture, video quality, signal stability, working status, human activities, data storage status, and remotely adjust and operate the preset picture, video resolution, and data storage; if the remote operation and maintenance fails, go to the site in time to check the operating status of the monitoring components, identify the problem and deal with it. The maintenance content includes equipment reset, operation debugging, inspection and maintenance, and restoration to the original position; inspection and maintenance include but are not limited to power supply, battery, camera, solar panel, timer, lithium battery, signal line, power line, memory card / SD card;
[0056] During the monitoring operation, you can further use the mobile phone App or computer client to remotely check the remaining storage of the SD card, regularly download videos remotely, or regularly go to the site to download using a network cable, or directly replace a blank SD card on site and collect data through a full SD card; if the SD card is abnormal, use Disk RecoveryWizard or DiskGenius to recover the data before reading the video data;
[0057] An image acquisition module, used for decomposing the butterfly video by a video decomposition method to obtain a butterfly image;
[0058] Furthermore, the image acquisition module includes:
[0059] A video decomposition unit, used for decomposing the butterfly video into a plurality of original images frame by frame;
[0060] Specifically, read each frame of the video stream, decompose the video stream into multiple frames and remove invalid images to obtain the original frame set; introduce a time recognition model based on the LSTM network to crop the date in the upper right corner of each frame in the original frame set and save it as a screenshot; read the cropped date screenshot, perform binarization and pixel inversion processing; identify the screenshot date and time, and convert them into a string; and time-label the images in the original frame set based on the string;
[0061] An image processing unit is used to amplify a plurality of original images, save them separately according to the groups, obtain a plurality of biological cluster images, and divide the plurality of biological cluster images into a training set and a test set;
[0062] Specifically, the original image is enlarged, and the butterflies, birds, dragonflies, bees, etc. that are photographed are individually screenshotted in square frames, and saved to new folders according to the identification groups, and named with the group name to establish multiple biological clusters. Each screenshot is opened in sequence from the butterfly cluster, and after manual interpretation and identification, it is saved to the respective species name folders according to the species name (such as Papilio chrysotoxum, Papilio serrata, Papilio biscuta, Papilio parisiensis, etc.), and all the screenshots in the folder are numbered in numerical order as the subsequent modeling training set. At the same time, the above screenshots are randomly selected, mixed and copied into another folder, and also numbered in numerical order as the modeling test set.
[0063] This embodiment also includes performing data enhancement processing on the training set, the enhanced data is used to train the butterfly classification model, and the trained model weights are saved; the test set is rescaled, the trained model weights are loaded to test the model, the confusion matrix and the area under the ROC curve are calculated according to the test data, the model is evaluated according to the calculation results, and the optimal butterfly classification model is obtained.
[0064] Data augmentation processing includes but is not limited to rescaling, rotation, width / height translation, shearing, scaling, horizontal flipping, and nearest neighbor padding. Data augmentation steps include:
[0065] (1) Rescaling: The images in the training set are scaled in length and width according to a preset ratio, such as randomly scaling to 0.8-1.2 times the original size, to improve the model's ability to recognize butterfly images of different sizes;
[0066] (2) Rotation: With the center of the image as the origin, randomly rotate the image at an angle between -30° and 30°, so that the model can recognize butterfly images with different flight postures and angles;
[0067] (3) Width / height shift: Randomly shift the image horizontally and vertically within a range of 0.1 times the image width and height to simulate butterflies appearing in different positions in the image.
[0068] (4) Shearing: Randomly generate a shearing matrix to shear the butterfly image, with a shearing angle between -15° and 15° and a shearing ratio of 0.1-0.3, so that the model can adapt to partially occluded or deformed butterfly images;
[0069] (5) Scaling: Randomly scale the local area of the image with a scaling factor between 0.9 and 1.1 to increase the diversity of the image;
[0070] (6) Horizontal flip: Flip the image horizontally with a probability of 0.5 to improve the model’s learning effect on the left-right symmetry of butterflies;
[0071] (7) Nearest neighbor filling mode: To address the blank areas at the edge of the image caused by the above transformation operations, the nearest neighbor filling mode is used to select the nearest pixel value around the blank area for filling, thereby maintaining the integrity and continuity of the image and being more conducive to model processing;
[0072] (8) Noise addition: Gaussian, salt and pepper and other types of noise are randomly added to the image to simulate the noise interference that may exist when collecting images from mountainous environments;
[0073] (9) Blur processing: The image is blurred to different degrees, including Gaussian blur, motion blur, etc., to improve the model's ability to recognize blurred images. Through the above data enhancement steps, the diversity of the training set data is expanded, and the accuracy and generalization ability of the improved model based on InceptionV3 in mountain butterfly recognition are improved.
[0074] A butterfly recognition module is used to recognize the butterfly image through a machine learning model and output the butterfly species; wherein the machine learning model includes: a time recognition model based on an LSTM network, a target detection model based on a YOLOv11 network, and a species classification model based on an improved InceptionV3 network; the time recognition model is used to perform time series analysis on the behavior pattern of the butterfly; the target detection model is used to perform target detection on the butterfly image; and the species classification model is used to classify the identified butterfly image into species;
[0075] Furthermore, the butterfly recognition module includes:
[0076] A model training unit, used to train the machine learning model using the training set to obtain a trained machine learning model;
[0077] The model testing unit is used to input the test set into the trained machine learning model and output the recognition result of the butterfly species.
[0078] Wherein, the model training unit includes
[0079] A first model training subunit is used for selecting a butterfly biological cluster from multiple biological clusters based on a target detection model of a YOLOv11 network;
[0080] The second model training subunit is used to classify the butterfly biological cluster based on the species classification model of the improved InceptionV3 network to obtain multiple species atlases; and number the butterfly images in each species atlas in numerical order.
[0081] Specifically, the deep learning InceptionV3 algorithm is improved in a targeted manner to construct binary classification (such as the Golden Swallowtail and other butterflies) or multi-classification (such as the Golden Swallowtail, the Broad-Banded Blue Swallowtail, etc.) models.
[0082] Build a network structure for mountain butterfly identification:
[0083] (1) Customized Inception module: decompose some conventional convolution kernels in the traditional Inception structure, embed direction-aware convolution kernels, and assign different values to the convolution kernel matrix elements according to the texture sensitivity in different directions. The Inception module embedded with the direction-aware convolution kernel is distributed to the key layers of the mountain butterfly image feature extraction according to preset intervals;
[0084] (2) Fusion structural advantages: Combining ResNet residual structure with InceptionV3. Determine the overall architecture design that combines ResNet residual structure with InceptionV3, determine the specific range of values of the number of layers based on the feature complexity and network depth trade-off experiment in the mountain butterfly recognition task, and plan the layout of the ResNet residual block connected after each InceptionV3 network layer with the specific number of layers. Based on the planned layout, access the ResNet residual block from two directions: the Inception module and the global average pooling layer and the fully connected layer. Specifically, add residual connections after the output of the branches of different-sized convolution kernels and pooling operations inside the Inception module of the InceptionV3 and after the Inception module splices the feature maps of different branches; add residual connections between multiple Inception modules of the InceptionV3 and between the global average pooling layer of the InceptionV3 and the fully connected layer with the softmax activation function.
[0085] After building a complete network structure for mountain butterfly recognition, complete the connection of each layer and set parameter initialization. Ensure that the residual connection can effectively return the gradient during the network training process, assist the deep network in processing the difference recognition task of the subtle features of various mountain butterflies, avoid the degradation phenomenon caused by the increase of network depth during training, ensure its complex feature learning ability, and improve the classification accuracy of different butterfly genera and species.
[0086] Further, the method for improving computing efficiency specifically includes:
[0087] (1) Model compression and deployment: Based on the important features of butterfly recognition, redundant connections of InceptionV3 are cut off, parameters are quantized and floating point data is converted to low-bit integers. The compressed model is then stored in a portable device to achieve rapid recognition and long-term monitoring of mountain butterflies in the wild.
[0088] (2) Efficient convolution acceleration: Use efficient convolution algorithms such as Fused-Multiply-Add (FMA) to optimize InceptionV3 reasoning, speed up the processing of high-resolution images of mountain butterflies, shorten the recognition time of a single image, and meet the needs of real-time monitoring in the wild and batch analysis of recorded data;
[0089] (3) Adaptive label smoothing: Considering that traditional label smoothing is not flexible enough, and the mountain environment is complex, and the body color and morphology of individual butterflies vary, an adaptive method is used to dynamically adjust the smoothing degree according to environmental labels such as altitude and vegetation type, thereby improving the model's recognition accuracy for changing individuals (variants, ecotypes, etc.) of mountain butterflies and reducing misjudgments;
[0090] (4) Optimization of auxiliary classifiers: In view of the complex background of mountains, butterflies are easily confused with dead leaves and flowers. Multiple auxiliary classifiers are set up in the shallow layer (focusing on texture contours) and middle layer (extracting color combinations) of the network, and weights are assigned according to the contribution of features in each layer. Together, they guide the main classifier to distinguish butterflies from the environmental background and other flying creatures, achieving accurate identification.
[0091] Furthermore, multimodal fusion broadens the recognition dimension, including:
[0092] (1) “Image + Environment”: Mountain butterflies are sensitive to changes in microclimate and microhabitat. By combining butterfly images with data such as altitude, humidity, and vegetation spectra, InceptionV3 is combined with the corresponding modal processing branch to identify butterflies and infer suitable habitats. For example, the silk butterfly prefers to live in high altitudes and cool shrubs, which assists in scientific research analysis such as butterfly species occurrence prediction.
[0093] (2) “Image + Audio”: There are many large butterflies in mountainous areas, and some of them make sounds when flapping their wings. The audio can be recorded and converted into a spectrogram, which can be input into the improved InceptionV3 together with the butterfly image. With the help of audio data, the ability to identify butterflies with damaged wings, transparent wings, or unclear markings can be improved.
[0094] Furthermore, strengthening regularization improves robustness, specifically including:
[0095] (1) Spectral normalization for anti-interference: The light and shadow in mountainous environments are complex, strong, and backlighting is common. Spectral normalization is used to constrain the weights of network layers to prevent gradient anomalies and model overfitting, improve recognition stability under different light conditions (early morning forest gap light, evening backlight), and reduce fluctuations in recognition rates.
[0096] (2) Strong features of adversarial training: Generative adversarial networks (GANs) are used to generate simulated mountain butterfly “interference state” (camouflage, blur, occlusion) samples, which are mixed with real samples to allow InceptionV3 to distinguish and learn, improve its adaptability to complex outdoor situations, and become more adept at identifying butterflies camouflaged in rock crevices and bushes. A global average pooling layer and a fully connected layer with a softmax activation function are introduced, and pre-trained weights are randomly generated using a Gaussian probability function.
[0097] (3) Spatial attention module: The spatial attention module is embedded in the InceptionV3 model. By calculating the spatial weight of the feature map, the model's ability to focus on the key feature areas of the butterfly is enhanced, thereby improving recognition accuracy.
[0098] (4) Channel attention module: Combined with the channel attention mechanism, the weight of each channel is dynamically adjusted according to the contribution of different channels of the feature map to butterfly recognition, thereby optimizing the model's sensitivity to different feature channels;
[0099] (5) Adaptive loss function weight: To address the problem of imbalanced number of samples of different categories in the mountain butterfly recognition task, an adaptive loss function weight adjustment mechanism is designed. According to the number of samples and recognition difficulty of each category, the weight of each category in the loss function is dynamically adjusted to optimize the model's recognition ability for different butterfly categories;
[0100] (6) Inter-layer weight balance: During the model training process, an inter-layer weight balance mechanism is introduced to dynamically adjust the weight distribution between layers based on the feature extraction capabilities of each layer and the overall performance of the model, ensuring that the model can evenly utilize the feature information of each layer in deep learning;
[0101] (7) Cross-layer feature fusion: A cross-layer feature fusion mechanism is designed in the InceptionV3 model to fuse feature maps at different levels, making full use of multi-scale feature information and improving the model's ability to recognize subtle features of butterflies.
[0102] (8) Feature Pyramid Network: The feature pyramid network (FPN) structure is introduced to construct a multi-scale feature pyramid, which can achieve effective fusion and transmission of features at different scales and enhance the model’s ability to recognize mountain butterflies at different scales.
[0103] The dataset construction module is used to generate a butterfly species screenshot identification set based on the butterfly species identification results.
[0104] Embodiment 2
[0105] This embodiment was carried out in Jiulian Mountain. A mountaintop where Swallowtail Butterfly and other butterflies gathered was selected to conduct dynamic monitoring of the mountaintop population of Swallowtail Butterfly, a rare species and large mountain butterfly. Based on the latest video materials, video information reading, model construction and verification, machine recognition and dynamic analysis were carried out to verify the effect of Embodiment 1.
[0106] (1) Model validation results: The confusion matrix and the AUC (area under the curve) of the ROC curve were calculated to evaluate the performance of the binary classification model for Papilio chinensis and other butterflies. The rows of the confusion matrix represent the predicted labels and the columns represent the true labels. Figure 2 (A) The confusion matrix shows the change in the number of classifications. The upper part of the matrix shows the classification results of the true labels (such as Swallowtail butterfly and other butterflies). It can be seen that the number of successful predictions is extremely high, while the number of wrong predictions is extremely low. The lower part of the matrix shows the classification results of the true labels, which also shows that the number of successful predictions is extremely high, while the number of wrong predictions is extremely low. This means that the model has good performance in the two-class classification (Swallowtail butterfly / non-Swallowtail butterfly).
[0107] ROC curve and AUC area diagram Figure 2 As shown in (B), the horizontal axis represents sensitivity, that is, the true positive rate (TPR), which represents the proportion of samples that are correctly identified as positive among all samples that are actually positive; the vertical axis represents specificity, that is, the proportion of samples that are correctly identified as negative among all samples that are actually negative. The dark gray curve represents the classification performance of "Swallowtail butterfly", and the light gray curve represents the classification performance of "other butterflies". The dotted line in the figure represents the classification performance of random guessing. The points on the curve represent the sensitivity and specificity of the model under different binary classification thresholds, and the higher the value, the better. The area under the curve AUC is used to quantify the overall performance of the model. The figure shows that the AUC values of the two curves are both greater than 0.99, which also shows that the model has excellent binary classification performance.
[0108] (2) Butterfly video machine recognition: Decompose the mountaintop butterfly video stream and convert it into images, and then use the above two-classification model for prediction and recognition applications. The specific content and steps are as follows:
[0109] a. Video decomposition: Use the opencv library and the read function of the VideoCapture object to read each frame of the video stream, decompose the video frame by frame, convert it into n frame images, and remove invalid images to obtain the original frame image set.
[0110] b. Read the shooting time. Introduce the tesserocr optical recognition library, crop the date in the upper right corner of each frame, take a screenshot and save it; read the cropped date screenshot, perform binarization and pixel inversion processing; use the image_to_text function of tesserocr to identify the screenshot date and time, and convert them into a string.
[0111] c. Identification of Papilio chrysotoptera. In the early stages, a large amount of butterfly image data was collected, including Papilio chrysotoptera and other butterflies. By introducing the deep learning YOLOv11 network, these butterfly atlases were manually annotated with Papilio chrysotoptera and other butterflies, and pre-trained, thereby establishing a target detection model based on the YOLOv11 network. The input image for this target detection is a single image decomposed from the video in a. These images contain a large number of butterflies. For each butterfly that appears in the image, the site is identified and framed, and then cropped into images to build a larger butterfly atlas;
[0112] d. Model recognition application. Using the butterfly atlas as the test set, the constructed Swallowtail butterfly binary classification or multi-classification model (based on the species classification model of the improved InceptionV3 network) is used for prediction and recognition, and the Swallowtail butterfly and other butterfly screenshot recognition sets are generated respectively. The generated atlas recognition sets are manually interpreted and reviewed, and the wrong recognition results are corrected and removed to obtain the corrected recognition sets, which are added to the existing training set library to further expand the training data, improve the generalization ability of the model, and promote the iterative upgrade of the model.
[0113] e. Data preservation: Combine steps b, c, and d above, and name the pictures using the butterfly species name (Swallowtail or other butterfly) and the read shooting time. The format is unified as "shooting date + species name + serial number".
[0114] (3) Dynamic analysis of butterflies on the mountaintop: Use the listdir function of the os module in the Python language to program, extract the information of the golden-spotted swallowtail butterfly and the activity time from the butterfly atlas file name uniformly named above, and then use the cell function in the workbook class under the openpyxl library to save the extracted information as an Excel file, including columns such as activity date and activity time, and perform dynamic analysis based on this. For example, count the activity frequency of the golden-spotted swallowtail butterfly at each time unit interval (such as every 10 minutes), analyze the daily dynamics, and obtain the daily activity rhythm, including the daily activity time (start to end time) and peak time. This method invention was used to extract the daily mountaintop flight time and frequency data of the golden-spotted swallowtail butterfly in Jiulian Mountain, Figure 3 The data shows the occurrence dynamics of this large and rare swallowtail butterfly in 2023. It can be seen that the local golden-spotted swallowtail butterfly has two mountaintop flight periods throughout the year, from April 9 to May 4 (spring generation: 25 days) and from August 8 to August 30 (autumn generation: 22 days). The spring generation has a maximum daily flight frequency of 95 times, but the peak distribution is not obvious, and the overall frequency is less than that of the autumn generation; the latter has a maximum daily frequency of 195 times, and the flight frequency shows a bimodal distribution. Not only that, the daily occurrence dynamics of the spring and autumn generations are also inconsistent. The daily mountaintop behavior of the spring generation is carried out from 05:30 to 11:30, with a peak time at 9:08; while the daily mountaintop behavior of the autumn generation is carried out from 05:30 to 10:00, ending 1.5 hours earlier than the spring generation, and the peak time is 6:40, nearly 2.5 hours earlier than the spring generation.
[0115] From the examples, it can be seen that Figure 1 ), this embodiment can completely collect the dynamic data of the adult occurrence of the golden-spotted swallowtail butterfly, establish an iterative and upgradeable classification model, use the machine to identify the video material of the golden-spotted swallowtail butterfly, and read the data such as the date and time of the butterfly's activities, and completely reveal the annual, monthly and daily occurrence dynamics of this large and rare species in the wild. Therefore, this embodiment has excellent verification effect and can provide technical support for the dynamic monitoring of butterflies on mountaintops.
[0116] Comparative Example:
[0117] Field monitoring of Teinopalpus aureus in Jiulian Mountain based on line transect method:
[0118] (1) Collection at known points: In Jiulian Mountain, the occurrence points of adults of the golden-spotted swallowtail butterfly encountered in the local area were collected through literature and interview methods, including encounter points such as mountaintop behavior, water absorption behavior, and corpse remains;
[0119] (2) Random survey: During the period when adults of the Papilio chrysotoptera occur (April-May and August-September), randomly survey multiple routes from the foot of the mountain to the top of the mountain >1000 m, and try to cover the known occurrence points in step (1). While verifying these occurrence points, we also try to add more field records of Papilio chrysotoptera;
[0120] (3) Selecting fixed sample lines: From the random lines in step (2), select 2-3 random lines with high encounter rates of Papilio chrysotoptera adults as fixed sample lines and carry out butterfly sample line monitoring;
[0121] (4) Butterfly line monitoring: Refer to the method of "Technical Guidelines for Biodiversity Observation - Butterflies" (HJ 710.9-2014) and arrange for dedicated personnel to conduct regular line monitoring:
[0122] a. Form a butterfly transect monitoring team consisting of senior professional technicians (team leaders) and other professional technicians with field work experience, local forest rangers, graduate students, etc. Before the implementation of the monitoring, the team leader will conduct butterfly monitoring training in the form of reports and on-site guidance, including butterfly monitoring methods, relevant standards and specifications, record content, locator operation, butterfly species identification, biological characteristics of the golden-spotted swallowtail butterfly, etc.;
[0123] b. The team leader shall arrange 1-2 trained personnel to perform monitoring tasks at each fixed sample line according to the actual situation. They shall be required to conduct surveys along the foot of the mountain to the top of the mountain (>1000m) 1-2 times a week on cloudy or sunny days, record the types and numbers of butterflies encountered within 2.5m to the left and right and 5m above the line, and locate them at the same time;
[0124] c. For butterflies that cannot be identified immediately, you can use an insect net to catch them as needed, and release them on the spot after the species name is determined. For some butterflies that cannot be identified on the spot, you can take photos from multiple angles first, and then check or consult to complete it.
[0125] (5) Data collation and analysis: Divide the sample line into multiple sample sections according to the habitat type, with each sample section of 100 m. Count the number of butterfly species, individuals, encounter dates, etc. in each sample section, calculate the diversity index, and compare the differences in different habitat types and environmental gradients (such as altitude). At the same time, data on specific species such as the golden-spotted swallowtail butterfly can also be extracted separately to understand their occurrence characteristics (habitat type, population status, etc.).
[0126] The monitoring data of Papilio chrysotoptera obtained in the comparative example are compared and verified with those in the embodiment:
[0127] (1) Comparison and verification of the mountain top monitoring time. Using the mountain top monitoring technology of this embodiment, the mountain top monitoring time of the embodiment starts at 5:30 every day, and then can continue to work constantly until 18:00, although the data reading of the golden-spotted swallowtail butterfly can end at 14:00 (thereafter blank data). However, using the sample line method, the mountain top monitoring time of the comparative example does not start until 6:00 at the earliest. Moreover, from the distribution of the time when the manual inspection reaches the mountain top, it can be seen that most of the mountain top monitoring times of the sample line method are after 10:00 (the peak value is 10:01, see Figure 4The embodiment reveals that the peak time of the mountain-top behavior of the Jiulianshan Golden Spotted Swallowtail Butterfly in spring is 9:08, which is nearly 1 hour late; the peak time of the mountain-top behavior in autumn is 6:40, which is 3.35 hours late (see Figure 3 and Figure 4 (A));
[0128] (2) Comparative verification of the number of individuals encountered by the golden-spotted swallowtail butterfly. The monitoring records of the spring generation period of the golden-spotted swallowtail butterfly in 2023 (10 days) and 2024 (13 days) were collected for comparative verification. Figure 4 It shows that by applying the technology of this embodiment, the embodiment recorded the behavior and activities of individuals of the golden-spotted swallowtail butterfly on the mountain top in both 2023 and 2024. Among them, the encounter rate in 2023 was 40% (see Figure 4 (B)) The encounter rate in 2024 is 46.2% (see Figure 4 (C)); however, using the transect method, no individuals were recorded in 2023, with an encounter rate of 0, and although individuals were recorded in 2024, the encounter rate was only 15.4%.
[0129] Therefore, comparative verification shows that applying the technology of this embodiment to the mountaintop monitoring of rare large mountain butterflies such as the Papilio chrysotoptera can make up for the defects of the traditional line sample method and solve the problems exposed when the line sample method is applied in mountain environments, including that the implementation of monitoring is easily subject to artificial restrictions, the monitoring time varies greatly, and the monitoring results are often questioned.
[0130] The technical solution of this embodiment has the following advantages: (1) Compared with the existing "Pollard Walk" transect method, this method invention can better adapt to the mountain environment, and requires less manpower input. Monitoring is not limited by working hours, but can cover the entire butterfly occurrence period; (2) Compared with the existing direct counting method, this technical invention is not affected by the subjectivity and recognition ability of the monitor, and can use artificial intelligence to identify butterflies active on the top of the mountain, complete data reading in a short time, and the whole process is standardized and standard. The data is consistent and can be deeply mined and analyzed, especially in combination with environmental variables such as climate; (3) Compared with the existing trapping monitoring methods such as the trapping cage method, this method invention has no group bias and can monitor the complete butterfly community active on the top of the mountain, completely making up for the lack of monitoring of rare large swallowtail butterflies, white butterflies and other groups by the trapping method, and can truly and comprehensively reflect the occurrence and dynamics of butterflies in the wild; (4) This method invention has high universality. With the help of further expansion of field monitoring data, the algorithm can be continuously improved and iteratively upgraded in promotion and application, and its adaptability to butterfly monitoring in different regions and locations can be gradually improved. More importantly, except for the monitoring installation that requires manual labor, the monitoring data collection invented by this method can be downloaded remotely or completed with the help of SD card replacement, and butterfly identification is completed by artificial intelligence. Therefore, there is no need for special training for monitoring personnel. It has the advantages of simple method, easy operation, and reliable results.
[0131] The invention of this method integrates the latest monitoring and artificial intelligence technologies, can get rid of artificial restrictions, can be applied and promoted in mountain butterfly occurrence areas (such as nature reserves), meet the current needs of wild butterfly monitoring, and improve the monitoring level and biodiversity protection quality; the invention of this method integrates hardware technologies such as monitoring equipment selection, installation, and setting with software technologies such as monitoring point selection, data reading, intelligent recognition algorithm establishment, and upgrading, forming a complete monitoring technology for wild mountain butterfly monitoring and dynamic analysis and reporting, which can be used as a standard in the relevant field to regulate current wild butterfly monitoring behavior; the software technology part of the invention of this method is expected to be made into an identification chip in an algorithm-built-in manner, to create a butterfly monitoring intelligent product, and iteratively upgraded to meet the current urgent precise monitoring requirements; the invention of this method can solve the problems of discontinuity and high cost of artificial mountain operations, and high dependence on the expertise of specific butterfly species, and provide field monitoring solutions for rare and endangered butterflies such as the Papilio chrysotoptera, to learn about their survival status, dynamics and trends, and provide scientific support for current rescue protection. The hardware part of the technology of this embodiment is small in size and occupies a small area when installed in the wild. It can be integrated with the natural environment with the help of protective color. It is an environmentally friendly technology and can further improve the protection benefits of wildlife resources and biodiversity in various places.
[0132] Embodiment 3
[0133] This embodiment also provides a method for identifying and monitoring mountain butterflies based on the improved Inception v3, which is characterized in that it is used to implement the system described in the first embodiment, and the method includes the following steps:
[0134] Obtain available monitoring mountain tops, and deploy video surveillance equipment at mountaintop locations where butterflies gather at high concentrations and fly in circles actively, to collect butterfly videos;
[0135] Decomposing the butterfly video by a video decomposition method to obtain a butterfly image;
[0136] The butterfly image is identified by a machine learning model, and the butterfly species is output; wherein the machine learning model includes: a time recognition model based on an LSTM network, a target detection model based on a YOLOv11 network, and a species classification model based on an improved InceptionV3 network; the time recognition model is used to perform time series analysis on the behavior pattern of the butterfly; the target detection model is used to perform target detection on the butterfly image; and the species classification model is used to classify the identified butterfly image into species;
[0137] Based on the identification results of butterfly species, a butterfly species screenshot identification set is generated.
[0138] Embodiment 4
[0139] This embodiment further discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the model recognition step of the system described in the first embodiment is implemented.
[0140] Embodiment 5
[0141] This embodiment also discloses a computer program product, including a computer program, which implements the model recognition step of the system described in the first embodiment when executed by a processor.
[0142] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A mountain butterfly recognition and monitoring system based on improved Inceptionv3, characterized in that: include: The butterfly monitoring module is used to determine available monitoring mountain tops and deploy video monitoring equipment at mountain tops where butterflies gather at high concentrations and fly in circles actively, to collect butterfly videos; An image acquisition module, used for decomposing the butterfly video by a video decomposition method to obtain a butterfly image; A butterfly recognition module, used to recognize the butterfly image through a machine learning model and output the butterfly species; The machine learning model includes: a time recognition model based on an LSTM network, a target detection model based on a YOLOv11 network, and a species classification model based on an improved InceptionV3 network; the time recognition model is used to perform time series analysis on the behavior pattern of butterflies; the target detection model is used to perform target detection on the butterfly images; and the species classification model is used to classify the identified butterfly images; The dataset construction module is used to generate a butterfly species screenshot identification set based on the butterfly species identification results.
2. The system according to claim 1, characterized in that The butterfly monitoring module comprises: A monitoring point selection unit is used to select available mountain tops according to conditions such as altitude, mountain shape, evergreen broad-leaved forest coverage, and large butterfly gathering, and set mountain tops that meet the mountain butterfly monitoring conditions as monitoring points; The monitoring equipment installation unit is used to determine the installation location of the monitoring equipment according to the activity range and area of the butterflies at the monitoring point; select suitable monitoring cameras, poles, solar panels and controllers according to the shooting distance, coverage, angle and resolution requirements; assemble the monitoring equipment at the determined location, and select and install WIFI signal transmitter amplifier accessories according to the signal distribution on the top of the mountain; Wherein, the to-be-monitored point selection unit and the monitoring equipment installation unit are respectively connected to the image acquisition unit.
3. The system according to claim 1, characterized in that The image acquisition module comprises: A video decomposition unit, used for decomposing the butterfly video into a plurality of original images frame by frame; An image processing unit is used to amplify a plurality of original images, save them separately according to the groups, obtain a plurality of biological cluster images, and divide the plurality of biological cluster images into a training set and a test set; Wherein, the video decomposition unit and the image processing unit are respectively connected to the butterfly recognition module.
4. The system according to claim 1, characterized in that The butterfly recognition module comprises: A model training unit, used to train the machine learning model using the training set to obtain a trained machine learning model; The model testing unit is used to input the test set into the trained machine learning model and output the recognition result of the butterfly species.
5. The system according to claim 4, characterized in that The model training unit includes A first model training subunit is used for selecting a butterfly biological cluster from multiple biological clusters based on a target detection model of a YOLOv11 network; The second model training subunit is used to classify the butterfly biological cluster based on the species classification model of the improved InceptionV3 network to obtain multiple species atlases; and number the butterfly images in each species atlas in numerical order.
6. The system according to claim 1, characterized in that The improved InceptionV3 network includes: Customize the Inception unit to decompose some conventional convolution kernels in the traditional Inception structure; embed the direction-aware convolution kernel to identify texture features in different directions; assign different values to the convolution kernel matrix elements according to the sensitivity of texture features in different directions; distribute the Inception module embedded with the direction-aware convolution kernel at the key layers of the network at preset intervals to optimize the feature extraction of mountain butterfly images; The fusion structure unit is used to determine the range of specific layer values based on the trade-off experiment between feature complexity and network depth in the mountain butterfly recognition task; plan the layout of the ResNet residual block connected after each InceptionV3 network layer with the specific number of layers, and determine the overall architecture design combining the ResNet residual structure with the InceptionV3; Among them, the customized Inception unit and the fusion structure unit are respectively connected to the data set construction module.
7. The system according to claim 1, characterized in that In the fusion structure unit, a residual connection is added after the output of the branches of the convolution kernels and pooling operations of different sizes inside the Inception module of InceptionV3, and after the Inception module concatenates the feature maps of different branches; Add residual connections between multiple Inception modules of InceptionV3, and between the global average pooling layer and the fully connected layer with softmax activation function.
8. A mountain butterfly recognition and monitoring method based on improved Inceptionv3, characterized in that: For implementing the system according to any one of claims 1 to 7, the method comprises the following steps: Obtain available monitoring mountain tops, and deploy video surveillance equipment at mountaintop locations where butterflies gather at high concentrations and fly in circles actively, to collect butterfly videos; Decomposing the butterfly video by a video decomposition method to obtain a butterfly image; The butterfly image is identified by a machine learning model, and the butterfly species is output; wherein the machine learning model includes: a time recognition model based on an LSTM network, a target detection model based on a YOLOv11 network, and a species classification model based on an improved InceptionV3 network; the time recognition model is used to perform time series analysis on the behavior pattern of the butterfly; the target detection model is used to perform target detection on the butterfly image; and the species classification model is used to classify the identified butterfly image into species; Based on the identification results of butterfly species, a butterfly species screenshot identification set is generated.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to claim 8 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to claim 8 are implemented.