A method and system for tourism number statistics based on deep snake technology with multi-scale feature fusion

By using the Deep Snake algorithm with multi-scale feature fusion and combined with the CenterNet detection network, we have achieved accurate automatic tourist number counting in scenic spots where tickets are not required. This solves the problem of time-consuming and labor-intensive traditional methods and improves the accuracy and robustness of the statistics.

CN119992454BActive Publication Date: 2025-11-11HUNAN SANY IND VOCATIONAL & TECH COLLEGE
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510071972.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-16
Publication Date
2025-11-11
Estimated Expiration
2045-01-16

AI Technical Summary

Technical Problem

Traditional methods of tourist number statistics are time-consuming and labor-intensive, especially in scenic spots where there is no need to purchase or check tickets, making it difficult to achieve accurate automatic statistics.

Method used

The Deep Snake algorithm, which integrates multi-scale feature fusion, is used to detect and segment human figures by training the Deep Snake module and combining it with the CenterNet object detection network. Multi-scale feature extraction technology is used to capture human figure features at different scales and adjust the contours to approximate the boundaries of real instances, thereby achieving accurate tourist number statistics.

Benefits of technology

It improves the accuracy and robustness of tourist number statistics, enabling automated statistics in scenic spots where tickets and ticket checks are not required, and improves segmentation accuracy by 1.6%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119992454B_ABST
    Figure CN119992454B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for tourist number counting based on multi-scale feature fusion deep snake. Based on tourist images captured by a camera, the CenterNet object detection network is used to detect human figures in the images, obtaining coarse segmentation results. The proposed multi-scale feature fusion deep snake segmentation algorithm is then used to calculate the offset of contour vertex coordinates pointing to the boundary of the real instance. Based on this offset, the contour is adjusted to approximate the contour boundary of the real human figure, thus obtaining the human figure contour in the tourist image. The multi-scale feature fusion deep snake module of this invention effectively overcomes the shortcomings of the original deep snake module by expanding the receptive field and enhancing shallow features, improving the accuracy and robustness of instance segmentation, thereby achieving accurate tourist number counting. This allows for automatic tourist number counting even in scenic areas where ticket purchases and checks are not required.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention mainly relates to the fields of multi-scale feature fusion deep snake, image segmentation and automatic tourist number statistics, specifically to a tourist number statistics method and system based on multi-scale feature fusion deep snake. Technical Background

[0002] Tourist statistics are of great significance for understanding tourism market dynamics, formulating tourism policies, and optimizing the allocation of tourism resources, and play an important role in realizing intelligent tourism management.

[0003] Traditional tourism statistics methods often rely on ticket purchase / counting statistics, manual surveys, and data aggregation, which are time-consuming, labor-intensive, and prone to errors. This is especially true for scenic spots that do not require tickets, where tourist number statistics are even more time-consuming, labor-intensive, and difficult to implement. With the development of artificial intelligence (AI) technology, the integration of AI and tourism is currently a research hotspot. Computer vision has become a highly regarded technology in the field of AI, capable of converting digital images or videos into forms that computers can recognize, thereby helping machines complete automated tasks such as image recognition, classification, detection, tracking, and segmentation. Based on images of pedestrian flow captured by cameras in scenic spots, pedestrians can be segmented and detected in the images, thus achieving automatic tourist number statistics and improving the accuracy and efficiency of tourist number counting. The Deep Snake algorithm is a deep learning algorithm used for image segmentation and contour detection, capable of achieving efficient segmentation and detection while preserving the fine structure of contours. However, individuals in a crowd may exhibit different sizes and shapes due to factors such as distance and viewing angle, thus requiring the use of multi-scale feature extraction techniques to capture these variations. Through multi-scale feature extraction, the algorithm can capture human facial features at different scales. The proposed multi-scale feature fusion Deep Snake module effectively overcomes the shortcomings of the original Deep Snake module by expanding the receptive field and enhancing shallow features, thereby improving the accuracy and robustness of instance segmentation. This enables accurate tourist number counting, allowing for automatic tourist number statistics even in scenic areas where ticket purchases and checks are not required. Summary of the Invention

