Feature extraction method and device, electronic equipment, medium and computer program product
By dynamically adjusting the kernel size in a convolutional neural network to adapt to local complexity, the problem of balancing efficiency and specificity in feature extraction in simple static and complex dynamic regions is solved, thereby improving the perception and decision-making accuracy of autonomous driving systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG GEELY HLDG GRP CO LTD
- Filing Date
- 2026-03-27
- Publication Date
- 2026-04-28
AI Technical Summary
Existing convolutional neural networks struggle to balance the relevance and efficiency of feature extraction in both simple static and complex dynamic regions, leading to increased perception accuracy and decision-making risks for autonomous driving systems in complex dynamic scenarios.
By determining the local complexity value for each input channel and each coordinate of the feature tensor of the convolutional layer, the size of the convolutional kernel is dynamically adjusted to adapt to the feature extraction requirements of different regions. The convolutional regions are determined and convolution calculations are performed to generate the output feature tensor.
It improves the targeting and efficiency of feature extraction, reduces the probability of irrelevant responses, reduces computational load, enhances information coverage of complex dynamic regions, and improves the perception and control accuracy of autonomous driving systems.
Smart Images

Figure CN121937831A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer vision, and more particularly to a feature extraction method, apparatus, electronic device, medium, and computer program product. Background Technology
[0002] In recent years, deep neural networks have developed rapidly in the field of artificial intelligence. Among them, convolutional neural networks (CNNs), through hierarchical feature extraction, have demonstrated outstanding performance in tasks such as image classification, object detection, and semantic segmentation, and have become a commonly used basic model for vision-related applications. In scenarios such as autonomous driving, CNNs are used for environmental perception and feature processing. Their structural parameters, such as kernel size, number of layers, and number of channels, affect the feature extraction effect and task adaptability, thus impacting the overall model performance.
[0003] In related technologies, convolutional neural networks typically determine the kernel size during network design. Then, during convolution operations, local regions of corresponding sizes are selected at various spatial locations of the input feature map according to this kernel size and weighted summed to extract features. One common approach is to use the same kernel size uniformly in one or more convolutional layers, such as using 3×3 or 5×5 throughout. Another common approach is to use different kernel sizes in different convolutional layers, such as using 3×3 for shallow convolutional layers and 7×7 for deep convolutional layers to extract features at different scales.
[0004] In the convolution operation described above, the kernel size determines the range of the local region involved in the computation at each spatial location in the input feature map. For simple, static regions where signal changes are relatively gradual, a larger local region makes it easier to include small perturbations in the computation, leading to irrelevant responses and increased computational load. For complex, dynamic regions with dense elements and drastic changes, a smaller local region provides insufficient coverage information, making it difficult to incorporate broader correlation information into the same computation. Therefore, when the same input feature map contains both simple, static regions and complex, dynamic regions, it is difficult to balance the specificity and efficiency of feature extraction techniques. Summary of the Invention
[0005] This application provides a feature extraction method, apparatus, electronic device, medium, and computer program product to address some or all of the shortcomings in related technologies.
[0006] According to a first aspect of the embodiments of this application, a feature extraction method is provided, comprising: The vehicle's visual data is vectorized to obtain a multi-channel initial feature tensor; The initial feature tensor is preprocessed to obtain the processed feature tensor; Determine the local region where each coordinate within the coordinate range of the initial feature tensor of the multiple input channels of the convolutional layer is located, based on the processed feature tensor received by each input channel. The local complexity value of the coordinates is determined based on the feature values contained in the local region. Based on the local complexity value, determine the size of the convolution kernel corresponding to the coordinates; Based on the size, determine the convolutional region where the coordinates are located in the processed feature tensor; The convolution kernel is used to convolve the convolutional region to obtain the convolution result at the coordinates. The output feature tensor is obtained based on the convolution results corresponding to the multiple input channels.
[0007] Optionally, obtaining the output feature tensor based on the convolution results corresponding to the plurality of input channels includes: Based on the convolution result of the processed feature tensors received by the multiple input channels at the same coordinates, the feature values of the feature tensors output by each output channel of the multiple output channels of the convolutional layer at the corresponding coordinates are determined. The output feature tensor is obtained based on the feature tensors output from the multiple output channels.
[0008] Optionally, determining the feature value of the feature tensor output by each output channel of the convolutional layer at the corresponding coordinates based on the convolution result of the processed feature tensors received by the multiple input channels at the same coordinates includes: The convolution results of the processed feature tensors received from the multiple input channels at the same coordinates are weighted and summed to obtain the summation result; Based on the summation result and the bias parameter value of the convolutional layer, the feature value of the feature tensor output by each of the multiple output channels at the corresponding coordinates is determined.
[0009] Optionally, the coordinates are located at the lower right corner of the local region.
[0010] Optionally, determining the local complexity value of the coordinates based on the feature values contained in the local region includes: Determine the mean value of the feature values contained in the local region; Based on the mean and the feature values contained in the local region, the variance of the feature values contained in the local region is determined as the local complexity value.
[0011] Optionally, the size of the convolutional region is the same as the size of the convolutional kernel; wherein the coordinates are located at the lower right corner of the convolutional region.
[0012] Optionally, determining the size of the convolution kernel corresponding to the coordinates based on the local complexity value includes: If the local complexity value is not less than a preset complexity threshold, the convolution kernel is determined to be a convolution kernel of the first size; If the local complexity value is less than the complexity threshold, the convolution kernel is determined to be a convolution kernel of the second size; the second size is smaller than the first size.
[0013] Optionally, determining that the convolution kernel is a convolution kernel of the second size includes: The region of the second size located in the upper left corner is determined in the convolution kernel of the first size; The weight values contained in the region of the second size are retained, and the weight values of other regions in the convolution kernel of the first size are changed to 0.
[0014] Optionally, the preprocessing of the initial feature tensor includes: The initial feature tensor is preprocessed based on the mean and standard deviation of the eigenvalues contained in the initial feature tensor, as well as the eigenvalues contained in the initial feature tensor.
[0015] Optionally, the preprocessing of the initial feature tensor includes: Based on the mean and standard deviation of the eigenvalues contained in the initial feature tensor, and the eigenvalues contained in the initial feature tensor, the eigenvalues of the initial feature tensor at each coordinate are modified to obtain the modified feature tensor; The modified feature tensor is processed to obtain the processed feature tensor.
[0016] Optionally, processing the modified feature tensor to obtain the processed feature tensor includes: The modified feature tensor is expanded with eigenvalues to obtain the processed feature tensor.
[0017] Optionally, expanding the eigenvalues of the modified feature tensor includes: The modified feature tensor is expanded according to the first size.
[0018] Optionally, expanding the modified feature tensor includes: The padding quantity is obtained by subtracting one from the number of weight values in each row of the first-size convolutional kernel, taking half of the result, and rounding it down. When the feature tensor received by each input channel is one-dimensional, the modified feature tensor is expanded to the left along the sequence direction by the number of filler feature values; or, when the feature tensor received by each input channel is two-dimensional, the modified feature tensor is expanded to the left along the spatial width direction by the number of filler column feature values, and expanded upward along the spatial height direction by the number of filler row feature values; or, when the feature tensor received by each input channel is three-dimensional, based on the number of weight values in each row of the first-size convolutional kernel, the modified feature tensor is expanded to the left along the spatial width direction by the number of filler column feature values, expanded upward along the spatial height direction by the number of filler row feature values, and expanded forward along the spatial depth direction by the number of filler layer feature values.
[0019] According to a second aspect of the embodiments of this application, a feature extraction apparatus is provided, comprising: The vectorization module is used to vectorize the vehicle's visual data to obtain multi-channel initial feature tensors. The preprocessing module is used to preprocess the initial feature tensor to obtain the processed feature tensor; The local region determination module is used to determine the local region where each coordinate of the processed feature tensor received by each input channel of the multiple input channels of the convolutional layer is located within the coordinate range of the initial feature tensor. The local complexity value determination module is used to determine the local complexity value of the coordinates based on the feature values contained in the local region. A kernel size determination module is used to determine the size of the kernel corresponding to the coordinates based on the local complexity value. A convolutional region determination module is used to determine the convolutional region where the coordinates are located in the processed feature tensor based on the size; A convolution module is used to perform convolution on the convolutional region using the convolution kernel to obtain the convolution result at the coordinates; The output feature tensor determination module is used to obtain the output feature tensor based on the convolution results corresponding to the multiple input channels.
[0020] According to a third aspect of the embodiments of this application, an electronic device is provided, including one or more processors, for the aforementioned feature extraction method.
[0021] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a program is stored, which, when executed by a processor, implements the aforementioned feature extraction method.
[0022] According to a fifth aspect of the embodiments of this application, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the aforementioned feature extraction method.
[0023] The technical solutions provided by the embodiments of this application may include the following beneficial effects: As can be seen from the above embodiments, the feature extraction method of this application, for each input channel of the convolutional layer and each coordinate of the feature tensor, first determines the local region where the coordinate is located, and then determines the local complexity value of the coordinate based on all feature values contained in the local region; subsequently, based on the local complexity value, the corresponding convolution kernel size is determined for the coordinate. Since the convolution kernel size is determined separately at each coordinate, the convolutional region determined in the feature tensor also differs with the convolution kernel size corresponding to the coordinate. The convolution kernel is then used to convolve the corresponding convolutional region to obtain the convolution result at that coordinate, and finally, the output feature tensor is obtained based on all convolution results.
[0024] By determining the kernel size and convolutional region separately according to the coordinates, when the local complexity of some coordinates is small, the convolutional region is relatively smaller, and the number of feature values participating in the convolution calculation is relatively fewer. This reduces the probability that irrelevant feature values will be included in the calculation and produce irrelevant responses, thus reducing the amount of computation. When the local complexity of some coordinates is large, the convolutional region is relatively larger, and more feature values participate in the convolution calculation, thereby improving the coverage of surrounding information at that coordinate.
[0025] Therefore, when there are regions with significant differences in local complexity within the same feature tensor, the feature extraction range of the output feature tensor at different coordinates can vary with the difference in local complexity values, thereby improving the problem of difficulty in balancing the specificity and efficiency of feature extraction in different regions in related technologies.
[0026] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0028] Figure 1 This is a flowchart illustrating a feature extraction method according to an embodiment of this application; Figure 2 yes Figure 1The flowchart of step S108 of the feature extraction method shown is as follows; Figure 3 yes Figure 1 The flowchart of step S104 of the feature extraction method shown is as follows; Figure 4 yes Figure 1 The flowchart of step S105 of the feature extraction method shown is illustrated. Figure 5 This is a schematic diagram of a feature extraction device according to an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0029] The technical solutions in the embodiments of this application will be clearly and completely described herein with reference to the accompanying drawings. In the following description, when referring to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements.
[0030] If the embodiments of this application contain terms relating to directional indications or positional relationships, such as up, down, left, right, front, back, length, and width, these terms are only used to explain the relative positional relationships and movement of the components in a specific posture. If the specific posture changes, the directional indications or positional relationships will also change accordingly. In addition, the terms "first" and "second" used in the embodiments of this application are only used for descriptive convenience and should not be construed as indicating or implying relative importance.
[0031] In related technologies, convolutional neural networks typically determine the kernel size during network design, and then select local regions of corresponding size at each spatial location of the input feature map according to the kernel size during convolution operations and perform weighted summation to extract features.
[0032] A common approach is to use the same kernel size for one or more convolutional layers, such as 3×3 or 5×5 throughout. This approach is a single-layer fixed kernel size scheme, which has the advantages of simple structure and ease of implementation. However, with a fixed kernel size, it is impossible to dynamically adjust the feature extraction granularity based on the local complexity differences of the input feature map. In autonomous driving scenarios, static areas with stable signals, such as highways with few vehicles, are prone to feature extraction redundancy and increased computational overhead. Dynamic and complex areas, such as intersections with multiple targets interacting, are prone to insufficient feature extraction and loss of key details, making it difficult to balance efficiency and accuracy.
[0033] A common approach is to use different kernel sizes in different convolutional layers, such as 3×3 for shallow convolutional layers and 7×7 for deep convolutional layers, to extract features at different scales. This approach belongs to a multi-layer, multi-kernel size scheme, which achieves multi-scale feature extraction by statically configuring different kernel sizes in different convolutional layers. Shallow layers focus on image detail features such as edges and textures, while deep layers focus on global semantic features such as the overall shape of the target and the global interaction relationship of the scene. However, the kernel size only varies between convolutional layers. Within the same convolutional layer, it is still not possible to adaptively adjust according to the differences in the complexity of local regions at different spatial locations. Therefore, in autonomous driving scenarios, when the same image region contains both static regions with stable signals and dynamic complex regions, the feature extraction targeting and computational efficiency are still insufficient.
[0034] In the convolution operation described above, the kernel size determines the range of the local region involved in the calculation at each spatial location in the input feature map. For simple, static regions where signal changes are relatively smooth, a larger local region makes it easier to include small perturbations in the calculation, leading to irrelevant responses and increased computational load. For example, in autonomous driving scenarios, the road surface of an empty road and background areas lacking dynamic elements are typically static regions with stable signals. When using a fixed kernel size for feature extraction, especially when the kernel size is large, the local region will excessively cover the smooth signal, making it easier for minor disturbances such as road stains and changes in lighting to be included in the weighted summation and amplified into responses, thus introducing irrelevant noise. Furthermore, performing convolution operations on simple, static regions with a large kernel size results in significant redundant computation, consuming additional computing power and wasting hardware resources, making it difficult to meet the computational efficiency requirements of automotive platforms.
[0035] For complex and dynamic regions—areas with dense and rapidly changing elements—the coverage of information is insufficient when the local area is small, making it difficult to incorporate related information from a larger area into a single calculation. For example, in autonomous driving scenarios, intersections with multiple vehicles converging, dense pedestrian crossings, and temporary traffic flows in construction zones are typically considered dynamic and complex regions. When using a fixed convolutional kernel size for feature extraction, especially when the kernel size is small, the receptive field is limited, making it difficult to fully cover the spatial distribution of dynamic elements. Consequently, it becomes difficult to capture the relationships and interactions between elements, such as the avoidance intentions of adjacent vehicles and the coupling of pedestrian and non-motorized vehicle trajectories. This can easily lead to the loss of key interactive features, further affecting the accuracy of subsequent perception tasks and the effectiveness of regulatory tasks, increasing the decision-making risk of the autonomous driving system, and failing to meet the precise perception requirements of complex and dynamic scenes.
[0036] Therefore, when the same input feature map contains both simple static regions and complex dynamic regions, it is difficult to balance the specificity and efficiency of feature extraction in related technologies.
[0037] To address the deficiencies of the aforementioned related technologies, this application provides a feature extraction method, apparatus, electronic device, medium, and computer program product. The feature extraction method and apparatus of this application will be described in detail below with reference to the accompanying drawings. Unless otherwise specified, the following embodiments and features described herein can be combined with each other.
[0038] Figure 1 This application illustrates a feature extraction method according to an exemplary embodiment. For example... Figure 1 As shown, the method includes steps S101 to S108: S101. Vectorize the vehicle's visual data to obtain the initial feature tensor for multiple channels.
[0039] In autonomous driving scenarios, the initial feature tensor for multiple channels can be images acquired by cameras or fused data from multimodal sensors. The initial feature tensor for multiple channels can be a two-dimensional tensor, a three-dimensional tensor, or even a tensor with more dimensions, where one dimension represents the number of channels. When the initial feature tensor for multiple channels is a three-dimensional tensor, it can be expressed by the following formula:
[0040] in, Represents the initial feature tensor of the multi-channel array; The number of channels in the initial feature tensor of a multi-channel array; Represents the spatial height of the initial feature tensor; This represents the spatial width of the initial feature tensor.
[0041] Specifically, when the initial feature tensor of the multi-channel system is the image acquired by the camera in the autonomous driving scenario, the number of channels... It can correspond to the three channels of RGB (Red, Green, Blue) images, with spatial height. It can correspond to the vertical pixel count and spatial width of the image. It can correspond to the horizontal pixel count of the image.
[0042] When the initial feature tensor of the multi-channel array is the fused data acquired by the multimodal sensors, the number of channels... It can correspond to multiple modal channels of image and LiDAR fusion data, with spatial height It can correspond to the vertical sampling dimension and spatial width of sensor data. It can correspond to the horizontal sampling dimension of sensor data.
[0043] S102. Preprocess the initial feature tensor to obtain the processed feature tensor.
[0044] Specifically, no. The initial feature tensor of the i-th channel, after preprocessing, will be input into the i-th convolutional layer of the neural network. Each input channel has a unique input channel that does not mix with other channels.
[0045] S103. Determine the local region where each coordinate of the processed feature tensor received by each input channel of the multiple input channels of the convolutional layer is located within the coordinate range of the initial feature tensor.
[0046] Specifically, in this application, coordinates and spatial position have the same meaning, both used to represent the position index of the feature tensor in the spatial height and spatial width directions. When the initial feature tensor of a multi-channel system is a three-dimensional tensor, the spatial position is... It means that, among them, The coordinate values representing the spatial height direction. This represents the coordinate values along the width of the space. Therefore, the coordinate range of the initial feature tensor is... Step S103 only applies to coordinates that satisfy the above value range. Determine the local region where the coordinates are located to avoid exceeding the height of the initial feature tensor space. or space width The coordinates will be used to execute subsequent steps.
[0047] S104. Determine the local complexity value of the coordinates based on the feature values contained in the local region.
[0048] Based on the local regions where each coordinate is located, it can reflect the differences in the degree of feature value fluctuation in the local regions at different coordinates, and provide a basis for determining the size of the convolution kernel based on the local complexity value. This allows the size of the convolution kernel to be adjusted according to the changes in the local complexity value at different coordinates, thereby avoiding indiscriminate processing of different regions when the size of the convolution kernel is fixed, and improving the problem that it is difficult to balance the targeting and efficiency of feature extraction when simple static regions and complex dynamic regions coexist.
[0049] S105. Determine the size of the convolution kernel corresponding to the coordinates based on the local complexity value.
[0050] In this embodiment, the local complexity value calculation and kernel size switching logic are executed separately for each input channel, avoiding cross-channel signal interference and ensuring that the feature extraction of different channels is adapted to their own signal characteristics.
[0051] S106. Based on the size, determine the convolution region where the coordinates are located in the processed feature tensor.
[0052] S107. Use a convolution kernel to convolve the convolutional region to obtain the convolution result at the coordinates.
[0053] S108. Based on the convolution results corresponding to multiple input channels, obtain the output feature tensor.
[0054] The feature extraction method in this embodiment first determines the local region where each coordinate is located for each input channel of the convolutional layer and each coordinate of the feature tensor. Then, it determines the local complexity value of the coordinate based on all feature values contained in the local region. Subsequently, based on the local complexity value, it determines the corresponding convolution kernel size for the coordinate. Since the convolution kernel size is determined separately at each coordinate, the convolutional region determined in the feature tensor also differs with the convolution kernel size corresponding to the coordinate. The convolution kernel is then used to convolve the corresponding convolutional region to obtain the convolution result at that coordinate. Finally, the output feature tensor is obtained based on all convolution results.
[0055] By determining the kernel size and convolutional region separately according to the coordinates, when the local complexity of some coordinates is small, the convolutional region is relatively smaller, and the number of feature values participating in the convolution calculation is relatively fewer. This reduces the probability that irrelevant feature values will be included in the calculation and produce irrelevant responses, thus reducing the amount of computation. When the local complexity of some coordinates is large, the convolutional region is relatively larger, and more feature values participate in the convolution calculation, thereby improving the coverage of surrounding information at that coordinate.
[0056] Therefore, when there are regions with significant differences in local complexity within the same feature tensor, the feature extraction range of the output feature tensor at different coordinates can vary with the difference in local complexity values, thereby improving the problem of difficulty in balancing the specificity and efficiency of feature extraction in different regions in related technologies.
[0057] In one alternative embodiment, such as Figure 2 As shown, step S108 includes steps S1081 to S1082: S1081. Based on the convolution results of the processed feature tensors received from multiple input channels at the same coordinates, determine the feature values of the feature tensors output by each output channel of the convolutional layer at the corresponding coordinates.
[0058] S1082. Obtain the output feature tensor based on the feature tensors output from multiple output channels.
[0059] In an optional embodiment, step S1081 is implemented by: weighted summing of the convolution results of the processed feature tensors received by multiple input channels at the same coordinates to obtain a summation result; and determining the feature values of the feature tensors output by each of the multiple output channels at the corresponding coordinates based on the summation result and the bias parameter values of the convolutional layer.
[0060] Specifically, to determine any output channel The output feature tensor in any coordinate The eigenvalues at each location are first determined by mapping their coordinates to the processed feature tensor received from each input channel. The input channel is located in the convolutional region, and convolution is performed on this region to obtain the coordinates of each input channel. The convolution result at the coordinates. Then, the input channels are plotted in coordinates... The convolution results at each point are weighted and summed, and combined with the bias parameter values to obtain the output channel. The output feature tensor in coordinates The eigenvalues at that location. Among them, for different output channels... When performing weighted summation, the corresponding weight parameter set is used; for different output channels Different coordinates of the output feature tensor When combining bias parameter values, the corresponding bias parameter values are used. Different output channels The corresponding weight parameter sets can be the same or different, depending on the output channel. Different coordinates of the output feature tensor The corresponding bias parameter values can be the same or different.
[0061] In this way, the convolution operations of each input channel are independent during the computation process. The input channels do not share feature values within the convolution region for the same set of multiplication and addition operations, thus avoiding cross-input channel interference during the convolution computation stage. Information fusion of each input channel occurs during the weighted summation stage of the convolution results, making the fusion process controllable and decoupled from the convolution computation process.
[0062] In one alternative embodiment, the coordinates are located at the lower right corner of the local area.
[0063] When the initial feature tensor of a multi-channel system is a three-dimensional tensor, the local region is determined by the coverage of a 2D (Two-Dimensional) asymmetric window on the initial feature tensor. The local region contains the feature values corresponding to all spatial locations covered by the 2D asymmetric window. Specifically, for the input channels... Coordinates of the received processed feature tensor Define the corresponding 2D asymmetric window, whose window extent is the coordinate and its upper-left region. Specifically, the 2D asymmetric window can be determined by the following formula:
[0064] in, Represents a 2D asymmetric window; Indicates input channel The received processed feature tensor in coordinates Eigenvalues at; Coordinate values representing the spatial height direction; Represents the coordinate values in the direction of spatial width; Indicates the window size in the height direction; Indicates the window size in the width direction.
[0065] Specifically, and These are all preset hyperparameters, and their values can be set according to the resolution of the vehicle's visual data, sensor sampling density, receptive field requirements of the convolutional layer, and real-time constraints. This application does not limit their values. For example, they can be set to... = =5.
[0066] 2D asymmetric window in the height direction from Extend to In the width direction from Extend to Therefore, coordinates This also corresponds to the boundary position of the 2D asymmetric window in the height and width directions, which is the lower right corner of the 2D asymmetric window. In other words, the coordinates... Located in the lower right corner of the local area.
[0067] The 2D asymmetric window only covers the feature values of the current coordinates and its upper-left region. This is to ensure that in dynamic scenarios, such as autonomous driving scenarios, calculations are performed according to a predetermined spatial traversal order, relying only on already obtained feature values and not on feature values that have not yet been traversed. This avoids the need to calculate coordinates in a specific way. When the local complexity value is reached, it is necessary to wait for the generation of feature values of subsequent coordinates, thereby reducing the processing delay caused by waiting and improving real-time performance.
[0068] Furthermore, when the initial feature tensor for multiple channels is a two-dimensional tensor, the initial feature tensor for each channel is represented as a sequence, with coordinates representing the position index along the sequence direction. In this case, the local region is determined by the coverage of a 1D asymmetric window on the initial feature tensor. The local region contains the feature values corresponding to all sequence positions covered by this 1D (One-Dimensional) asymmetric window. The coordinates correspond to the boundary position of the 1D asymmetric window along the sequence direction, i.e., the rightmost end of the 1D asymmetric window. In other words, the coordinates are located at the rightmost end of the local region.
[0069] When the initial feature tensor is a four-dimensional tensor, and the initial feature tensor of each channel is represented in three-dimensional spatial feature form, the local region is determined by the coverage of a 3D (Three-Dimensional) asymmetric window on the initial feature tensor. The local region contains the feature values corresponding to all spatial positions covered by the 3D asymmetric window. The coordinates simultaneously correspond to the boundary positions of the 3D asymmetric window in the spatial height, spatial width, and spatial depth directions, i.e., the lower right rear corner of the 3D asymmetric window. In other words, the coordinates are located at the lower right rear corner of the local region.
[0070] In one alternative embodiment, such as Figure 3 As shown, step S104 includes S1041~S1042: S1041. Determine the mean of the feature values contained in the local region.
[0071] This mean value is used to reflect the baseline level of feature values within a local region. Specifically, when the initial feature tensor of the multi-channel array is a three-dimensional tensor, this mean value can be determined by the following formula:
[0072] in, This represents the coordinates of the processed feature tensor received by input channel c. The mean of the feature values contained in the local region in which it is located; This represents the processed feature tensor received by input channel c in coordinates. Eigenvalues at; Coordinate values representing the spatial height direction; Represents the coordinate values in the direction of spatial width; This indicates the total number of feature values within a 2D asymmetric window, used to ensure the accuracy of the mean calculation; Indicates the window size in the height direction; Indicates the window size in the width direction.
[0073] S1042. Based on the mean and the feature values contained in the local region, determine the variance of the feature values contained in the local region, and use it as the local complexity value.
[0074] Specifically, when the initial feature tensor of the multi-channel array is a three-dimensional tensor, the local complexity value can be determined by the following formula:
[0075] in, This represents the coordinates of the processed feature tensor received by input channel c. The local complexity value; This represents the coordinates of the processed feature tensor received by input channel c. The local region it occupies contains the mean of the feature values; This represents the processed feature tensor received by input channel c in coordinates. Eigenvalues at; Coordinate values representing the spatial height direction; Represents the coordinate values in the direction of spatial width; This represents the total number of feature values within a 2D asymmetric window; Indicates the window size in the height direction; Indicates the window size in the width direction.
[0076] Local complexity value The smaller the value, the smaller the fluctuation of the feature values within the local region. Local complexity value. The larger the local complexity value, the greater the fluctuation of feature values within a local area. In autonomous driving scenarios, a smaller local complexity value indicates a more stable signal in a local area, such as a highway with few vehicles traveling straight and a relatively high speed. Conversely, a larger local complexity value indicates a more complex signal in a local area, such as a road segment with multiple targets interacting at an intersection. This provides a quantitative basis for subsequent adjustments to the size of the convolutional kernel based on the local complexity value.
[0077] In one alternative embodiment, the size of the convolutional region is the same as the size of the convolutional kernel; wherein the coordinates are located at the lower right corner of the convolutional region.
[0078] In one alternative embodiment, such as Figure 4 As shown, step S105 includes S1051~S1052: S1051. If the local complexity value is not less than the preset complexity threshold, determine the convolution kernel as the first size convolution kernel.
[0079] S1051. When the local complexity value is less than the complexity threshold, determine the convolution kernel as a second-size convolution kernel; the second size is less than the first size.
[0080] Based on the coordinates of the processed feature tensor received from input channel c The relationship between the local complexity value and the complexity threshold is used to determine the coordinates. The corresponding convolution kernel size. Specifically, when the initial feature tensor for multi-channel applications is a three-dimensional tensor, the convolution kernel size can be determined by the following formula:
[0081] in, Indicates the second dimension. Indicates the first dimension. This represents the coordinates of the processed feature tensor received by input channel c. The local complexity value, Indicates the complexity threshold. This represents the size of the convolution kernel in the height direction. This represents the size of the convolution kernel in the width direction. This represents the coordinates of the processed feature tensor received by input channel c. The corresponding convolution kernel has a set of size values in the height and width directions.
[0082] In this embodiment, the size of the convolution kernel in the height direction is set. The size of the convolution kernel in the width direction Same, to simplify the calculation logic. Second dimension and the first size The value of can be determined according to the actual situation, and this application does not limit it. For example, A value of 3 can be chosen, with the kernel height × kernel width corresponding to 3 × 3, which is suitable for situations where the local region is relatively stable. A value of 7 can be chosen, corresponding to a kernel height × kernel width of 7 × 7, which is suitable for situations where the local region is more complex.
[0083] When the local complexity value is less than the complexity threshold, the coordinates are located in a static region where the signal is stable. The convolution kernel is then set to a second size, allowing it to focus on core features near the coordinates within a smaller coverage area. This reduces the participation of irrelevant features in the weighted summation, lowers redundant computation, and reduces noise introduction. When the local complexity value is not less than the complexity threshold, the coordinates are located in a dynamic and complex region. The convolution kernel is then set to a first size, expanding its coverage area to obtain a larger receptive field. This enhances the ability to capture the spatial distribution of dynamic and complex regions and the correlation between multiple targets, improving feature extraction accuracy and enhancing perception and control accuracy.
[0084] It is important to note that the above is only one implementation of determining the size of the convolution kernel based on the comparison between the local complexity value and the complexity threshold. In practical applications, step S105 can also use other methods, as long as the size of the convolution kernel can be determined according to the degree of fluctuation of the local region's feature values reflected by the local complexity value. Specifically, the size of the convolution kernel can follow the principle that the larger the local complexity value, the larger the convolution kernel size, and the smaller the local complexity value, the smaller the convolution kernel size. A larger local complexity value indicates that the local region's feature values fluctuate more strongly, and the coordinates are more likely to be located in a dynamically complex region. Using a larger convolution kernel can expand the receptive field and cover more spatially located feature values, thereby enhancing the ability to capture complex change patterns and multi-target associations. A smaller local complexity value indicates that the local region's feature values fluctuate less strongly, and the coordinates are more likely to be located in a static region with stable signals. Using a smaller convolution kernel can reduce the participation of irrelevant features in the weighted summation, reduce noise introduction, and reduce redundant calculations.
[0085] For example, in one optional implementation, multiple complexity thresholds can be preset to divide the local complexity values into three or more levels, and different sizes of convolutional kernels can be configured for each level. Specifically, when the local complexity value is less than a first complexity threshold, the convolutional kernel can be determined to be of a second size; when the local complexity value is not less than the first complexity threshold and less than a second complexity threshold, the convolutional kernel can be determined to be of a third size; and when the local complexity value is not less than the second complexity threshold, the convolutional kernel can be determined to be of a first size, where the first size is larger than the third size and the third size is larger than the second size. Through this method, the convolutional kernel size is no longer limited to a choice between the first and second sizes, but can be adjusted with finer granularity according to different ranges of local complexity values, making the feature value changes of the convolutional region and the local region more closely match.
[0086] In an optional embodiment, determining the convolution kernel as a second-size convolution kernel in step S1051 is achieved by: determining a second-size region located in the upper left corner of the first-size convolution kernel; retaining the weight values contained in the second-size region, and changing the weight values of other regions in the first-size convolution kernel to 0.
[0087] Specifically, to facilitate the description of how the convolution kernel weights are organized across different input and output channels, a weight tensor for the convolution kernel is defined. When the initial feature tensor for multiple channels is a three-dimensional tensor, this weight tensor can be determined using the following formula:
[0088] in, Indicates the input channel index. , Indicates the number of input channels; Indicates the output channel index. , Indicates the number of output channels; Coordinates representing the spatial height direction, , Represents the spatial height of the initial feature tensor; Represents the coordinate values in the width direction of the space. , This represents the spatial width of the initial feature tensor; This represents the internal spatial coordinates of the convolution kernel in the height direction. , Indicates the first dimension; This represents the internal spatial coordinates of the convolution kernel in the width direction. .
[0089] The convolution kernel is a two-dimensional structure in space. The size of the convolution kernel is used to characterize the spatial coverage of the convolution kernel in the height and width directions, corresponding to the... , The range of values for is determined. and The weight set is used to distinguish between different input channels and different output channels, so that the convolutional layer can perform weighted fusion of the feature values of the processed feature tensors received by each input channel at the same coordinates, thereby obtaining the feature values of the feature tensors output by each output channel at the corresponding coordinates.
[0090] The first size corresponds to the kernel height × kernel width. The convolution kernel serves as the unified organizing basis for the weight tensor. When the coordinates... The corresponding convolution kernel size is the second dimension, with kernel height × kernel width being... At that time, only those kernels that satisfy the condition are retained. and The weight values of the coordinates; will satisfy or The weight values of the coordinates are set to 0, so that they do not participate in the convolution calculation. This is equivalent to using only the weight values contained in the second-size region located in the upper left corner of the first-size convolution kernel to complete the convolution calculation. This allows the second-size convolution kernel to complete the weighted summation under the same calculation path as the first-size convolution kernel, thereby avoiding the introduction of different calculation branches for convolution kernels of different sizes.
[0091] It should be explained that the above processing is an implementation method given when the size of the convolution kernel switches between the first size and the second size. In practical applications, when there are more than two different sizes of convolution kernels, the convolution kernel corresponding to the largest size is essentially used as the unified organization benchmark for the weight tensor. For the convolution kernel corresponding to the smaller size, the weight values that are outside the coverage of the smaller size are set to 0, so that they do not participate in the convolution calculation. This way, convolution kernels of different sizes complete the weighted summation under the same calculation path, avoiding the introduction of different calculation branches for convolution kernels of different sizes.
[0092] Any output channel can be determined using the following formula. Any coordinate of the output feature tensor Eigenvalues at:
[0093] Among them, the outer layer summation This is used to weight and fuse the convolution results of each input channel to achieve complementary information from multiple input channels; intermediate summation. Used to cover the convolutional region where the current coordinates are located; This represents the size of the convolution kernel in the height direction; This indicates the size of the convolution kernel in the width direction; This is the bias parameter value, used to adjust the characteristic value of the output channel; Indicates input channel Coordinates of the received processed feature tensor The feature values contained in the convolutional region.
[0094] Coordinates of the processed feature tensor The convolutional region is ,when and When, the corresponding coordinates are That is, the current coordinates; when When it increases, As it decreases, the corresponding coordinate expands upwards; when When it increases, As the coordinate decreases, the corresponding coordinate expands to the left. Therefore, the coordinate... The convolutional region covers the current coordinates. and the coordinate range above and to the left, current coordinate position It is located at the bottom right corner of the convolutional region.
[0095] In an optional embodiment, the preprocessing of the initial feature tensor in step S102 includes: preprocessing the initial feature tensor according to the mean and standard deviation of the feature values contained in the initial feature tensor, and the feature values contained in the initial feature tensor.
[0096] In one optional embodiment, the initial feature tensor is preprocessed, including: modifying the eigenvalues of the initial feature tensor at each coordinate based on the mean and standard deviation of the eigenvalues contained in the initial feature tensor, and the eigenvalues contained in the initial feature tensor, to obtain a modified feature tensor; and processing the modified feature tensor to obtain a processed feature tensor.
[0097] Specifically, when the initial feature tensor of the multi-channel array is a three-dimensional tensor, the modified feature tensor can be obtained using the following formula:
[0098] in, Indicates channel The modified feature tensor in coordinates eigenvalues at that location Indicates channel The initial feature tensor in coordinates eigenvalues at that location Indicates channel The mean of the eigenvalues contained in the initial feature tensor. Indicates channel The initial feature tensor contains the standard deviation of the eigenvalues.
[0099] In the preprocessing stage, the eigenvalues at each coordinate are standardized based on the mean and standard deviation of the eigenvalues contained in the initial feature tensor of each channel. This ensures that the eigenvalues contained in the initial feature tensors of different channels are at a comparable numerical scale. With a more consistent eigenvalue scale, the sensitivity of local complexity values to the absolute magnitude of eigenvalues decreases, better reflecting the relative fluctuations of eigenvalues within local regions. This prevents the local complexity values of some channels from being amplified due to an overall larger number of eigenvalues, thus avoiding bias in determining the convolution kernel size. This reduces the likelihood of misjudging the convolution kernel size.
[0100] Specifically, at coordinates where feature values fluctuate relatively little within a local region, the local complexity value will not be amplified above the complexity threshold due to the overall large number of feature values contained in the initial feature tensor of a certain channel, thus avoiding the misdetermination of the convolution kernel size corresponding to that coordinate as large. Conversely, at coordinates where feature values fluctuate significantly within a local region, the local complexity value will not be suppressed below the complexity threshold due to scale inconsistencies, thus avoiding the misdetermination of the convolution kernel size corresponding to that coordinate as small. By reducing the aforementioned convolution kernel size determination bias, the determination of the convolution region more closely matches the feature value changes within the local region, making the convolution result at that coordinate more consistent with the feature representation needs of the local region, improving the feature extraction accuracy of the output feature tensor, and reducing unnecessary convolution computation.
[0101] In one optional embodiment, the modified feature tensor is processed to obtain a processed feature tensor, including: expanding the feature values of the modified feature tensor to obtain the processed feature tensor.
[0102] In one optional embodiment, expanding the eigenvalues of the modified feature tensor includes: The modified feature tensor is expanded based on the first size.
[0103] In one alternative embodiment, the modified feature tensor is expanded, including: The padding amount is obtained by subtracting one from the number of weight values in each row of the first-size convolutional kernel, taking half of the result, and rounding it down. When the feature tensor received by each input channel is one-dimensional, the modified feature tensor is expanded to the left along the sequence direction to fill with a number of feature values; or, when the feature tensor received by each input channel is two-dimensional, the modified feature tensor is expanded to the left along the spatial width direction to fill with a number of column feature values, and expanded upward along the spatial height direction to fill with a number of row feature values; or, when the feature tensor received by each input channel is three-dimensional, based on the number of weight values in each row of the first-size convolutional kernel, the modified feature tensor is expanded to the left along the spatial width direction to fill with a number of column feature values, expanded upward along the spatial height direction to fill with a number of row feature values, and expanded forward along the spatial depth direction to fill with a number of layer feature values.
[0104] Since the sizes of the convolution kernels corresponding to different coordinates of the processed feature tensors received from different input channels may be different, in order to avoid spatial height differences in the feature tensors output by each output channel... With space width Spatial height relative to the initial feature tensor With space width When changes occur and the eigenvalues of the modified feature tensor are expanded, the padding amount is determined based on the first size, and the modified feature tensor is expanded according to the padding amount to ensure that the output feature tensor satisfies the specified conditions. and .
[0105] Specifically, the padding amount of the modified feature tensor in the height direction and the padding amount in the width direction can be determined by the following formulas:
[0106]
[0107] in, Indicates the first dimension. This indicates the amount of padding applied to the modified feature tensor along the spatial height direction. This indicates the amount of padding applied to the modified feature tensor in the width direction.
[0108] Preferably, the expansion method uses edge copying to avoid edge feature distortion caused by padding with zeros.
[0109] It is important to note that the aforementioned method of determining the padding amount based on the first size applies to cases where the kernel size switches between the first and second sizes. Essentially, it determines the expansion boundary based on the maximum size of the kernel. Specifically, the padding amount can be determined by subtracting one from the number of weight values of the maximum-size kernel in any row, taking half of that number, and then rounding down to the nearest integer to obtain the padding amount.
[0110] This embodiment employs a unified padding strategy, dynamically adjusting the padding amount for convolutional kernels of different sizes. This ensures that the feature tensors output by each output channel maintain consistency in spatial height and width, and also meet the consistency requirements with the initial feature tensors in spatial height and width. In this way, dynamic switching of convolutional kernel size does not cause inconsistencies in the size of the output feature tensors, nor does it disrupt the spatial alignment of different input channels, thus avoiding dimensionality mismatch and spatial alignment issues in subsequent processing. Furthermore, unified dimensional output avoids the risk of feature fragmentation caused by dynamic convolutional kernel size, allowing subsequent convolutional neural network architectures to directly receive the feature tensors output by the output channels without additional dimensional alignment operations, reducing additional processing overhead such as pruning, padding, and resampling. Therefore, the output feature tensors are compatible with existing CNN (Convolutional Neural Network) architectures, seamlessly integrating with subsequent processing flows in autonomous driving perception and control stages, reducing integration difficulty with existing autonomous driving systems and ensuring ease of technology deployment.
[0111] After traversing all output channels and the coordinates of the processed feature tensors received from each input channel, the output feature tensor is obtained by integrating them. This output feature tensor can be represented by the following formula:
[0112] in, This represents the output feature tensor; Indicates the preset number of output channels; This represents the spatial height of the feature tensor output by the output channel; This represents the spatial width of the feature tensor output by the output channel; Represents the spatial height of the initial feature tensor; This represents the spatial width of the initial feature tensor; The shape of the output feature tensor is . The feature tensors of each channel are superimposed, and the feature tensor of each channel is a single... The two-dimensional feature tensor.
[0113] The output feature tensor has a three-dimensional structure, which is compatible with the output format of traditional 2D-CNN. In autonomous driving scenarios, it can be directly input into the subsequent perception modules of the autonomous driving system, such as object detection and semantic segmentation, or into the planning and control modules, such as trajectory planning and behavior decision-making.
[0114] Based on the same inventive concept as the aforementioned feature extraction method, this application also provides a feature extraction device 2, such as... Figure 5 As shown, the feature extraction device 2 includes: a vectorization module 21, a preprocessing module 22, a local region determination module 23, a local complexity value determination module 24, a convolution kernel size determination module 25, a convolutional region determination module 26, a convolution module 27, and an output feature tensor determination module 28.
[0115] Vectorization module 21 vectorizes the vehicle's visual data to obtain a multi-channel initial feature tensor. Preprocessing module 22 preprocesses the initial feature tensor to obtain a processed feature tensor. Local region determination module 23 determines the local region of each coordinate within the coordinate range of the initial feature tensor, as received by each input channel of the convolutional layer. Local complexity value determination module 24 determines the local complexity value of the coordinates based on the feature values contained in the local region. Convolution kernel size determination module 25 determines the size of the convolution kernel corresponding to the coordinates based on the local complexity value. Convolutional region determination module 26 determines the convolutional region of the coordinates within the processed feature tensor based on the size. Convolution module 27 convolves the convolutional region using a convolution kernel to obtain the convolution result at the coordinates. Output feature tensor determination module 28 obtains the output feature tensor based on the convolution results corresponding to multiple input channels.
[0116] Each module of the above-mentioned feature extraction device corresponds to the steps of the above-mentioned feature extraction method. For details on the implementation process of the functions and roles of each module in the above-mentioned feature extraction device, please refer to the implementation process of the corresponding steps in the above-mentioned feature extraction method. The same technical effect can be achieved, and will not be repeated here.
[0117] Figure 6 The diagram shown is a structural schematic of the electronic device 30 provided in an embodiment of this application.
[0118] like Figure 6 As shown, the electronic device 30 includes one or more processors 31 for implementing the feature extraction method described above.
[0119] In some embodiments, the electronic device 30 may include a storage medium 39. For example, a computer-readable storage medium may store a program that can be invoked by a processor 31, and may include a non-volatile storage medium. In some embodiments, the electronic device 30 may include memory 38 and an interface 37. In some embodiments, the electronic device 30 may also include other hardware depending on the specific application.
[0120] The computer-readable storage medium of this application embodiment stores a program thereon, which, when executed by processor 31, is used to implement the feature extraction method described above.
[0121] This application provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the feature extraction method as described above.
[0122] This application also provides a computer program stored in a computer-readable storage medium, for example... Figure 6 The storage medium 39, and when the processor executes the computer program, causes the processor 31 to execute the feature extraction method described above.
[0123] This application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented using any method or technology. Information may be computer-readable instructions, data structures, program modules, or other data. Examples of computer-readable storage media include, but are not limited to: phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0124] The aforementioned electronic device can execute the feature extraction method provided in the embodiments herein. The aforementioned electronic device may include the aforementioned feature extraction apparatus, such as one or more of a processor, controller, and PC (Personal Computer) terminal device. The server terminal device and the PC terminal device may include, but are not limited to, a server, a desktop computer, a tablet computer, or a laptop computer.
[0125] It should be noted that the technical solutions or features described in the above embodiments can be combined or supplemented with each other without conflict. The scope of protection of this application is not limited to the precise structures described in the above embodiments and shown in the accompanying drawings; all modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A feature extraction method, characterized in that, include: The vehicle's visual data is vectorized to obtain a multi-channel initial feature tensor; The initial feature tensor is preprocessed to obtain the processed feature tensor; Determine the local region where each coordinate within the coordinate range of the initial feature tensor of the multiple input channels of the convolutional layer is located, based on the processed feature tensor received by each input channel. The local complexity value of the coordinates is determined based on the feature values contained in the local region. Based on the local complexity value, determine the size of the convolution kernel corresponding to the coordinates; Based on the size, determine the convolutional region where the coordinates are located in the processed feature tensor; The convolution kernel is used to convolve the convolutional region to obtain the convolution result at the coordinates. The output feature tensor is obtained based on the convolution results corresponding to the multiple input channels.
2. The feature extraction method as described in claim 1, characterized in that, The step of obtaining the output feature tensor based on the convolution results corresponding to the multiple input channels includes: Based on the convolution result of the processed feature tensors received by the multiple input channels at the same coordinates, the feature values of the feature tensors output by each output channel of the multiple output channels of the convolutional layer at the corresponding coordinates are determined. The output feature tensor is obtained based on the feature tensors output from the multiple output channels.
3. The feature extraction method as described in claim 2, characterized in that, The step of determining the feature value of the feature tensor output by each output channel of the convolutional layer at the corresponding coordinates based on the convolution result of the processed feature tensors received by the multiple input channels at the same coordinates includes: The convolution results of the processed feature tensors received from the multiple input channels at the same coordinates are weighted and summed to obtain the summation result; Based on the summation result and the bias parameter value of the convolutional layer, the feature value of the feature tensor output by each of the multiple output channels at the corresponding coordinates is determined.
4. The feature extraction method as described in claim 1, characterized in that, The coordinates are located at the lower right corner of the local area.
5. The feature extraction method as described in claim 1, characterized in that, Determining the local complexity value of the coordinates based on the feature values contained in the local region includes: Determine the mean value of the feature values contained in the local region; Based on the mean and the feature values contained in the local region, the variance of the feature values contained in the local region is determined as the local complexity value.
6. The feature extraction method as described in claim 1, characterized in that, The size of the convolutional region is the same as the size of the convolutional kernel; wherein the coordinates are located at the lower right corner of the convolutional region.
7. The feature extraction method as described in claim 1, characterized in that, Determining the size of the convolution kernel corresponding to the coordinates based on the local complexity value includes: If the local complexity value is not less than a preset complexity threshold, the convolution kernel is determined to be a convolution kernel of the first size; If the local complexity value is less than the complexity threshold, the convolution kernel is determined to be a convolution kernel of the second size; the second size is smaller than the first size.
8. The feature extraction method as described in claim 7, characterized in that, Determining that the convolution kernel is a convolution kernel of the second size includes: The region of the second size located in the upper left corner is determined in the convolution kernel of the first size; The weight values contained in the region of the second size are retained, and the weight values of other regions in the convolution kernel of the first size are changed to 0.
9. The feature extraction method as described in claim 7, characterized in that, The preprocessing of the initial feature tensor includes: The initial feature tensor is preprocessed based on the mean and standard deviation of the eigenvalues contained in the initial feature tensor, as well as the eigenvalues contained in the initial feature tensor.
10. The feature extraction method as described in claim 9, characterized in that, The preprocessing of the initial feature tensor includes: Based on the mean and standard deviation of the eigenvalues contained in the initial feature tensor, and the eigenvalues contained in the initial feature tensor, the eigenvalues of the initial feature tensor at each coordinate are modified to obtain the modified feature tensor; The modified feature tensor is processed to obtain the processed feature tensor.
11. The feature extraction method as described in claim 10, characterized in that, The process of processing the modified feature tensor to obtain the processed feature tensor includes: The modified feature tensor is expanded with eigenvalues to obtain the processed feature tensor.
12. The feature extraction method as described in claim 11, characterized in that, The process of expanding the eigenvalues of the modified feature tensor includes: The modified feature tensor is expanded according to the first size.
13. The feature extraction method as described in claim 12, characterized in that, The expansion of the modified feature tensor includes: The padding quantity is obtained by subtracting one from the number of weight values in each row of the first-size convolutional kernel, taking half of the result, and rounding it down. When the feature tensor received by each input channel is one-dimensional, the modified feature tensor is expanded to the left along the sequence direction by the number of filler feature values; or, when the feature tensor received by each input channel is two-dimensional, the modified feature tensor is expanded to the left along the spatial width direction by the number of filler column feature values, and expanded upward along the spatial height direction by the number of filler row feature values; or, when the feature tensor received by each input channel is three-dimensional, based on the number of weight values in each row of the first-size convolutional kernel, the modified feature tensor is expanded to the left along the spatial width direction by the number of filler column feature values, expanded upward along the spatial height direction by the number of filler row feature values, and expanded forward along the spatial depth direction by the number of filler layer feature values.
14. A feature extraction device, characterized in that, include: The vectorization module is used to vectorize the vehicle's visual data to obtain multi-channel initial feature tensors. The preprocessing module is used to preprocess the initial feature tensor to obtain the processed feature tensor; The local region determination module is used to determine the local region where each coordinate of the processed feature tensor received by each input channel of the multiple input channels of the convolutional layer is located within the coordinate range of the initial feature tensor. The local complexity value determination module is used to determine the local complexity value of the coordinates based on the feature values contained in the local region. A kernel size determination module is used to determine the size of the kernel corresponding to the coordinates based on the local complexity value. A convolutional region determination module is used to determine the convolutional region where the coordinates are located in the processed feature tensor based on the size; A convolution module is used to perform convolution on the convolutional region using the convolution kernel to obtain the convolution result at the coordinates; The output feature tensor determination module is used to obtain the output feature tensor based on the convolution results corresponding to the multiple input channels.
15. An electronic device, characterized in that, It includes one or more processors for implementing the feature extraction method as described in any one of claims 1 to 13.
16. A computer-readable storage medium, characterized in that, It stores a program that, when executed by a processor, implements the feature extraction method as described in any one of claims 1 to 13.
17. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the feature extraction method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Bursaphelenchus xylophilus disease intelligent identification method and system
CN119741611A
Mini LED lamp panel needle mark defect detection method and system
CN120634970A