Model training method, image recognition method and device, and intelligent driving device

By dynamically adjusting the feature receptive field and using a hybrid model training method combining self-attention and external attention mechanisms, the problem that self-attention mechanism models cannot utilize the correlation of the overall dataset is solved, thus achieving efficient recognition of low-lying obstacles.

CN123161192APending Publication Date: 2026-11-24JINGDONG KUNPENG (JIANGSU) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510670915.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing self-attention mechanism machine learning models cannot effectively utilize the potential correlations of the overall dataset, resulting in unsatisfactory detection and recognition performance for low-lying obstacles.

Method used

By dynamically adjusting the receptive field of features, an image recognition model training method that utilizes fine-grained local information and coarse-grained global information is used. This method combines a machine learning model with self-attention and external attention mechanisms to generate sample feature maps and perform training.

Benefits of technology

It improves the accuracy and efficiency of identifying low-lying obstacles, and can effectively identify low-lying obstacles in the environment surrounding autonomous vehicles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123161192A_ABST
    Figure CN123161192A_ABST
Patent Text Reader

Abstract

This disclosure provides a model training method, an image recognition method and apparatus, and an intelligent driving device, relating to the field of intelligent driving. The model training method includes: extracting sample features from a sample image; processing the sample features using a first machine learning model with a self-attention mechanism to generate a local sample feature map; processing the local sample feature map using a second machine learning model with a self-attention mechanism to generate a global sample feature map; generating a first sample feature map based on the local and global sample feature maps; generating a first recognition result for the sample image based on the first sample feature map; and training the first and second machine learning models based on the first recognition result and the annotation information of the sample image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of intelligent driving technology, and in particular to a model training method, an image recognition method and apparatus, and an intelligent driving device. Background Technology

[0002] In the field of autonomous low-speed driverless vehicle delivery, the detection and recognition of low obstacles is a key issue. It is essential for ensuring the safety and smooth operation of autonomous vehicles, as they enable the autonomous driving system to understand and interpret the surrounding environment.

[0003] In order to understand and interpret the surrounding environment, autonomous driving systems divide the acquired images into multiple regions or objects, each containing pixels with specific attributes such as texture, color, or brightness. In autonomous driving, this typically means identifying different objects in the acquired images, such as roads, pedestrians, vehicles, traffic signs, the sky, and buildings. Summary of the Invention

[0004] The inventors noted that in related technologies, machine learning models with self-attention mechanisms can only model self-similarity within a single sample, ignoring the potential correlation of the entire dataset, and therefore cannot achieve ideal image recognition results.

[0005] Accordingly, this disclosure provides an image recognition model training method that dynamically adjusts the feature receptive field and uses fine-grained local information and coarse-grained global information to train the image recognition model, thereby enabling the trained image recognition model to effectively identify various targets in the acquired image.

[0006] According to a first aspect of the present disclosure, an image recognition model training method is provided, comprising: extracting sample features of a sample image; processing the sample features using a first machine learning model with a self-attention mechanism to generate a local sample feature map; processing the local sample feature map using a second machine learning model with a self-attention mechanism to generate a global sample feature map; generating a first sample feature map based on the local sample feature map and the global sample feature map; generating a first recognition result of the sample image based on the first sample feature map; and training the first machine learning model and the second machine learning model based on the first recognition result and the annotation information of the sample image.

[0007] In some embodiments, generating a first sample feature map based on the local sample feature map and the global sample feature map includes fusing the local sample feature map and the global sample feature map to generate the first sample feature map.

[0008] In some embodiments, fusing the local sample feature map and the global sample feature map includes: upsampling the global sample feature map to generate a transformed sample feature map, wherein the size of the transformed sample feature map is the same as the size of the local sample feature map; and fusing the local sample feature map and the transformed sample feature map to generate the first sample feature map.

[0009] In some embodiments, processing the local sample feature map using a second machine learning model with a self-attention mechanism includes: aggregating the features of the local sample feature map to generate an aggregated sample feature map; and processing the aggregated sample feature map using the second machine learning model to generate the global sample feature map.