[0004] To address the aforementioned modeling deficiencies, this invention discloses a method and system for tourist number statistics based on deep snake multi-scale feature fusion.

[0005] To achieve the above objectives, the technical solution of the present invention is as follows:

[0006] A method for counting tourist numbers based on deep snake-like multi-scale feature fusion includes the following steps:

[0007] Step 1: Train to obtain the first trained multi-scale feature fusion Deep Snake module and the second trained multi-scale feature fusion Deep Snake module;

[0008] Step 2: Obtain tourist images containing multiple people, and then use the CenterNet object detection network to detect human figures in the tourist images to obtain head rectangle detection boxes. Extract the midpoints of the four sides of the head rectangle detection boxes and connect them to form a rhombus outline.

[0009] Step 3: Uniformly sample S points on the rhombus contour. Use the Deep Snake module with multi-scale feature fusion trained in the first training to calculate the coordinate offset required for the four vertices to obtain the local extreme points of the head in the image, resulting in four extreme points. Use these four extreme points as the origin of the coordinate axis. Draw a line segment with the uppermost extreme point as its center along the x-axis, with a length equal to 1 / 3 of the horizontal side length of the rectangular detection box. Draw a line segment with the lowermost extreme point as its center along the x-axis, with a length equal to 1 / 3 of the horizontal side length of the rectangular detection box. Draw a line segment with the leftmost extreme point as its center along the y-axis, with a length equal to 1 / 3 of the vertical side length of the rectangular detection box. Draw a line segment with the rightmost extreme point as its center along the y-axis, with a length equal to 1 / 3 of the vertical side length of the rectangular detection box. Connect the endpoints of the four line segments to form an octagon, which serves as the initial contour.

[0010] Step 4: Uniformly sample m points on the initial contour to form an instance contour. Input the contour formed by these m points into the second-trained multi-scale feature fusion Deep Snake module to predict the offset that needs to be adjusted. Adjust the instance contour by the offset of the contour vertex coordinates to approximate the boundary of the real instance contour, and obtain the head portrait contour in the tourist image. Then, use the number of head portrait contours in the tourist image as the number of tourists in the tourist image.

[0011] Further improvements were made, with S = 40 and m = 128.

[0012] Further improvements include a multi-scale feature fusion Deep Snake module comprising a backbone network, a multi-scale feature fusion network, and a prediction network; the output of the backbone network serves as the input to the multi-scale feature fusion network, and the output of the multi-scale feature fusion network serves as the input to the prediction network; the prediction network outputs the head contours in the tourist image; the backbone network employs eight layers of dilated recurrent convolutions with kernels of different scales to expand the receptive field and correct for large prediction errors, and the eight recurrent convolutional layers are connected using a skip connection method.

[0013] Further improvements include the following method for processing the 8-layer recurrent convolutional data in the backbone network:

[0014] 1.1) The first and second layers are circular convolutional kernels with a length of 1. The output of the first layer's circular convolution is:

[0015] f1=ReLU(Bn(circonv(x,n=1)))

[0016] Where ReLU represents the ReLU activation function, Bn represents the batch normalization operation, circonv represents the circular convolution operation function, n represents the convolution kernel length, and x = [x1, x2, x3, ..., xn]. 40 To uniformly sample 40 points on the rhombus contour, f1 is the output of the first layer of the circular convolution; n is the length of the circular convolution.

[0017] 1.2) The output f2 of the second circular convolution layer is:

[0018] f2=f1+ReLU(Bn(circonv(f1,n=1)))

[0019] 1.3) Layers 3 and 4 use circular convolution kernels with a length of 3. The output f3 of the circular convolution layer 3 is:

[0020] f3=f2+ReLU(Bn(circonv(f2,n=3)))

[0021] 1.4) The output f4 of the fourth layer of the circular convolution combines the outputs of the second and third layers. The calculation formula is as follows:

