Human activity detection method and system based on multi-feature fusion twin network
The multi-feature fusion twin network extracts deep features in remote sensing images and fuses the pyramid structure, which solves the problems of time-consuming and insufficient interpretation capabilities of traditional remote sensing detection methods, achieves high-accuracy human activity detection and type identification, and provides scientific Strategy basis.
Patent Information
- Application Number
- CN202410124108.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-29
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-01-29
AI Technical Summary
Traditional remote sensing human activity detection methods are time-consuming, sensitive to image quality, lack information, have weak interpretation capabilities, and cannot accurately identify activity types, which limits the in-depth analysis and understanding of subsequent data.
The human activity detection method based on multi-feature fusion twin network is used to obtain and preprocess remote sensing image data, perform pixel-level annotation, extract deep features and fuse pyramid feature structures, predict change binary maps and land use classification maps, and combine vector splicing Calculate human activity intensity.
It effectively shortens the detection time, improves the accuracy and credibility of the prediction results, can accurately identify the types of human activities and quantitatively analyze the scope and intensity of the activities, providing scientific basis for strategy formulation.
Smart Images

Figure CN117975265B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of environmental remote sensing detection, and in particular to a method and system for detecting human activities based on a multi-feature fusion twin network. Background Art
[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute prior art.
[0003] Human activities in nature reserves refer to various human activities and their consequences that occur within nature reserves and affect the ecological environment of the nature reserves, including mineral resource development, quarrying and sand mining, energy development and production, water conservancy projects, tourist facilities, transportation facilities, settlements, agricultural reclamation and breeding farms (areas), etc.
[0004] Traditional remote sensing human activity detection methods mainly rely on image processing, feature extraction and classification technologies. By using satellite or aerial remote sensing image data to identify and classify objects, human activities can be detected. These methods mainly include visual analysis, algebraic methods (CVA), data reduction methods (PCA, MAD) and advanced models (Li-Strahler reflectance model, spectral mixture model). These methods can extract useful information from image data and identify human activities, but they are time-consuming, sensitive to image quality, missing information, and weak interpretation ability. Although advanced models have the advantages of being intuitive and physically meaningful, their application scenarios are limited and require careful evaluation of data types and features. In addition, traditional methods can only identify human activity areas and cannot accurately determine activity types, which limits the subsequent in-depth analysis and understanding of the data.
[0005] In recent years, deep learning-based methods have attracted widespread attention. Compared with traditional change detection methods, deep learning can automatically learn features from given data and significantly reduce the need for expert domain knowledge. In addition, due to its excellent nonlinear feature extraction ability, deep learning methods can better understand complex scenes. Using deep learning methods, features can be extracted and classified from big data such as satellite or aerial remote sensing images, achieving rapid and accurate detection of human activities over a wide area.
[0006] At present, most of the deep learning methods for detecting human activities usually have two ideas: first identify the changed areas before and after the image, and then classify the land use before and after the changed areas; or first classify the land use before and after the image, and then compare to obtain the changed areas. The former is more interpretable, but generally requires training two models to perform change detection and semantic segmentation tasks respectively, which is a cumbersome process; although the latter can directly compare the land use classification map before and after the dual-phase image to obtain the changed area, it has serious salt and pepper noise and requires further processing. Summary of the invention
[0007] In order to solve the above problems, the present invention proposes a human activity detection method and system based on a multi-feature fusion twin network. While detecting human activities in dual-phase images, the land use of the changed area is classified, the type of human activity is determined according to the transfer of different land use types, and the scope and intensity of various human activities are quantitatively analyzed to provide a scientific basis for strategy formulation.
[0008] According to some embodiments, the present disclosure adopts the following technical solutions:
[0009] The human activity detection method based on multi-feature fusion twin network includes:
[0010] Acquire remote sensing image data of nature reserves at different times, and obtain images of the target area after preprocessing;
[0011] The target area image is annotated at the pixel level to obtain the changed area in the target area image at different times before and after, and the corresponding land use type labels are assigned to the changed area before and after to obtain the final dual-phase label data image; the dual-phase label data image is input into the MFFSN network to extract the deep features in the dual-phase label data image, and the pyramid feature structure is integrated to enhance the deep features, and finally the binary map of the change of the dual-phase label data image and the land use classification map before and after the change area are predicted and output;
[0012] The predicted output results are spliced through vector stitching to obtain the land use map of the entire nature reserve before and after the change area. Different weights are assigned to each land use type to obtain the intensity of human activities.
[0013] According to some embodiments, the present disclosure adopts the following technical solutions:
[0014] Human activity detection system based on multi-feature fusion twin network, including:
[0015] The data acquisition module is used to obtain remote sensing image data of nature reserves at different times and obtain the target area image after preprocessing;
[0016] The prediction module is used to annotate the target area image at the pixel level, obtain the changed area in the target area image at different times before and after, and assign corresponding land use type labels to the changed area before and after, so as to obtain the final dual-phase label data image; the dual-phase label data image is input into the MFFSN network, the deep features in the dual-phase label data image are extracted, and the pyramid feature structure is integrated to enhance the deep features, and finally the binary map of the change of the dual-phase label data image and the land use classification map before and after the change area are predicted and output;
[0017] The detection module is used to splice the prediction output results through vector splicing to obtain the land use map before and after the change area of the entire nature reserve, assign different weights to each land use type, and obtain the intensity of human activities.
[0018] According to some embodiments, the present disclosure adopts the following technical solutions:
[0019] A non-transitory computer-readable storage medium, which is used to store computer instructions. When the computer instructions are executed by a processor, the human activity detection method based on a multi-feature fusion twin network is implemented.
[0020] According to some embodiments, the present disclosure adopts the following technical solutions:
[0021] An electronic device comprises: a processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes the human activity detection method based on a multi-feature fusion twin network.
[0022] Compared with the prior art, the present invention has the following beneficial effects:
[0023] The human activity detection method based on multi-feature fusion twin network disclosed in the present invention utilizes multi-feature fusion twin network (MFFSN) to simultaneously extract common features of dual-phase images. The large amount of texture and spectral information contained in these shallow and deep features can better capture human activities in dual-phase images, and fuse pyramid structure feature enhancement, and output prediction results. It can identify the type of human activities while detecting human activities in nature reserves, effectively shorten the detection time, and improve the accuracy and credibility of the prediction results; and quantitatively analyze the scope and intensity of various human activities, provide a scientific basis for strategy formulation, meet the requirements of accuracy and practicality in specific applications, and provide an effective solution for fields such as remote sensing human activity detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings constituting a part of the present disclosure are used to provide a further understanding of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure.
[0025] Figure 1 A schematic diagram of a method flow of an embodiment of the present disclosure;
[0026] Figure 2 A schematic diagram of a network model flow chart of an embodiment of the present disclosure;
[0027] Figure 3 Schematic diagram of a pyramid pooling module according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] The present disclosure is further described below in conjunction with the accompanying drawings and embodiments.
[0029] It should be noted that the following detailed descriptions are all illustrative and are intended to provide further explanation of the present disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present disclosure belongs.
[0030] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present disclosure. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0031] Example 1
[0032] In one embodiment of the present disclosure, a method for detecting human activities based on a multi-feature fusion twin network is provided, including:
[0033] Step 1: Obtain remote sensing image data of the nature reserve at different times, and obtain the target area image after preprocessing;
[0034] Step 2: Annotate the target area image at pixel level, obtain the changed area in the target area image at different times, and assign corresponding land use type labels to the changed area before and after, so as to obtain the final dual-temporal label data image;
[0035] Step 3: Input the dual-phase labeled data image into the MFFSN network, extract the deep features in the dual-phase labeled data image, fuse the pyramid feature structure, enhance the deep features, and finally predict and output the change binary map of the dual-phase labeled data image and the land use classification map before and after the change area;
[0036] Step 4: Use vector stitching to stitch the predicted output results together to obtain the land use map of the entire nature reserve before and after the change area, assign different weights to each land use type, and obtain the intensity of human activities.
[0037] As an embodiment, the specific implementation process of a human activity detection method based on a multi-feature fusion twin network disclosed in the present invention includes:
[0038] (1) Data acquisition and preprocessing: First, two RGB remote sensing images with a spatial resolution of 0.5 m of the target nature reserve were collected at different times, and atmospheric correction, radiation correction, and spatiotemporal consistency processing were performed. Through automated image processing technologies such as projection transformation, resampling, image cropping, and tile generation, the image library of the target area was obtained.
[0039] (2) Sample labeling: Randomly select 1 / 10 of the image pairs in the target area image library as training samples (select 1000 pairs if there are more than 1000 pairs), manually label the samples at the pixel level, and assign six labels before and after the image change area: agricultural land, industrial land, residential land, water body, vegetation, and mine. Finally, a pair of label data corresponding to each pair of images is obtained, where 0 represents the unchanged area, and 1-6 represents the six land use types before and after the change area. The obtained training samples are randomly divided into a training set and a validation set at a ratio of 9:1.
[0040] (3) MFFSN training: The sample data obtained in step (2) is used to train the MFFSN network, requiring the mean intersection over union (mIOU) to be less than 0.65 and the overall accuracy (OA) to be no less than 0.85, for detecting land cover changes in the study area. The network is a twin structure based on multi-scale feature fusion and is built using the Pytorch library in Python.
[0041] The MFFSN network is trained using the labeled training set, and the validation set is used to evaluate the model capability. After training, the MFFSN network can receive input dual-temporal remote sensing images, detect the surface change area to generate the change patch, and obtain the land use type before and after the change area. The following will introduce the model training process in detail.
[0042] The MFFSN network consists of three parts: Backbone for feature extraction, Neck for feature enhancement, and Head for predictive output. Backbone extracts features after receiving the input of dual-phase images, and the features are enhanced by Neck and input into Head for predictive output. The output consists of three parts: the binary map of the change of dual-phase images and the land use classification map before and after the change area. The loss function is defined as follows:
[0043] Loss = loss_bin*2+loss1+loss2
[0044] Where loss_bin represents the loss of the change detection task, that is, the error between the predicted binary change map and the true change label, which is calculated using the binary cross entropy loss function (BCELoss); loss1 and loss2 are the losses of land use classification in the change area of dual-temporal images, that is, the error between the predicted land use classification results in the change area and the true classification labels, which are calculated using the cross entropy loss function (CrossEntropyLoss).
[0045] In the specific implementation process, technical means such as data enhancement, learning rate adjustment, batch normalization, etc. need to be considered to further improve the performance and stability of the model. In addition, appropriate evaluation indicators can be used to evaluate the performance of the model in remote sensing change detection and scene recognition tasks. The specific indicators are as follows:
[0046] Accuracy (OA): OA = (TP + TN) / (TP + TN + FP + FN)
[0047] Intersection over Union (IOU): IOU = TP / (TP+FP+FN)
[0048] Average intersection-over-union (mIOU): mIOU = (IOU1 + IOU2 + ... + IOUk) / k
[0049] Where TP represents the true positive, that is, the number of samples correctly predicted as positive by the model; TN represents the true negative, that is, the number of samples correctly predicted as negative by the model; FP represents the false positive, that is, the number of samples incorrectly predicted as positive by the model; FN represents the false negative, that is, the number of samples incorrectly predicted as negative by the model; k is the number of land use categories in the changed area + 1 (unchanged area).
[0050] like Figure 2 As shown in Figure 1, the network consists of three parts: Backbone for feature extraction, Neck for feature enhancement, and Head for predicting output results. The Backbone is designed as a dual-branch structure network with shared weights to extract the common semantic information of the image. The dual-phase images are input into two sub-networks respectively. After 4 downsamplings, the image size is reduced to 1 / 8 of the original size and the number of channels is increased to 512. The pyramid pooling module (PPM) is selected as the Neck, and the structure is as follows: Figure 3As shown in the figure, the deep features obtained by Backbone are averagely pooled at different sizes and concatenated with the deep features to better utilize the features extracted by Backbone. The Head consists of three branches, namely Head_cd for monitoring changes in dual-temporal images and two Head_se for land use classification of dual-temporal images. In order to connect the shallow features in Backbone, Head_cd is designed to be symmetrical with the Backbone subnetwork. The feature map of the dual-temporal image is enhanced by Neck and merged into Head_cd. After multiple upsampling, the number of feature maps is reduced to 1, and the image size is restored to the same as the original input image, and the change map of the dual-temporal image is obtained.
[0051] At the same time, skip connections are added to use the shallow features in Backbone as the input of the deconvolution layer to achieve feature fusion. Head_se consists of two convolutional layers. The feature maps of the dual-phase image are enhanced by Neck and input into the corresponding Head_se. The number of feature maps is reduced to 6 (6 land use categories in the change area in the sample annotation) without reducing the image size. Then, nonlinear interpolation is used to restore it to the image size. Finally, the change map obtained by Head_cd is used for masking, and the value of the unchanged area in the change map is set to 0 to obtain the land use type of the change area in the dual-phase image.
[0052] (4) Human activity detection and quantitative expression: The preprocessed target area image library is input into the trained MFFSN network to obtain the land use type map before and after the dual-phase image change area. After completing the prediction of all image pairs in the target area image library, the prediction results are spliced by vector splicing to obtain the land use map of the entire nature reserve area before and after the change. Vector calculation is used to calculate the transfer of various land cover types and assign corresponding human activity types to them. In this process, different weights can be assigned to each land use type. The weights formulated by the present disclosure for each land use type are as follows in Table 1:
[0053] Table 1 Weights for various land use types
[0054] Land Type Agricultural land Building land the way Water Mining Natural vegetation Weight 0.2 0.8 0.5 0.1 1.0 0.1
[0055] The intensity of each human activity is calculated using the following formula:
[0056] Activity intensity = [(α2-α1)*S] / St
[0057] In the formula, α1 and α2 represent the weight values of land use types before and after the change of this type of activity, S represents the total area of the change patches where the land use transfer conforms to this type of activity, and St represents the total area of the change patches in the entire study area. Through this formula, the intensity of each human activity can be calculated and compared to understand the relative importance and impact of each human activity in the overall situation.
[0058] Example 2
[0059] In one embodiment of the present disclosure, a human activity detection system based on a multi-feature fusion twin network is provided, comprising:
[0060] The data acquisition module is used to obtain remote sensing image data of nature reserves at different times and obtain the target area image after preprocessing;
[0061] The prediction module is used to annotate the target area image at the pixel level, obtain the changed area in the target area image at different times before and after, and assign corresponding land use type labels to the changed area before and after, so as to obtain the final dual-phase label data image; the dual-phase label data image is input into the MFFSN network, the deep features in the dual-phase label data image are extracted, and the pyramid feature structure is integrated to enhance the deep features, and finally the binary map of the change of the dual-phase label data image and the land use classification map before and after the change area are predicted and output;
[0062] The detection module is used to splice the prediction output results through vector splicing to obtain the land use map before and after the change area of the entire nature reserve, assign different weights to each land use type, and obtain the intensity of human activities.
[0063] Example 3
[0064] In one embodiment of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the human activity detection method based on a multi-feature fusion twin network is implemented.
[0065] Example 4
[0066] In one embodiment of the present disclosure, an electronic device is provided, including: a processor, a memory, and a computer program; wherein the processor is connected to the memory, and the computer program is stored in the memory. When the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device executes the human activity detection method based on the multi-feature fusion twin network.
[0067] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0068] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0069] Although the above describes the specific implementation methods of the present disclosure in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present disclosure. Technical personnel in the relevant field should understand that on the basis of the technical solution of the present disclosure, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present disclosure.
Claims
1. A human activity detection method based on a multi-feature fusion twin network MFFSN is characterized by: include: Acquire remote sensing image data of nature reserves at different times, and obtain images of the target area after preprocessing; The target area image is annotated at the pixel level to obtain the changed area in the target area image at different times before and after, and the corresponding land use type label is assigned to the changed area before and after the change to obtain the final dual-phase label data image; the dual-phase label data image is input into the MFFSN network to extract the deep features in the dual-phase label data image, and the pyramid feature structure is fused to enhance the deep features. Finally, the prediction output is performed. The prediction output result consists of three parts, namely the change binary map of the dual-phase label data image and the land use classification map before and after the change of the change area. The loss function is defined as follows: Loss = loss_bin * 2 + loss1 + loss2 Where loss_bin represents the loss of the change detection task, that is, the error between the predicted binary change map and the true change label, calculated using the binary cross entropy loss function; loss1 and loss2 are the losses of the land use classification of the change area of the dual-temporal label data image, that is, the error between the predicted land use classification results of the change area and the true classification label, calculated using the cross entropy loss function; The predicted output results are spliced through vector stitching to obtain the land use map of the entire nature reserve change area before and after the change, and different weights are assigned to each land use type to obtain the intensity of human activities.
2. The human activity detection method based on the multi-feature fusion twin network MFFSN as claimed in claim 1 is characterized in that: Preprocessing of remote sensing image data includes atmospheric correction, radiation correction and spatiotemporal consistency processing, and obtaining images of the target area through projection transformation, resampling, image cropping and tile generation automated image processing technology.
3. The human activity detection method based on the multi-feature fusion twin network MFFSN as claimed in claim 1 is characterized in that: The target area images are manually annotated at the pixel level, and corresponding land use type labels are assigned to the changed areas in the images before and after the changes. Finally, a pair of label data corresponding to each pair of images is obtained, where 0 represents the unchanged area and other numbers represent different land use types.
4. The human activity detection method based on the multi-feature fusion twin network MFFSN as claimed in claim 1 is characterized in that: The MFFSN network consists of three parts: the backbone network Backbone for feature extraction, the neck network Neck for feature enhancement, and the head network Head for making prediction output results. The pyramid structure is integrated in the feature enhancement part to enhance the extracted deep features.
5. The human activity detection method based on the multi-feature fusion twin network MFFSN as claimed in claim 1 is characterized in that: Vector calculations are used to calculate the transfer of various land use types and assign corresponding human activity types to them.
6. The human activity detection method based on the multi-feature fusion twin network MFFSN as claimed in claim 5 is characterized in that: The intensity of each human activity is calculated using the following formula: Activity intensity = [(α2 – α1)* S] / St In the formula, α1 and α2 represent the corresponding weight values of land use types before and after the human activity change, S represents the total area of the change patches where the land use transfer is consistent with the human activity, and St represents the total area of the change patches in the entire study area.
7. The human activity detection system based on multi-feature fusion twin network MFFSN is characterized by: include: The data acquisition module is used to obtain remote sensing image data of nature reserves at different times and obtain the target area image after preprocessing; The prediction module is used to annotate the target area image at the pixel level, obtain the changed area in the target area image at different times before and after, and assign the corresponding land use type label to the changed area before and after the change, so as to obtain the final dual-phase label data image; the dual-phase label data image is input into the MFFSN network, the deep features in the dual-phase label data image are extracted, and the pyramid feature structure is integrated to enhance the deep features, and finally the prediction output is performed. The prediction output result consists of three parts, namely the change binary map of the dual-phase label data image and the land use classification map before and after the change of the changed area. The loss function is defined as follows: Loss = loss_bin * 2 + loss1 + loss2 Where loss_bin represents the loss of the change detection task, that is, the error between the predicted binary change map and the true change label, calculated using the binary cross entropy loss function; loss1 and loss2 are the losses of the land use classification of the change area of the dual-temporal label data image, that is, the error between the predicted land use classification results of the change area and the true classification label, calculated using the cross entropy loss function; The detection module is used to splice the prediction output results through vector splicing to obtain the land use map before and after the change of the entire nature reserve change area, assign different weights to each land use type, and obtain the intensity of human activities.
8. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by the processor, the human activity detection method based on the multi-feature fusion twin network MFFSN as described in any one of claims 1-6 is implemented.
9. An electronic device, characterized in that: include: A processor, a memory and a computer program; wherein the processor is connected to the memory, and the computer program is stored in the memory. When the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device implements the human activity detection method based on the multi-feature fusion twin network MFFSN as described in any one of claims 1 to 6.