[0010] In some embodiments, a third machine learning model with an external attention mechanism is used to process the first sample feature map to generate a second sample feature map; a second recognition result of the sample image is generated based on the second sample feature map; and the first machine learning model, the second machine learning model, and the third machine learning model are trained based on the second recognition result and the annotation information of the sample image.

[0011] In some embodiments, processing the first sample feature map includes: generating a first intermediate sample feature map based on the first sample feature map and a first extrinsic parameter matrix; generating a second intermediate sample feature map based on the first intermediate sample feature map and a second extrinsic parameter matrix; and generating a second sample feature map based on the second intermediate sample feature map.

[0012] In some embodiments, generating a first intermediate sample feature map based on the first sample feature map and the first extrinsic parameter matrix includes: generating the first intermediate sample feature map based on the similarity between the first sample feature map and the first extrinsic parameter matrix.

[0013] In some embodiments, generating a second intermediate sample feature map based on the first intermediate sample feature map and the second extrinsic parameter matrix includes generating the second intermediate sample feature map based on the product of the first intermediate sample feature map and the second extrinsic parameter matrix.

[0014] In some embodiments, generating the second sample feature map based on the second intermediate sample feature map includes: processing the second intermediate sample feature map using an activation function to obtain a third intermediate sample feature map; and generating the second sample feature map based on the distance between the first sample feature map and the first extrinsic parameter matrix, and the third intermediate sample feature map.

[0015] According to a second aspect of the present disclosure, an image recognition model training apparatus is provided, comprising: a memory; and a processor coupled to the memory, the processor being configured to execute instructions stored in the memory to implement the image recognition model training method as described in any of the above embodiments.

[0016] According to a third aspect of the present disclosure, an image recognition method is provided, comprising: acquiring an image acquired by an image acquisition device; extracting image features from the image; processing the image features using a first machine learning model with a self-attention mechanism to generate a local feature map; processing the local feature map using a second machine learning model with a self-attention mechanism to generate a global feature map, wherein the first machine learning model and the second machine learning model are trained using the image recognition model training method described in any of the above embodiments; generating a first feature map based on the local feature map and the global feature map; and generating a first recognition result of the image based on the first feature map.

[0017] In some embodiments, generating a first feature map based on the local feature map and the global feature map includes fusing the local feature map and the global feature map to generate the first feature map.

[0018] In some embodiments, fusing the local feature map and the global feature map includes: upsampling the global feature map to generate a transformed feature map, wherein the size of the transformed feature map is the same as the size of the local feature map; and fusing the local feature map and the transformed feature map to generate the first feature map.

[0019] In some embodiments, processing the local feature map using a second machine learning model with a self-attention mechanism includes: aggregating the features of the local feature map to generate an aggregated feature map; and processing the aggregated feature map using the second machine learning model to generate the global feature map.

[0020] In some embodiments, the first feature map is processed using a third machine learning model with an external attention mechanism to generate a second feature map, wherein the third machine learning model is trained using the image recognition training method described in any of the above embodiments; and a second recognition result of the image is generated based on the second feature map.

[0021] In some embodiments, processing the first feature map includes: generating a first intermediate feature map based on the first feature map and a first extrinsic parameter matrix; generating a second intermediate feature map based on the first intermediate feature map and a second extrinsic parameter matrix; and generating a second feature map based on the second intermediate feature map.

[0022] In some embodiments, generating a first intermediate feature map based on the first feature map and the first extrinsic parameter matrix includes: generating the first intermediate feature map based on the similarity between the first feature map and the first extrinsic parameter matrix.

[0023] In some embodiments, generating a second intermediate feature map based on the first intermediate feature map and the second extrinsic parameter matrix includes generating the second intermediate feature map based on the product of the first intermediate feature map and the second extrinsic parameter matrix.

[0024] In some embodiments, generating the second feature map based on the second intermediate feature map includes: processing the second intermediate feature map using an activation function to obtain a third intermediate feature map; and generating the second feature map based on the distance between the first feature map and the first extrinsic parameter matrix, and the third intermediate feature map.