[0022] f4=f2+f3+ReLU(Bn(circonv(f3,n=3)))

[0023] 1.5): Layers 5 and 6 use circular convolution kernels with a length of 4. The output of the circular convolution in layer 5 combines the outputs of layers 2, 3, and 4. The calculation formula is as follows:

[0024] f5=f2+f3+f4+ReLU(Bn(circonv(f4,n=4)))

[0025] 1.6) The output of the 6th layer circular convolution combines the outputs of the 2nd, 3rd, 4th, and 5th layers. The calculation formula is as follows:

[0026] f6=f2+f3+f4+f5+ReLU(Bn(circonv(f5,n=4)))

[0027] 1.7) Layers 7 and 8 use circular convolution kernels of length 6. The output f7 of the circular convolution in layer 7 combines the outputs of layers 2, 3, 4, 5, and 6. The calculation formula is as follows:

[0028] f7=f2+f3+f4+f5+f6+ReLU(Bn(circonv(f6,n=6)))

[0029] 1.8) The output f8 of the 8th layer circular convolution combines the outputs of the 2nd, 3rd, 4th, 5th, 6th, and 7th layers. The calculation formula is as follows:

[0030] f8=f2+f3+f4+f5+f6+f7+ReLU(Bn(circonv(f7,n=6)))

[0031] 1.9): The multi-scale feature fusion network concatenates all features from layers 2 to 8 of the backbone network, and the calculation formula is as follows:

[0032] f Concat =concat(f2,f3,f4,f5,f6,f7,f8)

[0033] Where concat is the concatenation operation; f Concat These are the features after splicing.

[0034] Further improvements include the following data processing method for the multi-scale feature fusion network:

[0035] The concatenated features are processed through a 1x1 convolutional layer and a max pooling layer, and then concatenated with the original concatenated features. The calculation formula is as follows:

[0036] f fusion =f Concat +maxpool(conv1d(f Concat ))

[0037] Where maxpool is the max pooling operation, conv1d is a 1*1 convolution operation, and f fusion This is the output of the feature fusion network.

[0038] In a further improvement, the prediction network uses three 1*1 convolutional layers to obtain the coordinate offset, calculated using the following formula:

[0039] f p1 =ReLU(conv1d(f fusion ))

[0040] f p2 =ReLU(conv1d(f p1 ))

[0041] f p3 =conv1d(f p2 )

[0042] Among them, f p1To predict the output of the first convolutional layer in the network; f p2 To predict the output of the second convolutional layer in the network; f p3 To predict the output of the third convolutional layer in the network, which is the output of the Deep Snake module for multi-scale feature fusion.

[0043] A further improvement is that the first-trained multi-scale feature fusion Deep Snake module uses a loss function based on smooth L1 loss during training. df1

[0044]

[0045] Where N represents the number of vertices of the sampled instance boundary contour. These are the coordinates of the S points uniformly sampled on the rhombus contour in step two. Then represents the vertex coordinates of the label contour; smooth l1 represents the smooth l1 loss, where the calculation formula is:

[0046]

[0047] In a further improvement, the second-trained multi-scale feature fusion Deep Snake module adopts the following function as its loss function:

[0048]

[0049] in, These are the coordinates of m points uniformly sampled on the initial contour in step three.

[0050] S32, the contour vertex coordinate offset obtained in step S31 is used as the final segmentation result output to obtain the human portrait segmentation result.

[0051] The advantages of this invention are as follows:

[0052] The multi-scale feature fusion Deep Snake module of this invention effectively overcomes the shortcomings of the original Deep Snake module by expanding the receptive field and enhancing shallow features, thereby improving the accuracy and robustness of instance segmentation and enabling accurate tourist number statistics. It can also achieve automatic tourist number statistics in scenic spots where there is no need to purchase or check tickets. Attached Figure Description

[0053] Figure 1 A flowchart for tourist number statistics;

[0054] Figure 2 Human portrait segmentation and detection process;

[0055] Figure 3This is the Deep Snake module for multi-scale feature fusion. Detailed Implementation

[0056] To facilitate understanding of the present invention, the apparatus of the present invention will now be described more fully with reference to the accompanying drawings. Embodiments of the apparatus are shown in the drawings. However, the apparatus can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to make the disclosure of the present invention more thorough and complete.

[0057] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "principle," "method," and "theorem" should be interpreted broadly. For example, they may refer to the equivalence principle, the superposition method, or Hooke's theorem, etc. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0058] The present invention relates to a method and system for tourist visitor counting based on multi-scale feature fusion deep snake, which mainly includes images of visitor flow captured by a camera (such as...). Figure 1 In S11), an algorithm based on multi-scale feature fusion and deep snake is used for human image segmentation (e.g., S11). Figure 1 In S12), based on the segmentation results, the number of people marked (e.g., ... Figure 1 S13 in the image) segmentation of newly appearing human figures (e.g. Figure 1 (S14 in the text) and add the number of marked people, and display the total number of people in real time (e.g. Figure 1 (S15 in the text). The system hardware includes cameras, transmission cables, and a computer equipped with a segmentation algorithm. The people counting results are displayed in real time through a human-computer interaction interface.

[0059] The specific implementation includes the following steps:

[0060] (i) Take images of tourists by cameras installed at the exit of the scenic area, use the CenterNet object detection network to detect human figures in the images, and extract the midpoints of the four sides of the detection box to form a rhombus outline.

[0061] (ii) 40 points are uniformly sampled on the rhombus contour, and the Deep Snake module with multi-scale feature fusion is used to find local extreme points. Then, the four extreme points with the smallest extreme values ​​are extended and connected in the horizontal and vertical directions to form an octagon as the initial contour;

[0062] (iii) 128 points are uniformly sampled on the octagonal contour to ensure that it can retain the shape of most instances. Taking the octagonal contour formed by the sampled points as the starting point, the Deep Snake module of multi-scale feature fusion is used to predict the coordinate offset of the contour vertices pointing to the boundary of the real instance, and the contour is adjusted accordingly to approximate the boundary of the real instance contour to obtain the human portrait contour in the tourist image. The number of human portrait segments in the image is counted to obtain the number of tourists.

[0063] The steps for facial recognition using the deep snake algorithm with multi-scale feature fusion are as follows: Figure 2 As shown:

[0064] S21: Based on images of tourists captured by a camera, the images are transmitted in real time to a people counting system on a computer via cable;

[0065] S22: The CenterNet object detection network is used to detect human figures in the image, and the midpoints of the four sides of the detection box are extracted to form a diamond outline.

[0066] S23: 40 points are uniformly sampled on the rhombus contour, and the Deep Snake module (multi-scale feature fusion) is used to find local extrema. The Deep Snake module (multi-scale feature fusion) is as follows: Figure 3 As shown, it includes a backbone network, a multi-scale feature fusion network, and a prediction network. The backbone network uses eight layers of dilated recurrent convolutions with kernels of different scales to expand the receptive field and correct for large prediction errors. The eight recurrent convolutional layers are connected using skip connections, preserving the transmission of shallow feature information to deeper networks. This allows the deformation module to better handle the segmentation of small-scale instances, improving the overall segmentation performance. Figure 3 In the backbone network with 8 layers of recurrent convolutions, the first and second layers are convolutional kernels with a length of 1. The output of the first layer's recurrent convolution is...

[0067] f1=ReLU(Bn(circonv(x,n=1)))

[0068] Where ReLU represents the ReLU activation function, Bn represents the batch normalization operation, circonv represents the circular convolution operation function, n represents the convolution kernel length, and x = [x1, x2, x3, ..., xn]. 40 f1 is the output of the first layer of the circular convolution, where 40 points are sampled uniformly on the diamond-shaped contour.

[0069] The output of the second layer of circular convolution is

[0070] f2=f1+ReLU(Bn(circonv(f1,n=1)))