[0025] According to a fourth aspect of the present disclosure, an image recognition apparatus is provided, comprising: a memory; and a processor coupled to the memory, the processor being configured to execute instructions stored in the memory to implement the image recognition method as described in any of the above embodiments.

[0026] According to a fifth aspect of the present disclosure, an intelligent driving device is provided, comprising: an image recognition device as described in any of the foregoing embodiments; and an image acquisition device configured to acquire images.

[0027] In some embodiments, the intelligent driving device includes an unmanned vehicle.

[0028] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions that, when executed by a processor, implement the method as described in any of the above embodiments.

[0029] According to a seventh aspect of the present disclosure, a computer program product is provided, including computer instructions, wherein the computer instructions, when executed by a processor, implement the method as described in any of the above embodiments.

[0030] Other features and advantages of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 This is a flowchart illustrating an image recognition model training method according to an embodiment of the present disclosure;

[0033] Figure 2 This is a flowchart illustrating an image recognition model training method according to another embodiment of the present disclosure;

[0034] Figure 3 This is a schematic diagram of the structure of an image recognition model training device according to an embodiment of the present disclosure;

[0035] Figure 4 This is a schematic flowchart of an image recognition method according to an embodiment of the present disclosure;

[0036] Figure 5 This is a schematic flowchart of an image recognition method according to another embodiment of the present disclosure;

[0037] Figure 6 This is a schematic diagram of the structure of an image recognition device according to an embodiment of the present disclosure;

[0038] Figure 7 This is a schematic diagram of the structure of an intelligent driving device according to an embodiment of the present disclosure. Detailed Implementation

[0039] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.

[0040] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of this disclosure.

[0041] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.

[0042] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

[0043] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.

[0044] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0045] Figure 1 This is a schematic flowchart of an image recognition model training method according to an embodiment of the present disclosure. In some embodiments, the following image recognition model training method is performed by an image recognition model training device, including steps 11-16.

[0046] In step 11, sample features of the sample image are extracted.

[0047] In step 12, the sample features are processed using a first machine learning model with a self-attention mechanism to generate a local sample feature map.

[0048] For example, local sample feature map As shown in formula (1).

[0049] (1)

[0050] In formula (1), For sample features, This is the first machine learning model with a self-attention mechanism.

[0051] For example, the first machine learning model is the Transformer model.

[0052] In step 13, a second machine learning model with a self-attention mechanism is used to process the local sample feature map to generate a global sample feature map.

[0053] In some embodiments, local sample feature maps are aggregated to generate aggregated sample feature maps. Next, a second machine learning model is used to process the aggregated sample feature maps to generate global sample feature maps.

[0054] For example, global sample feature map As shown in formula (2).

[0055] (2)

[0056] In formula (2), This represents a lightweight, dynamically generated convolutional network used to transform local sample feature maps. The data is aggregated, then downsampled and compressed before being fed into the GSA module, which is a second machine learning model with a self-attention mechanism.

[0057] For example, the second machine learning model is the Transformer model.

[0058] In step 14, a first sample feature map is generated based on the local sample feature map and the global sample feature map.

[0059] In some embodiments, local sample feature maps and global sample feature maps are fused to generate a first sample feature map.

[0060] For example, the global sample feature map is upsampled to generate a transformed sample feature map, where the size of the transformed sample feature map is the same as the size of the local sample feature map. Next, the local sample feature map and the transformed sample feature map are fused to generate a first sample feature map.

[0061] For example, the local sample feature map and the transformed sample feature map are concatenated to generate the first sample feature map.

[0062] For example, the feature map of the first sample is shown in formula (3).

[0063] (3)

[0064] In formula (3), For concatenation functions, This is the upsampling function.

[0065] In step 15, the first recognition result of the sample image is generated based on the first sample feature map.

[0066] In step 16, the first machine learning model and the second machine learning model are trained based on the first recognition result and the annotation information of the sample image.

[0067] For example, a loss function is generated based on the first recognition result and the annotation information of the sample image, and the first machine learning model and the second machine learning model are trained using the loss function.