[0071] S24: Layers 3 and 4 use circular convolution kernels with a length of 3. The output of the circular convolution in layer 3 is...

[0072] f3=f2+ReLU(Bn(circonv(f2,n=3)))

[0073] The output of the fourth layer of the circular convolution combines the outputs of the second and third layers. The calculation formula is as follows:

[0074] f4=f2+f3+ReLU(Bn(circonv(f3,n=3)))

[0075] S25: Layers 5 and 6 use circular convolution kernels with a length of 4. The output of the circular convolution in layer 5 combines the outputs of layers 2, 3, and 4. The calculation formula is as follows:

[0076] f5=f2+f3+f4+ReLU(Bn(circonv(f4,n=4)))

[0077] The output of the 6th layer of the circular convolution combines the outputs of the 2nd, 3rd, 4th, and 5th layers. The calculation formula is as follows:

[0078] f6=f2+f3+f4+f5+ReLU(Bn(circonv(f5,n=4)))

[0079] S26: Layers 7 and 8 use circular convolution kernels of length 6. The output of the circular convolution in layer 7 combines the outputs of layers 2, 3, 4, 5, and 6. The calculation formula is as follows:

[0080] f7=f2+f3+f4+f5+f6+ReLU(Bn(circonv(f6,n=6)))

[0081] The output of the 8th layer circular convolution combines the outputs of the 2nd, 3rd, 4th, 5th, 6th, and 7th layers. The calculation formula is as follows:

[0082] f8=f2+f3+f4+f5+f6+f7+ReLU(Bn(circonv(f7,n=6)))

[0083] S27: The multi-scale feature fusion network concatenates all features from layers 2 to 8 of the backbone network. The calculation formula is as follows:

[0084] f Concat =concat(f2,f3,f4,f5,f6,f7,f8)

[0085] Here, concat is the concatenation operation.

[0086] After feature concatenation, the data is passed through a 1x1 convolutional layer and a max-pooling layer, and then concatenated again with the concatenated features. The calculation formula is as follows:

[0087] f fusion =f Concat +maxpool(conv1d(f Concat ))

[0088] Where maxpool is the max pooling operation, conv1d is a 1*1 convolution operation, and f fusion This is the output of the feature fusion network.

[0089] S28: The prediction network uses three 1x1 convolutional layers to obtain the coordinate offset, calculated using the following formula:

[0090] f p1 =ReLU(conv1d(f fusion ))

[0091] f p2 =ReLU(conv1d(f p1 ))

[0092] f p3 =conv1d(f p2 )

[0093] Among them, f p1 To predict the output of the first convolutional layer in the network; f p2 To predict the output of the second convolutional layer in the network; f p3 To predict the output of the third convolutional layer in the network, which is the output of the Deep Snake module for multi-scale feature fusion.

[0094] During the iterative training of the Deep Snake module for multi-scale feature fusion, the loss function adopted was a loss function L based on smooth L1 loss. df1

[0095]

[0096] Where N represents the number of vertices of the sampled instance boundary contour. These are the coordinates of the contour vertices after the first segmentation. Then represents the vertex coordinates of the label outline. `smooth l1` represents the smooth l1 loss, where the calculation formula is...

[0097]

[0098] S29: Extend and connect the four extreme points with the smallest extreme values ​​in the horizontal and vertical directions to form an octagon as the initial outline;

[0099] S30: Sample 128 points uniformly on the octagonal profile to ensure that it can preserve the shape of most instances.

[0100] S31: Using the octagonal contour formed by these sampling points as the starting point, the Deep Snake module, with its multi-scale feature fusion, predicts the offset of the contour vertices pointing to the boundary of the real instance, and adjusts the contour accordingly to approximate the boundary of the real instance contour. The following loss function was used during the training of the Deep Snake module:

[0101]

[0102] in, These are the coordinates of m points uniformly sampled on the initial contour in step three.

[0103] S32, the contour vertex coordinate offset obtained in step S31 is used as the final segmentation result output to obtain the human portrait segmentation result.

[0104] A comparative experiment was conducted between the Deep Snake segmentation method based on multi-scale feature fusion and the traditional Deep Snake segmentation method. The overlap ratio (AP) of the predicted bounding box and the ground truth bounding box was calculated using IoU. vol The value is the average of the average precision values ​​after dividing the IoU threshold into nine equal parts from 0.1 to 0.9. 50 This refers to the average accuracy when the IoU threshold is set to 0.5, AP 70 This refers to the average accuracy when the IoU threshold is set to 0.7. (AP is used.) vol Value, AP 50 and AP 70 The comparison of these three metrics is shown in Table 1. After expanding the receptive field and enhancing shallow features, the segmentation method based on multi-scale feature fusion Deep Snake improved the accuracy by 1.6%.

[0105] Table 1. Comparison of segmentation accuracy between the multi-scale feature fusion deep snake segmentation method and the traditional deep snake segmentation method.

[0106]

[0107] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Any simple modifications, equivalent changes, and alterations made to the above embodiments without departing from the technical essence of the present invention shall still fall within the scope of the present invention.

Claims

1. A method for counting tourist numbers based on deep snake technology with multi-scale feature fusion, characterized in that, Includes the following steps: Step 1: Train to obtain the first trained multi-scale feature fusion Deep Snake module and the second trained multi-scale feature fusion Deep Snake module; Step 2: Obtain tourist images containing multiple people, and then use the CenterNet object detection network to detect human figures in the tourist images to obtain head rectangle detection boxes. Extract the midpoints of the four sides of the head rectangle detection boxes and connect them to form a rhombus outline. Step 3: Uniformly sample S points on the rhombus contour. Use the DeepSnake module, which was trained in the first training, to calculate the coordinate offsets required for the four vertices to obtain the local extreme points of the head in the image. Four extreme points are obtained. Using these four extreme points as the origin of the coordinate axes, draw a line segment centered on the top extreme point along the x-axis, with a length equal to 1 / 3 of the horizontal side length of the rectangular detection box. Similarly, draw a line segment centered on the bottom extreme point along the x-axis, with a length equal to 1 / 3 of the horizontal side length of the rectangular detection box. Draw a line segment centered on the left extreme point along the y-axis, with a length equal to 1 / 3 of the vertical side length of the rectangular detection box. Draw a line segment centered on the right extreme point along the y-axis, with a length equal to 1 / 3 of the vertical side length of the rectangular detection box. Connect the endpoints of the four line segments to form an octagon, which serves as the initial contour. Step 4: Uniformly sample m points on the initial contour to form an instance contour. Input the contour formed by these m points into the second-trained multi-scale feature fusion Deep Snake module to predict the offset that needs to be adjusted. Adjust the instance contour by the offset of the contour vertex coordinates to approximate the boundary of the real instance contour and obtain the head portrait contour in the tourist image. Then, use the number of head portrait contours in the tourist image as the number of tourists in the tourist image. The first trained multi-scale feature fusion Deep Snake module uses a loss function based on smooth L1 loss during training. df1 Where N represents the number of vertices of the sampled instance boundary contour. These are the coordinates of the S points uniformly sampled on the rhombus contour in step two. Then represents the vertex coordinates of the label outline; smooth l1 represents the smooth l1 loss, where the calculation formula is: The Deep Snake module with multi-scale feature fusion trained in the second round uses the following function as its loss function: in, These are the coordinates of m points uniformly sampled on the initial contour in step three.

2. The tourist number statistics method based on multi-scale feature fusion deep snake as described in claim 1, characterized in that, S = 40, m = 128.

3. The tourist number statistics method based on multi-scale feature fusion deep snake as described in claim 2, characterized in that, The Deep Snake module for multi-scale feature fusion includes a backbone network, a multi-scale feature fusion network, and a prediction network. The output of the backbone network is the input of the multi-scale feature fusion network, and the output of the multi-scale feature fusion network is the input of the prediction network. The prediction network outputs the head contours in the tourist image. The backbone network uses eight layers of dilated recurrent convolutions with kernels of different scales to expand the receptive field and correct large prediction errors. The eight recurrent convolutional layers are connected using a skip connection method.