[0068] In the image recognition model training method provided in the above embodiments of this disclosure, a first sample feature map is generated by utilizing local and global sample feature maps of sample features. A first recognition result for the sample image is then generated using this first sample feature map. Based on the first recognition result and the annotation information of the sample image, a first machine learning model and a second machine learning model are trained. Thus, using the trained first and second machine learning models, various targets, such as low-lying obstacles, in the acquired image can be effectively identified.

[0069] Figure 2 This is a flowchart illustrating an image recognition model training method according to another embodiment of the present disclosure. In some embodiments, the following image recognition model training method is performed by an image recognition model training apparatus, including steps 21-27.

[0070] In step 21, sample features of the sample image are extracted.

[0071] In step 22, the sample features are processed using a first machine learning model with a self-attention mechanism to generate a local sample feature map.

[0072] For example, local sample feature map As shown in formula (1).

[0073] In step 23, a second machine learning model with a self-attention mechanism is used to process the local sample feature map to generate a global sample feature map.

[0074] In some embodiments, local sample feature maps are aggregated to generate aggregated sample feature maps. Next, a second machine learning model is used to process the aggregated sample feature maps to generate global sample feature maps.

[0075] For example, global sample feature map As shown in formula (2).

[0076] In step 24, a first sample feature map is generated based on the local sample feature map and the global sample feature map.

[0077] In some embodiments, local sample feature maps and global sample feature maps are fused to generate a first sample feature map.

[0078] For example, the global sample feature map is upsampled to generate a transformed sample feature map, where the size of the transformed sample feature map is the same as the size of the local sample feature map. Next, the local sample feature map and the transformed sample feature map are fused to generate a first sample feature map.

[0079] For example, the local sample feature map and the transformed sample feature map are concatenated to generate the first sample feature map.

[0080] For example, the feature map of the first sample is shown in formula (3).

[0081] In step 25, a third machine learning model with an external attention mechanism is used to process the first sample feature map to generate the second sample feature map.

[0082] In some embodiments, the steps of processing the first sample feature map described above include the following steps:

[0083] 1) Generate the first intermediate sample feature map based on the first sample feature map and the first external parameter matrix Mk.

[0084] For example, a first intermediate sample feature map is generated based on the similarity between the first sample feature map and the first extrinsic parameter matrix.

[0085] 2) Generate a second intermediate sample feature map based on the first intermediate sample feature map and the second external parameter matrix Mv.

[0086] For example, a second intermediate sample feature map is generated based on the product of the first intermediate sample feature map and the second extrinsic parameter matrix.

[0087] 3) Generate the second sample feature map based on the second intermediate sample feature map.

[0088] For example, an activation function is used to process the second intermediate sample feature map to obtain the third intermediate sample feature map. Next, the second sample feature map is generated based on the distance between the first sample feature map and the first extrinsic parameter matrix, and the third intermediate sample feature map.

[0089] For example, the second sample feature map As shown in formula (4).

[0090] (4)

[0091] In formula (4), For activation function, For similarity function, Corresponding to the second sample feature map, Corresponding to the first external parameter matrix Mk, The corresponding second external parameter matrix Mv has parameters i and j as coordinates. for Compared to The distance.

[0092] For example, the third machine learning model is the Transformer model.

[0093] In step 26, a second recognition result of the sample image is generated based on the second sample feature map.

[0094] In step 27, the first machine learning model, the second machine learning model, and the third machine learning model are trained based on the second recognition result and the annotation information of the sample images.

[0095] For example, a loss function is generated based on the second recognition result and the annotation information of the sample image, and the first machine learning model, the second machine learning model, and the third machine learning model are trained using the loss function.

[0096] It should be noted here that... Figure 2 The illustrated embodiments and Figure 1 The difference in the illustrated embodiment is that, Figure 2 In the illustrated embodiment, after generating a first sample feature map using local and global sample feature maps of the sample image, a third machine learning model with an external attention mechanism is further used to process the first sample feature map to generate a second sample feature map. The first, second, and third machine learning models are then trained based on the second sample feature map. Because the third machine learning model with an external attention mechanism effectively addresses the inability of the first and second machine learning models with self-attention mechanisms to establish relationships between samples, it can more effectively identify various targets in the acquired image, such as low-lying obstacles.