4. The tourist number statistics method based on multi-scale feature fusion deep snake as described in claim 3, characterized in that, The data processing method for the 8-layer recurrent convolution of the backbone network is as follows: 1.1) The first and second layers are circular convolutional kernels with a length of 1. The output of the first layer's circular convolution is: f1=ReLU(Bn(circonv(x,n=1))) Where ReLU represents the ReLU activation function, Bn represents the batch normalization operation, circonv represents the circular convolution operation function, n represents the convolution kernel length, and x = [x1, x2, x3, ..., xn]. 40 To uniformly sample 40 points on the rhombus contour, f1 is the output of the first layer of the circular convolution; n is the length of the circular convolution. 1.2) The output f2 of the second circular convolution layer is: f2=f1+ReLU(Bn(circonv(f1,n=1))) 1.3) Layers 3 and 4 use circular convolution kernels with a length of 3. The output f3 of the circular convolution layer 3 is: f3=f2+ReLU(Bn(circonv(f2,n=3))) 1.4) The output f4 of the fourth layer of the circular convolution combines the outputs of the second and third layers. The calculation formula is as follows: f4=f2+f3+ReLU(Bn(circonv(f3,n=3))) 1.5): Layers 5 and 6 use circular convolution kernels with a length of 4. The output of the circular convolution in layer 5 combines the outputs of layers 2, 3, and 4. The calculation formula is as follows: f5=f2+f3+f4+ReLU(Bn(circonv(f4,n=4))) 1.6) The output of the 6th layer circular convolution combines the outputs of the 2nd, 3rd, 4th, and 5th layers. The calculation formula is as follows: f6=f2+f3+f4+f5+ReLU(Bn(circonv(f5,n=4))) 1.7) Layers 7 and 8 use circular convolution kernels of length 6. The output f7 of the circular convolution in layer 7 combines the outputs of layers 2, 3, 4, 5, and 6. The calculation formula is as follows: f7=f2+f3+f4+f5+f6+ReLU(Bn(circonv(f6,n=6))) 1.8) The output f8 of the 8th layer circular convolution combines the outputs of the 2nd, 3rd, 4th, 5th, 6th, and 7th layers. The calculation formula is as follows: f8=f2+f3+f4+f5+f6+f7+ReLU(Bn(circonv(f7,n=6))) 1.9): The multi-scale feature fusion network concatenates all features from layers 2 to 8 of the backbone network, and the calculation formula is as follows: f Concat =concat(f2,f3,f4,f5,f6,f7,f8) Where concat is the concatenation operation; f Concat These are the features after splicing.

5. The tourist number statistics method based on multi-scale feature fusion deep snake as described in claim 4, characterized in that, The data processing method for the multi-scale feature fusion network is as follows: The concatenated features are processed through a 1x1 convolutional layer and a max pooling layer, and then concatenated with the original concatenated features. The calculation formula is as follows: f fusion =f Concat +maxpool(conv1d(f Concat )) Where maxpool is the max pooling operation, conv1d is a 1*1 convolution operation, and f fusion This is the output of the feature fusion network.

6. The tourist number statistics method based on multi-scale feature fusion deep snake as described in claim 5, characterized in that, The prediction network uses three 1*1 convolutional layers to obtain the coordinate offset, calculated using the following formula: f p1 =ReLU(conv1d(f fusion )) f p2 =ReLU(conv1d(f p1 )) f p3 =conv1d(f p2 ) Among them, f p1 To predict the output of the first convolutional layer in the network; f p2 To predict the output of the second convolutional layer in the network; f p3 To predict the output of the third convolutional layer in the network, which is the output of the Deep Snake module for multi-scale feature fusion.

Citation Information

Patent Citations

  • Depth instance segmentation method based on contour intersection-to-union ratio loss

    CN117253041A