[0097] Figure 3 This is a schematic diagram of the structure of an image recognition model training device according to an embodiment of the present disclosure.

[0098] like Figure 3 As shown, the image recognition model training device 30 is presented in the form of a general-purpose computing device. The image recognition model training device 30 includes a memory 31, a processor 32, and a bus 33 connecting different system components.

[0099] The memory 31 may include, for example, system memory, non-volatile storage media, etc. System memory may store, for example, an operating system, application programs, a boot loader, and other programs. System memory may include volatile storage media, such as random access memory (RAM) and / or cache memory. Non-volatile storage media may store, for example, instructions for a corresponding embodiment of at least one image recognition model training method being executed. Non-volatile storage media include, but are not limited to, disk storage, optical storage, flash memory, etc.

[0100] Processor 32 can be implemented using a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA) or other programmable logic devices, discrete hardware components such as discrete gates or transistors. Accordingly, each module, such as the acquisition module, calculation module, and adjustment module, can be implemented by executing instructions in the central processing unit (CPU) running memory to perform the corresponding steps, or by implementing dedicated circuitry to perform the corresponding steps.

[0101] For example, processor 32 is configured for memory-based instruction execution implementation such as Figures 1 to 2 The method involved in any of the embodiments.

[0102] Bus 33 can use any of the various bus architectures. For example, bus architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MCA) bus, and the Peripheral Component Interconnect (PCI) bus.

[0103] The interfaces 34, 35, and 36 of the image recognition model training device 30, as well as the memory 31 and processor 32, can be connected via bus 33. Input / output interface 34 provides a connection interface for input / output devices such as a monitor, mouse, and keyboard. Network interface 35 provides a connection interface for various networked devices. Storage interface 36 provides a connection interface for external storage devices such as floppy disks, USB flash drives, and SD cards.

[0104] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations thereof, can be implemented by computer-readable program instructions.

[0105] These computer-readable program instructions are provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable device to produce a machine, such that execution of the instructions by the processor produces means for implementing the functions specified in one or more boxes of the flowchart and / or block diagram.

[0106] These computer-readable program instructions may also be stored in a computer-readable storage medium. These instructions cause a computer to work in a particular manner to produce an article of manufacture, including instructions that implement the functions specified in one or more boxes in a flowchart and / or block diagram.

[0107] This disclosure may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects.

[0108] This disclosure also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement... Figures 1 to 2 The method involved in any of the embodiments.

[0109] This disclosure also provides a computer program product, including computer instructions, wherein the computer instructions, when executed by a processor, implement as follows: Figures 1 to 2 The method involved in any of the embodiments.

[0110] Figure 4 This is a schematic flowchart of an image recognition method according to an embodiment of the present disclosure. In some embodiments, the image recognition method is performed by an image recognition device and includes steps 41-46.

[0111] In step 41, the image acquired by the image acquisition device is obtained.

[0112] In step 42, image features are extracted from the image.

[0113] In step 43, the image features are processed using a first machine learning model with a self-attention mechanism to generate a local feature map.

[0114] It should be noted here that the first machine learning model utilizes... Figure 1 or Figure 2 The image recognition model is trained using the training method involved in any of the embodiments.

[0115] For example, the local feature map can be obtained using the above formula (1).

[0116] In step 44, a second machine learning model with a self-attention mechanism is used to process the local feature map to generate a global feature map.

[0117] It should be noted here that the second machine learning model utilizes... Figure 1 or Figure 2 The image recognition model is trained using the training method involved in any of the embodiments.

[0118] In some embodiments, local feature maps are aggregated to generate aggregated feature maps. Next, a second machine learning model is used to process the aggregated feature maps to generate global feature maps.

[0119] For example, the global feature map can be obtained using the above formula (2).

[0120] In step 45, a first feature map is generated based on the local feature map and the global feature map.

[0121] In some embodiments, local feature maps and global feature maps are fused to generate a first feature map.

[0122] For example, the global feature map is upsampled to generate a transformed feature map, where the size of the transformed feature map is the same as the size of the local feature map. Next, the local feature map and the transformed feature map are fused to generate a first feature map.

[0123] For example, the first feature map can be obtained using the above formula (3).

[0124] In step 46, a first recognition result of the image is generated based on the first feature map.

[0125] Figure 5 This is a schematic flowchart of an image recognition method according to another embodiment of the present disclosure. In some embodiments, the image recognition method is performed by an image recognition device and includes steps 51-57.

[0126] In step 51, the image acquired by the image acquisition device is obtained.

[0127] In step 52, image features are extracted from the image.

[0128] In step 53, the image features are processed using a first machine learning model with a self-attention mechanism to generate a local feature map.

[0129] It should be noted here that the first machine learning model utilizes... Figure 1 or Figure 2 The image recognition model is trained using the training method involved in any of the embodiments.

[0130] For example, the local feature map can be obtained using the above formula (1).

[0131] In step 54, a second machine learning model with a self-attention mechanism is used to process the local feature map to generate a global feature map.

[0132] It should be noted here that the second machine learning model utilizes... Figure 1 or Figure 2 The image recognition model is trained using the training method involved in any of the embodiments.

[0133] In some embodiments, local feature maps are aggregated to generate aggregated feature maps. Next, a second machine learning model is used to process the aggregated feature maps to generate global feature maps.

[0134] For example, the global feature map can be obtained using the above formula (2).

[0135] In step 55, a first feature map is generated based on the local feature map and the global feature map.

[0136] In some embodiments, local feature maps and global feature maps are fused to generate a first feature map.

[0137] For example, the global feature map is upsampled to generate a transformed feature map, where the size of the transformed feature map is the same as the size of the local feature map. Next, the local feature map and the transformed feature map are fused to generate a first feature map.

[0138] For example, the first feature map can be obtained using the above formula (3).

[0139] In step 56, the first feature map is processed using a third machine learning model with an external attention mechanism to generate the second feature map.

[0140] It should be noted here that the third machine learning model utilizes... Figure 2 The image recognition model is trained using the training method involved in any of the embodiments.

[0141] In some embodiments, the processing of the first feature map includes the following:

[0142] 1) Generate a first intermediate feature map based on the first feature map and the first extrinsic parameter matrix.

[0143] For example, a first intermediate feature map is generated based on the similarity between the first feature map and the first extrinsic parameter matrix.

[0144] 2) Generate a second intermediate feature map based on the first intermediate feature map and the second extrinsic parameter matrix.

[0145] For example, a second intermediate feature map is generated based on the product of the first intermediate feature map and the second extrinsic parameter matrix.

[0146] 3) Generate a second feature map based on the second intermediate feature map.

[0147] For example, an activation function is used to process the second intermediate feature map to obtain a third intermediate feature map. Next, a second feature map is generated based on the distance between the first feature map and the first extrinsic parameter matrix, and the third intermediate feature map.

[0148] For example, the second feature map can be obtained using the above formula (3).

[0149] In step 57, a second recognition result of the image is generated based on the second feature map.

[0150] Figure 6 This is a schematic diagram of the structure of an image recognition device according to an embodiment of the present disclosure.

[0151] like Figure 6 As shown, the image recognition device 60 includes a memory 61, a processor 62, a bus 63 connecting different system components, an input / output interface 64, a network interface 65, and a storage interface 66. Figure 6 and Figure 3 The difference is that, in Figure 6 In the illustrated embodiment, processor 62 is configured to implement memory-based instruction execution as follows: Figures 4 to 5 The method involved in any of the embodiments.

[0152] This disclosure also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement... Figures 4 to 5 The method involved in any of the embodiments.

[0153] This disclosure also provides a computer program product, including computer instructions, wherein the computer instructions, when executed by a processor, implement as follows: Figures 4 to 5 The method involved in any of the embodiments.

[0154] Figure 7 This is a schematic diagram of the structure of an intelligent driving device according to an embodiment of the present disclosure.

[0155] like Figure 7 As shown, the intelligent driving device includes an image recognition device 71 and an image acquisition device 72. The image recognition device 71 is... Figure 6 The image recognition device involved in any of the embodiments.

[0156] The image acquisition device 72 is configured to acquire images and send the acquired images to the image recognition device 71 so that the image recognition device 71 can identify various targets in the acquired images.

[0157] In some embodiments, intelligent driving devices include driverless vehicles.

[0158] It should be noted that by configuring the aforementioned image recognition device in autonomous vehicles, it is possible to effectively capture both fine-grained local information and coarse-grained global information. At the same time, by utilizing a hybrid model of machine learning models with self-attention and machine learning models with external attention mechanisms, it is possible to effectively capture the interrelationships between different features, thereby effectively improving the accuracy and recognition efficiency of target objects such as low obstacles.

[0159] In some embodiments, the functional modules described above may be implemented as general-purpose processors, programmable logic controllers (PLCs), digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or any suitable combination thereof for performing the functions described herein.

[0160] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0161] The description in this disclosure is provided for illustrative and descriptive purposes only and is not intended to be exhaustive or to limit the disclosure to its forms. Many modifications and variations will be apparent to those skilled in the art. The embodiments were chosen and described in order to better illustrate the principles and practical application of this disclosure and to enable those skilled in the art to understand this disclosure and to design various embodiments with various modifications suitable for a particular purpose.

Claims

1. A method for training an image recognition model, comprising: Extract sample features from the sample images; The sample features are processed using a first machine learning model with a self-attention mechanism to generate a local sample feature map. The local sample feature map is processed using a second machine learning model with a self-attention mechanism to generate a global sample feature map. A first sample feature map is generated based on the local sample feature map and the global sample feature map; Based on the first sample feature map, a first recognition result of the sample image is generated; Based on the first recognition result and the annotation information of the sample image, the first machine learning model and the second machine learning model are trained.

2. The image recognition model training method according to claim 1, wherein, The step of generating the first sample feature map based on the local sample feature map and the global sample feature map includes: The local sample feature map and the global sample feature map are fused to generate the first sample feature map.

3. The image recognition model training method according to claim 2, wherein, The step of fusing the local sample feature map and the global sample feature map includes: The global sample feature map is upsampled to generate a transformed sample feature map, wherein the size of the transformed sample feature map is the same as the size of the local sample feature map; The local sample feature map and the transformed sample feature map are fused to generate the first sample feature map.

4. The image recognition model training method according to claim 1, wherein, The process of processing the local sample feature map using a second machine learning model with a self-attention mechanism includes: The local sample feature maps are aggregated to generate aggregated sample feature maps; The aggregated sample feature map is processed using the second machine learning model to generate the global sample feature map.

5. The image recognition model training method according to any one of claims 1-4, further comprising: The first sample feature map is processed using a third machine learning model with an external attention mechanism to generate a second sample feature map. Based on the second sample feature map, a second recognition result of the sample image is generated; Based on the second recognition result and the annotation information of the sample image, the first machine learning model, the second machine learning model, and the third machine learning model are trained.

6. The image recognition model training method according to claim 5, wherein, The processing of the first sample feature map includes: A first intermediate sample feature map is generated based on the first sample feature map and the first extrinsic parameter matrix; A second intermediate sample feature map is generated based on the first intermediate sample feature map and the second extrinsic parameter matrix; The second sample feature map is generated based on the second intermediate sample feature map.

7. The image recognition model training method according to claim 6, wherein, The step of generating the first intermediate sample feature map based on the first sample feature map and the first extrinsic parameter matrix includes: The first intermediate sample feature map is generated based on the similarity between the first sample feature map and the first extrinsic parameter matrix.

8. The image recognition model training method according to claim 6, wherein, The step of generating the second intermediate sample feature map based on the first intermediate sample feature map and the second extrinsic parameter matrix includes: The second intermediate sample feature map is generated based on the product of the first intermediate sample feature map and the second extrinsic parameter matrix.

9. The image recognition model training method according to claim 6, wherein, The step of generating the second sample feature map based on the second intermediate sample feature map includes: The second intermediate sample feature map is processed using an activation function to obtain the third intermediate sample feature map; The second sample feature map is generated based on the distance between the first sample feature map and the first extrinsic parameter matrix, and the third intermediate sample feature map.

10. An image recognition model training device, comprising: Memory; A processor, coupled to a memory, is configured to execute instructions stored in the memory to implement the image recognition model training method as described in any one of claims 1-9.

11. An image recognition method, comprising: Acquire images captured by the image acquisition device; Extract the image features of the image; The image features are processed using a first machine learning model with a self-attention mechanism to generate local feature maps; The local feature map is processed using a second machine learning model with a self-attention mechanism to generate a global feature map, wherein the first machine learning model and the second machine learning model are trained using the image recognition model training method of any one of claims 1-9; A first feature map is generated based on the local feature map and the global feature map; Based on the first feature map, a first recognition result of the image is generated.

12. The image recognition method according to claim 11, wherein, The step of generating the first feature map based on the local feature map and the global feature map includes: The local feature map and the global feature map are fused to generate the first feature map.

13. The image recognition method according to claim 12, wherein, The step of fusing the local feature map and the global feature map includes: The global feature map is upsampled to generate a transformed feature map, wherein the size of the transformed feature map is the same as the size of the local feature map; The local feature map and the transformed feature map are fused to generate the first feature map.

14. The image recognition method according to claim 11, wherein, The process of processing the local feature map using a second machine learning model with a self-attention mechanism includes: The local feature maps are then aggregated to generate aggregated feature maps; The aggregated feature map is processed using the second machine learning model to generate the global feature map.

15. The image recognition method according to any one of claims 11-14, further comprising: The first feature map is processed using a third machine learning model with an external attention mechanism to generate a second feature map, wherein the third machine learning model is trained using the image recognition training method of any one of claims 5-9; A second recognition result for the image is generated based on the second feature map.

16. The image recognition method according to claim 15, wherein, The processing of the first feature map includes: A first intermediate feature map is generated based on the first feature map and the first extrinsic parameter matrix; A second intermediate feature map is generated based on the first intermediate feature map and the second extrinsic parameter matrix; The second feature map is generated based on the second intermediate feature map.

17. The image recognition method according to claim 16, wherein, The step of generating the first intermediate feature map based on the first feature map and the first extrinsic parameter matrix includes: The first intermediate feature map is generated based on the similarity between the first feature map and the first extrinsic parameter matrix.

18. The image recognition method according to claim 16, wherein, The step of generating the second intermediate feature map based on the first intermediate feature map and the second extrinsic parameter matrix includes: The second intermediate feature map is generated based on the product of the first intermediate feature map and the second extrinsic parameter matrix.

19. The image recognition method according to claim 16, wherein, The step of generating the second feature map based on the second intermediate feature map includes: The second intermediate feature map is processed using an activation function to obtain the third intermediate feature map; The second feature map is generated based on the distance between the first feature map and the first extrinsic parameter matrix, and the third intermediate feature map.

20. An image recognition device, comprising: Memory; A processor, coupled to a memory, is configured to execute instructions stored in the memory to implement the image recognition method as described in any one of claims 11-19.

21. An intelligent driving device, comprising: The image recognition device as described in claim 20; An image acquisition device is configured to acquire images.

22. The intelligent driving device according to claim 21, wherein, The intelligent driving equipment includes driverless vehicles.

23. A computer-readable storage medium, wherein, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement any one of the image recognition model training methods as claimed in claims 1-9 and the image recognition methods as claimed in claims 11-19.

24. A computer program product comprising computer instructions, wherein the computer instructions, when executed by a processor, implement any one of the image recognition model training methods as claimed in claims 1-9 and the image recognition methods as claimed in claims 11-19.