A data processing method and apparatus

CN116503594BActive Publication Date: 2026-10-30HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310335042.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-24
Publication Date
2026-10-30
Estimated Expiration
2043-03-24

AI Technical Summary

Technical Problem

[0006]然而,这类方法迁移的风格与真实场景仍然存在分布差异,所以依然无法覆盖全部的真实场景,泛化效果有限,进而会导致模型的精度较差

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116503594B_ABST
    Figure CN116503594B_ABST
Patent Text Reader

Abstract

A data processing method applied to image processing, such as image segmentation or object detection, the method comprising: obtaining first image features corresponding to an image; fusing a plurality of pre-trained distribution features according to the similarity between the distribution feature of the first image features and each of the plurality of pre-trained distribution features, to obtain a second distribution feature; adjusting the first image features based on the second distribution feature to obtain second image features; and processing the image according to the second image features to obtain an image processing result of the image. The present application represents a style space by a plurality of pre-trained style features, and then fuses the plurality of distribution features according to the similarity between the distribution feature of the first image features and each of the pre-trained distribution features, to map the original image style into the style space to obtain a more accurate style expression, thereby improving the image processing accuracy of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, and more particularly to a data processing method and apparatus thereof. Background Technology

[0002] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.

[0003] Image segmentation helps distinguish the relationships between objects and has wide applications in image enhancement, image editing, and other fields. However, training datasets often cannot cover all real-world scenes, meaning there is a domain shift between the training data and the real-world scene. Furthermore, supervised learning-based models have limited generalization ability, leading to poor performance during deployment.

[0004] In safety-critical business scenarios such as autonomous driving, there are high requirements for the generalization ability of models during deployment. This means that the trained model must have good prediction results in multiple unknown real-world scenarios (such as nighttime, extreme weather, and different road structures). Therefore, improving the model's generalization ability in different scenarios is extremely important and helps to enhance product competitiveness.

[0005] One existing strategy to improve model generalization is to expand the coverage of the data by using image style transfer algorithms to transfer the styles of images from real-world scenes to the training dataset, thus enriching the style diversity of the training dataset. This method generates a series of images with different styles as training samples using a pre-trained style transfer model, and obtains the final domain-generalized segmentation model after a certain number of iterations.

[0006] However, the styles transferred by these methods still differ from the distribution of real-world scenarios, so they still cannot cover all real-world scenarios, resulting in limited generalization effects and consequently poor model accuracy. Summary of the Invention

[0007] This application provides a data processing method that can...

[0008] In a first aspect, this application provides a data processing method, comprising: acquiring a first image feature corresponding to an image; fusing the multiple distribution features according to the distribution features of the first image feature and the similarity between each distribution feature in a pre-trained set of multiple distribution features to obtain a second distribution feature; adjusting the first image feature based on the second distribution feature to obtain a second image feature; and processing the image according to the second image feature to obtain an image processing result of the image.

[0009] The style space is represented by multiple pre-trained style features. Then, by fusing the multiple distribution features based on the similarity between the distribution features of the first image feature and each of the pre-trained distribution features, the original image style is mapped to this style space to obtain a more accurate style expression. Because this style expression is more accurate, the model's image processing accuracy is improved.

[0010] In one possible implementation, the image processing result is specifically the image segmentation result or the object detection result.

[0011] In one possible implementation, the first image feature includes features from multiple channels, and the distribution features of the first image feature include the distribution features corresponding to each of the multiple channels; the step of fusing the multiple distribution features based on the similarity between the distribution features of the first image feature and each of the pre-trained multiple distribution features includes: fusing the multiple distribution features based on the similarity between the distribution features corresponding to each channel and each of the pre-trained multiple distribution features to obtain a second distribution feature, the second distribution feature including the fused distribution features corresponding to each of the multiple channels.

[0012] By setting the objects for calculating distribution features to channel granularity in the above manner, the expressive power and accuracy of style can be improved.

[0013] Optionally, the granularity of calculating the distribution features can be smaller than the channel (e.g., some feature points of a channel, or some dimensions within a channel) or larger than the channel (e.g., feature maps of multiple channels), and this application does not limit this.

[0014] In one possible implementation, the distribution characteristics include mean and variance.

[0015] In one possible implementation, processing the image based on the second image features to obtain the image processing result includes: determining the semantic category to which each feature point belongs based on the similarity between each feature point and multiple semantic features in the second image features, wherein each semantic feature corresponds to a semantic category, and the semantic category is used to indicate the image processing result of the image.

[0016] The image processing result can be an image segmentation result or an object detection result, and the semantic category can indicate which image segmentation region or object detection region it belongs to.

[0017] By using the above method, the semantics of images in different domains are represented in the form of semantic bases, and the semantic category of the current pixel is determined based on the distance between the current pixel features and the semantic bases. This avoids learning the segmentation head, reduces the learning parameters, and improves the generalization ability of the model.

[0018] In one possible implementation, the plurality of semantic features consist of multiple sets of semantic features, each set of semantic features including at least one semantic feature, and each set of semantic features corresponds to a class of image styles.

[0019] For example, multiple semantic categories can be set for different image styles. The semantic categories corresponding to different image styles are different and can overlap (or not overlap at all).

[0020] Secondly, this application provides a data processing method, including: The first image feature is obtained by using a feature extraction grid. Based on the distribution features of the first image features and the similarity between each distribution feature, the multiple distribution features are fused to obtain the second distribution feature; Based on the second distribution feature, the first image feature is adjusted to obtain the second image feature; Based on the second image feature, the image is processed to obtain the image processing result; The feature extraction grid is updated based on the image processing results and the corresponding ground truth values.

[0021] The style space is represented by multiple pre-trained style features. Then, by fusing the multiple distribution features based on the similarity between the distribution features of the first image feature and each of the pre-trained distribution features, the original image style is mapped to this style space to obtain a more accurate style expression. Because this style expression is more accurate, the model's image processing accuracy is improved.

[0022] In one possible implementation, the method further includes: Based on the distribution features of the first image features and the corresponding ground truth values, the plurality of distribution features are updated.

[0023] In one possible implementation, processing the image based on the second image feature to obtain the image processing result includes: Based on the similarity between each feature point and multiple semantic features in the second image features, the semantic category to which each feature point belongs is determined, wherein each semantic feature corresponds to a semantic category, and the semantic category is used to indicate the image processing result of the image.

[0024] In one possible implementation, the semantic features include target semantic features corresponding to the target semantic category, and the method further includes: The target semantic features are updated based on the mean value of feature points belonging to the target semantic category in the second image features, and the target semantic features.

[0025] Thirdly, this application provides a data processing apparatus, comprising: The processing module is used to obtain the first image feature corresponding to the image; Based on the similarity between the distribution features of the first image features and each distribution feature in the pre-trained multiple distribution features, the multiple distribution features are fused to obtain the second distribution feature; Based on the second distribution feature, the first image feature is adjusted to obtain the second image feature; Based on the second image feature, the image is processed to obtain the image processing result.

[0026] The style space is represented by multiple pre-trained style features. Then, by fusing the multiple distribution features based on the similarity between the distribution features of the first image feature and each of the pre-trained distribution features, the original image style is mapped to this style space to obtain a more accurate style expression. Because this style expression is more accurate, the model's image processing accuracy is improved.

[0027] In one possible implementation, the image processing result is specifically the image segmentation result or the object detection result.

[0028] In one possible implementation, the first image feature includes features of multiple channels, and the distribution features of the first image feature include the distribution features corresponding to each of the multiple channels; The processing module is specifically used to fuse the multiple distribution features based on the similarity between the distribution features corresponding to each channel and each distribution feature in the multiple pre-trained distribution features to obtain a second distribution feature, wherein the second distribution feature includes the fused distribution features corresponding to each of the multiple channels.

[0029] In one possible implementation, the distribution characteristics include mean and variance.

[0030] In one possible implementation, the processing module is specifically configured to determine the semantic category to which each feature point belongs based on the similarity between each feature point in the second image features and multiple semantic features, wherein each semantic feature corresponds to a semantic category, and the semantic category is used to indicate the image processing result of the image.

[0031] In one possible implementation, the plurality of semantic features consist of multiple sets of semantic features, each set of semantic features including at least one semantic feature, and each set of semantic features corresponds to a class of image styles.

[0032] Fourthly, this application provides a data processing apparatus, comprising: The processing module is used to obtain the first image features corresponding to the image through the feature extraction grid; Based on the distribution features of the first image features and the similarity between each distribution feature, the multiple distribution features are fused to obtain the second distribution feature; Based on the second distribution feature, the first image feature is adjusted to obtain the second image feature; Based on the second image feature, the image is processed to obtain the image processing result; An update module is used to update the feature extraction grid based on the image processing results and the corresponding ground truth values.

[0033] In one possible implementation, the update module is further configured to update the plurality of distribution features based on the distribution features of the first image features and the corresponding ground truth values.

[0034] In one possible implementation, the processing module is specifically configured to determine the semantic category to which each feature point belongs based on the similarity between each feature point in the second image features and multiple semantic features, wherein each semantic feature corresponds to a semantic category, and the semantic category is used to indicate the image processing result of the image.

[0035] In one possible implementation, the semantic features include target semantic features corresponding to the target semantic category, and the updating module is further configured to update the target semantic features based on the mean of the feature points in the second image features that belong to the target semantic category and the target semantic features.

[0036] Fifthly, embodiments of this application provide a data processing apparatus, which may include a memory, a processor, and a bus system, wherein the memory is used to store a program, and the processor is used to execute the program in the memory to perform the methods described in the first aspect and any optional methods described in the first aspect and any optional methods described in the second aspect.

[0037] In a sixth aspect, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the methods described in the first aspect and any optional methods thereof, as well as the methods described in the second aspect and any optional methods thereof.

[0038] In a seventh aspect, embodiments of this application provide a computer program that, when run on a computer, causes the computer to perform the methods described in the first aspect and any optional methods thereof, as well as the methods described in the second aspect and any optional methods thereof.

[0039] Eighthly, this application provides a chip system including a processor for supporting an execution data processing device in performing the functions involved in the foregoing aspects, such as transmitting or processing data involved in the foregoing methods; or, information. In one possible design, the chip system further includes a memory for storing program instructions and data necessary for the execution device or training device. This chip system may be composed of chips or may include chips and other discrete devices. Attached Figure Description

[0040] Figure 1A A structural diagram illustrating the main framework of artificial intelligence; Figure 1B Hezhi Figure 1C This is a schematic diagram of the application system framework of this application; Figure 1D This is a schematic diagram of an optional hardware structure for a terminal. Figure 2 This is a schematic diagram of the structure of a server; Figure 3 This is a schematic diagram of a system architecture according to this application; Figure 4 A process for providing a cloud service; Figure 5A This is an illustration of an application scenario; Figure 5BThis is a schematic diagram of a network structure; Figure 5C This is a schematic diagram of a network structure; Figure 6 A flowchart illustrating a data processing method provided in an embodiment of this application; Figures 7 to 10 A flowchart illustrating a data processing method provided in an embodiment of this application; Figure 11A This is a schematic diagram of one architecture of this application; Figure 11B and Figure 11C This is a schematic diagram illustrating one of the beneficial effects of this application; Figure 12 A schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application; Figure 13 A schematic diagram of the structure of the execution device provided in the embodiments of this application; Figure 14 A schematic diagram of the structure of the training device provided in the embodiments of this application; Figure 15 This is a schematic diagram of a chip structure provided in an embodiment of this application. Detailed Implementation

[0041] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.

[0042] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0043] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0044] The terms “substantially,” “about,” and similar terms used herein are used as approximations, not as terms of degree, and are intended to take into account the inherent biases of measurements or calculations known to those skilled in the art. Furthermore, the term “may” used in describing embodiments of this application means “one or more possible embodiments.” The terms “use,” “using,” and “used” used herein are to be considered synonymous with the terms “utilize,” “utilizing,” and “utilized,” respectively. Additionally, the term “exemplary” is intended to refer to an instance or illustration.

[0045] First, the overall workflow of the artificial intelligence system is described; please refer to [link / reference]. Figure 1A , Figure 1A The diagram illustrates a structural framework for artificial intelligence (AI). The framework is further elaborated below along two dimensions: the "Intelligent Information Chain" (horizontal axis) and the "IT Value Chain" (vertical axis). The "Intelligent Information Chain" reflects a series of processes from data acquisition to processing. For example, it could be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, and intelligent execution and output. In this process, data undergoes a condensation process of "data—information—knowledge—wisdom." The "IT Value Chain" reflects the value that AI brings to the information technology industry, from the underlying infrastructure of human intelligence and information (provided and processed by technology) to the industrial ecosystem of the system.

[0046] (1) Infrastructure

[0047] Infrastructure provides computing power to support artificial intelligence systems, enabling communication with the external world and providing support through a basic platform. This communication occurs through sensors; computing power is provided by intelligent chips (hardware acceleration chips such as CPUs, NPUs, GPUs, ASICs, and FPGAs); and the basic platform includes distributed computing frameworks and related platform guarantees and support, which may include cloud storage and computing, interconnected networks, etc. For example, sensors communicate with the outside world to acquire data, and this data is provided to intelligent chips in the distributed computing system provided by the basic platform for computation.

[0048] (2) Data

[0049] The data at the next layer of infrastructure is used to represent the data sources in the field of artificial intelligence. The data involves graphics, images, voice, text, and IoT data from traditional devices, including business data from existing systems and sensor data such as force, displacement, liquid level, temperature, and humidity.

[0050] (3) Data processing

[0051] Data processing typically includes methods such as data training, machine learning, deep learning, search, reasoning, and decision-making.

[0052] Among them, machine learning and deep learning can perform intelligent information modeling, extraction, preprocessing, and training of data by symbolizing and formalizing it.

[0053] Reasoning refers to the process in which, in a computer or intelligent system, the machine thinks and solves problems by simulating human intelligent reasoning, based on reasoning control strategies and using formalized information. Typical functions include search and matching.

[0054] Decision-making refers to the process of making decisions based on intelligent information after reasoning, and it typically provides functions such as classification, sorting, and prediction.

[0055] (4) General ability

[0056] After the data processing mentioned above, the results of the data processing can be used to form some general capabilities, such as algorithms or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.

[0057] (5) Smart products and industry applications

[0058] Intelligent products and industry applications refer to products and applications of artificial intelligence systems in various fields. They are the encapsulation of overall artificial intelligence solutions, productizing intelligent information decision-making and realizing practical applications. Their application areas mainly include: intelligent terminals, intelligent transportation, intelligent healthcare, autonomous driving, smart cities, etc.

[0059] This application can be applied to the field of image processing in the field of artificial intelligence. The following will take image processing as an example to introduce several application scenarios that have been implemented in products.

[0060] First, let's introduce the application scenarios of this application.

[0061] This application may be applied, but is not limited to, to applications with image processing capabilities (hereinafter referred to as image processing applications) or cloud services provided by cloud-side servers, which will be described in detail below: I. Image Processing Applications The product form of this application embodiment can be an image processing application, specifically an application with image segmentation capabilities. Image processing applications can run on terminal devices or cloud-based servers.

[0062] In one possible implementation, image processing applications can perform tasks such as image segmentation or object detection based on the input image, and obtain processing results, which can be image segmentation results (masked regions) and detection boxes.

[0063] In one possible implementation, a user can open an image processing application installed on a terminal device and input an image. The image processing application can process the image using the methods provided in the embodiments of this application and present the processing result to the user (the presentation method may include, but is not limited to, displaying, saving, uploading to the cloud, etc.).

[0064] In one possible implementation, a user can open an image processing application installed on a terminal device and input an image. The image processing application can then send the image to a cloud-based server. The cloud-based server processes the image using the method provided in this application embodiment and sends the processing result back to the terminal device. The terminal device can then present the processing result to the user (the presentation method may include, but is not limited to, displaying, saving, or uploading to the cloud).

[0065] The image processing application in this application will be described below, focusing on its functional architecture and the product architecture that implements its functions.

[0066] Reference Figure 1B , Figure 1B This is a schematic diagram of the functional architecture of the image processing application in the embodiments of this application: In one possible implementation, such as Figure 1B As shown, the image processing application 102 can receive input parameters 101 (e.g., including an image) and generate a processing result 103. The image processing application 102 can be executed on at least one computer system (for example) and includes computer code that, when executed by one or more computers, causes the computers to perform the methods provided in the embodiments of this application.

[0067] Reference Figure 1C , Figure 1C This is a schematic diagram of the entity architecture for running an image processing application in this embodiment of the application: See Figure 1C , Figure 1C A schematic diagram of a system architecture is shown. The system may include a terminal 100 and a server 200. The server 200 may include one or more servers (…). Figure 1C (The example includes a server) Server 200 can provide the methods provided in the embodiments of this application to one or more terminals.

[0068] The terminal 100 may have an image processing application installed. The application and webpage can provide an interface. The terminal 100 can receive relevant parameters input by the user on the image processing interface and send the parameters to the server 200. The server 200 can obtain the processing result based on the received parameters and return the processing result to the terminal 100.

[0069] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the processing result based on the received parameters on its own, without the need for the server to cooperate. This application embodiment is not limited to this.

[0070] The following description Figure 1C The product form of the mid-terminal 100; The terminal 100 in this application embodiment can be a mobile phone, tablet computer, wearable device, vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), etc., and this application embodiment does not impose any restrictions on it.

[0071] Figure 1D A schematic diagram of an optional hardware structure for terminal 100 is shown.

[0072] refer to Figure 1D As shown, the terminal 100 may include a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), a processor 170, an external interface 180, a power supply 190, and other components. Those skilled in the art will understand that... Figure 1D These are merely examples of terminals or multi-functional devices and do not constitute a limitation on terminals or multi-functional devices. They may include more or fewer components than shown in the illustration, or combine certain components, or use different components.

[0073] The input unit 130 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the portable multi-functional device. Specifically, the input unit 130 may include a touchscreen 131 (optional) and / or other input devices 132. The touchscreen 131 can collect touch operations performed by the user on or near it (such as operations performed by the user using fingers, knuckles, styluses, or any suitable object on or near the touchscreen), and drive the corresponding connection devices according to a pre-set program. The touchscreen can detect the user's touch actions, convert the touch actions into touch signals and send them to the processor 170, and can receive and execute commands sent by the processor 170; the touch signal includes at least touch point coordinate information. The touchscreen 131 can provide an input interface and an output interface between the terminal 100 and the user. In addition, various types of touchscreens, such as resistive, capacitive, infrared, and surface acoustic wave, can be used to implement the touchscreen. Besides the touchscreen 131, the input unit 130 may also include other input devices. Specifically, other input devices 132 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.

[0074] The input device 132 can receive input images, text, etc.

[0075] The display unit 140 can be used to display information input by the user or information provided to the user, various menus of the terminal 100, interactive interfaces, file display, and / or playback of any multimedia file. In this embodiment, the display unit 140 can be used to display the interface of an image processing application, processing results, etc.

[0076] The memory 120 can be used to store instructions and data. The memory 120 may primarily include an instruction storage area and a data storage area. The data storage area can store various types of data, such as multimedia files and text. The instruction storage area can store software units such as operating systems, applications, and instructions required for at least one function, or subsets or extended sets thereof. It may also include non-volatile random access memory. It provides the processor 170 with hardware, software, and data resources for managing the computing device, supporting control software and applications. It is also used for storing multimedia files, as well as storing running programs and applications.

[0077] The processor 170 is the control center of the terminal 100. It connects various parts of the terminal 100 via various interfaces and lines. By running or executing instructions stored in the memory 120 and calling data stored in the memory 120, it performs various functions of the terminal 100 and processes data, thereby controlling the terminal device as a whole. Optionally, the processor 170 may include one or more processing units; preferably, the processor 170 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 170. In some embodiments, the processor and memory can be implemented on a single chip; in some embodiments, they can also be implemented separately on independent chips. The processor 170 can also be used to generate corresponding operation control signals, send them to the corresponding components of the computing processing device, read and process data in the software, especially read and process data and programs in the memory 120, so that the various functional modules therein perform corresponding functions, thereby controlling the corresponding components to act according to the instructions.

[0078] The memory 120 can be used to store software code related to the data processing method, and the processor 170 can execute the steps of the chip's data processing method, and can also schedule other units (such as the above-mentioned input unit 130 and display unit 140) to achieve the corresponding functions.

[0079] The radio frequency unit 110 (optional) can be used for receiving and transmitting signals during information transmission or calls. For example, it can receive downlink information from the base station and process it for the processor 170; additionally, it can transmit uplink data to the base station. Typically, the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, the radio frequency unit 110 can also communicate wirelessly with network devices and other devices. This wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0080] In this embodiment of the application, the radio frequency unit 110 can send an image to the server 200 and receive the processing result sent by the server 200.

[0081] It should be understood that the radio frequency unit 110 is optional and can be replaced with other communication interfaces, such as a network port.

[0082] The terminal 100 also includes a power supply 190 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 170 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.

[0083] Terminal 100 also includes an external interface 180, which can be a standard Micro USB interface or a multi-pin connector, which can be used to connect terminal 100 to other devices for communication or to connect a charger to charge terminal 100.

[0084] Although not shown, terminal 100 may also include a flash, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with various functions, etc., which will not be described in detail here. Some or all of the methods described below can be applied to, for example... Figure 1D In the terminal 100 shown.

[0085] The following description Figure 1C The product form of the mid-range server 200; Figure 2 A structural diagram of a server 200 is provided, as follows: Figure 2 As shown, server 200 includes bus 201, processor 202, communication interface 203, and memory 204. Processor 202, memory 204, and communication interface 203 communicate with each other via bus 201.

[0086] Bus 201 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 2 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0087] The processor 202 can be any one or more of the following processors: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP).

[0088] Memory 204 may include volatile memory, such as random access memory (RAM). Memory 204 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard drive (HDD), or solid state drive (SSD).

[0089] The memory 204 can be used to store software code related to the data processing method, and the processor 202 can execute the steps of the chip's data processing method, and can also schedule other units to achieve corresponding functions.

[0090] It should be understood that the aforementioned terminal 100 and server 200 can be centralized or distributed devices. The processors (e.g., processor 170 and processor 202) in the aforementioned terminal 100 and server 200 can be hardware circuits (such as application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), general-purpose processors, digital signal processors (DSPs), microprocessors or microcontrollers, etc.) or combinations of these hardware circuits. For example, the processor can be a hardware system with instruction execution capabilities, such as a CPU or DSP, or a hardware system without instruction execution capabilities, such as an ASIC or FPGA, or a combination of the aforementioned hardware systems without instruction execution capabilities and hardware systems with instruction execution capabilities.

[0091] It should be understood that the steps related to the model inference process in the embodiments of this application involve AI-related operations. When performing AI operations, the instruction execution architecture of the terminal device and server is not limited to the processor-memory architecture described above. The following section will further explain... Figure 3 The system architecture provided in the embodiments of this application will be described in detail.

[0092] Figure 3 This is a schematic diagram of the system architecture provided for an embodiment of this application. Figure 3 As shown, the system architecture 500 includes an execution device 510, a training device 520, a database 530, a client device 540, a data storage system 550, and a data acquisition device 560.

[0093] The execution device 510 includes a calculation module 511, an I / O interface 512, a preprocessing module 513, and a preprocessing module 514. The calculation module 511 may include a target model / rule 501, while the preprocessing modules 513 and 514 are optional.

[0094] The execution device 510 can be a terminal device or a server that runs the aforementioned image processing applications.

[0095] The data acquisition device 560 is used to acquire training samples. Training samples can be multiple images, etc. After acquiring the training samples, the data acquisition device 560 stores these training samples in the database 530.

[0096] The training device 520 can maintain training samples in the database 530 and the neural network to be trained (such as the feature extraction network in the embodiments of this application) to obtain the target model / rule 501.

[0097] It should be understood that the training device 520 can perform a pre-training process on the neural network to be trained based on the training samples maintained in the database 530, or fine-tune the model based on the pre-training.

[0098] It should be noted that in practical applications, the training samples maintained in database 530 may not all come from the data acquisition device 560; they may also be received from other devices. Furthermore, it should be noted that training device 520 may not necessarily train the target model / rule 501 entirely based on the training samples maintained in database 530; it may also obtain training samples from the cloud or other sources for model training. The above description should not be construed as limiting the embodiments of this application.

[0099] The target model / rule 501 trained using training device 520 can be applied to different systems or devices, such as... Figure 3 The execution device 510 shown can be a terminal, such as a mobile phone terminal, tablet computer, laptop computer, augmented reality (AR) / virtual reality (VR) device, vehicle terminal, etc., or it can be a server, etc.

[0100] Specifically, the training device 520 can transfer the trained model to the execution device 510.

[0101] exist Figure 3 In the execution device 510, an input / output (I / O) interface 512 is configured for data interaction with external devices. Users can input data (such as images in the embodiments of this application) into the I / O interface 512 through the client device 540.

[0102] Preprocessing modules 513 and 514 are used to preprocess the input data received from the I / O interface 512. It should be understood that preprocessing modules 513 and 514 may be absent, or only one preprocessing module may be used. When preprocessing modules 513 and 514 are absent, the calculation module 511 can be used directly to process the input data.

[0103] During the preprocessing of input data by the execution device 510, or during the calculation module 511 of the execution device 510 performing calculations and other related processes, the execution device 510 can call data, code, etc. in the data storage system 550 for corresponding processing, or store the data, instructions, etc. obtained from the corresponding processing into the data storage system 550.

[0104] Finally, the I / O interface 512 provides the processing result to the client device 540, thereby providing it to the user.

[0105] exist Figure 3 In the illustrated scenario, the user can manually provide input data, which can be done through the interface provided by I / O interface 512. Alternatively, the client device 540 can automatically send input data to I / O interface 512. If user authorization is required for the client device 540 to automatically send input data, the user can set the corresponding permissions in the client device 540. The user can view the output results of the execution device 510 on the client device 540, which can be presented in various forms such as display, sound, or animation. The client device 540 can also act as a data acquisition terminal, collecting the input data and output results of the input I / O interface 512 as shown in the figure, and storing them as new sample data in database 530. Alternatively, data can be collected directly from the I / O interface 512 without going through the client device 540, using the input data and output results of the input I / O interface 512 as shown in the figure, and storing them as new sample data in database 530.

[0106] It is worth noting that, Figure 3 This is merely a schematic diagram of a system architecture provided in an embodiment of this application. The positional relationships between the devices, components, modules, etc., shown in the diagram do not constitute any limitation. For example, in Figure 3 In this context, the data storage system 550 is an external storage device relative to the execution device 510. However, in other cases, the data storage system 550 may also be placed within the execution device 510. It should be understood that the aforementioned execution device 510 may be deployed within the client device 540.

[0107] From the inference side of the model: In this embodiment, the computing module 511 of the execution device 510 can obtain the code stored in the data storage system 550 to implement the steps related to the model reasoning process in this embodiment.

[0108] In this embodiment of the application, the computing module 511 of the execution device 510 may include hardware circuits (such as application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), general-purpose processors, digital signal processors (DSPs), microprocessors or microcontrollers, etc.) or combinations of these hardware circuits. For example, the training device 520 may be a hardware system with instruction execution capabilities, such as a CPU or DSP, or a hardware system without instruction execution capabilities, such as an ASIC or FPGA, or a combination of the aforementioned hardware systems without instruction execution capabilities and hardware systems with instruction execution capabilities.

[0109] Specifically, the computing module 511 of the execution device 510 can be a hardware system with the function of executing instructions. The steps related to the model inference process provided in this application embodiment can be software code stored in the memory. The computing module 511 of the execution device 510 can obtain the software code from the memory and execute the obtained software code to implement the steps related to the model inference process provided in this application embodiment.

[0110] It should be understood that the computing module 511 of the execution device 510 can be a combination of a hardware system without the function of executing instructions and a hardware system with the function of executing instructions. Some steps related to the model reasoning process provided in the embodiments of this application can also be implemented by the hardware system in the computing module 511 of the execution device 510 without the function of executing instructions, which is not limited here.

[0111] From the training side of the model: In this embodiment of the application, the training device 520 can access the memory ( Figure 3 (Not shown in the diagram, but can be integrated into the training device 520 or deployed separately from the training device 520) The code stored in the diagram implements the steps related to model training in the embodiments of this application.

[0112] In this embodiment of the application, the training device 520 may include hardware circuits (such as application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), general-purpose processors, digital signal processors (DSPs), microprocessors or microcontrollers, etc.) or combinations of these hardware circuits. For example, the training device 520 may be a hardware system with instruction execution capabilities, such as a CPU or DSP, or a hardware system without instruction execution capabilities, such as an ASIC or FPGA, or a combination of the aforementioned hardware systems without instruction execution capabilities and hardware systems with instruction execution capabilities.

[0113] It should be understood that the training device 520 can be a combination of a hardware system without the function of executing instructions and a hardware system with the function of executing instructions. Some steps related to the training of the neutralization model provided in the embodiments of this application can also be implemented by the hardware system in the training device 520 without the function of executing instructions, which is not limited here.

[0114] II. Image processing cloud services provided by the server: In one possible implementation, the server can provide image processing services to the client side through an application programming interface (API).

[0115] In this process, the terminal device can send relevant parameters (such as images) to the server through the API provided by the cloud. The server can then obtain the processing results based on the received parameters and return the processing results to the terminal.

[0116] The descriptions of the terminal and server are the same as those in the above embodiments, and will not be repeated here.

[0117] like Figure 4 The process of using an image processing cloud service provided by a cloud platform is shown.

[0118] 1. Activate and purchase content moderation services.

[0119] 2. Users can download the software development kit (SDK) corresponding to the content moderation service. Cloud platforms usually provide multiple development versions of the SDK for users to choose from according to their development environment needs, such as JAVA version SDK, Python version SDK, PHP version SDK, Android version SDK, etc.

[0120] 3. After downloading the corresponding version of the SDK to their local machine according to their needs, users can import the SDK project into their local development environment, configure and debug it in the local development environment, and develop other functions in the local development environment to form an application that integrates image processing capabilities.

[0121] 4. When an image processing application is used, it can trigger an image processing API call when image processing is required. When the application triggers the image processing function, it sends an API request to the running instance of the image processing service in the cloud environment. The API request carries the image, which is then processed by the running instance in the cloud environment to obtain the processing result.

[0122] 5. The cloud environment returns the processing result to the application, thereby completing one method call provided in this embodiment of the application.

[0123] For example, the data processing method provided in the embodiments of this application can be applied to ADAS / ADS visual perception systems.

[0124] like Figure 5A As shown, ADAS and ADS require real-time detection of multiple types of 2D objects, including: dynamic obstacles (pedestrians, cyclists, tricycles, cars, trucks, buses), static obstacles (traffic cones, traffic sticks, fire hydrants, motorcycles, bicycles), and traffic signs (traffic signs, guide signs, billboards, red / yellow / green / black traffic lights, road signs). Furthermore, to accurately determine the area occupied by dynamic obstacles in 3D space, 3D estimation of the dynamic obstacles is also required, outputting 3D bounding boxes. To fuse data with LiDAR, it is necessary to acquire the mask of dynamic obstacles, thereby filtering out the laser point clouds hitting the dynamic obstacles; for accurate parking, it is necessary to simultaneously detect the four key points of the parking space; for mapping and localization, it is necessary to detect the key points of static targets. The model trained using the technical solution provided in the embodiments of this application (e.g., the target network) can perform all or part of the above functions in the target network.

[0125] Since the embodiments of this application involve a large number of neural network applications, for ease of understanding, the relevant terms and concepts such as neural networks involved in the embodiments of this application will be introduced below.

[0126] (1) Neural Network

[0127] A neural network can be composed of neural units, which can be defined as a computational unit that takes xs (i.e., input data) and an intercept of 1 as input. The output of this computational unit can be: ; Where s = 1, 2, ..., n, where n is a natural number greater than 1, Ws is the weight of xs, and b is the bias of the neural unit. f is the activation function of the neural unit, used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into an output signal. The output signal of this activation function can be used as the input of the next convolutional layer, and the activation function can be the sigmoid function. A neural network is a network formed by connecting multiple of the above-mentioned individual neural units together, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field, which can be a region composed of several neural units.

[0128] (2) A convolutional neural network (CNN) is a deep neural network with a convolutional structure. A CNN contains a feature extractor consisting of convolutional layers and subsampling layers, which can be viewed as a filter. A convolutional layer refers to the layer of neurons in a CNN that performs convolutional processing on the input signal. In a convolutional layer of a CNN, a neuron can be connected to only some of the neurons in its neighboring layers. A convolutional layer typically contains several feature planes, each of which can be composed of a series of rectangularly arranged neural units. Neural units on the same feature plane share weights, which are the convolutional kernel. Shared weights can be understood as the way features are extracted being independent of their location. The convolutional kernel can be formalized as a matrix of random size, and during the training process of a CNN, the kernel can learn reasonable weights. Furthermore, the direct benefit of shared weights is reducing the connections between layers in the CNN, while also reducing the risk of overfitting.

[0129] CNN is a very common type of neural network. Below, we will combine... Figure 3This section focuses on a detailed explanation of the structure of CNNs. As mentioned in the basic concept introduction above, a Convolutional Neural Network (CNN) is a deep neural network with a convolutional structure. It is a deep learning architecture, which refers to learning at multiple levels of abstraction through machine learning algorithms. As a deep learning architecture, CNN is a feed-forward artificial neural network, in which each neuron can respond to the input image.

[0130] like Figure 5B As shown, the convolutional neural network (CNN) 200 may include an input layer 210, a convolutional / pooling layer 220 (where the pooling layer is optional), and a fully connected layer 230.

[0131] Convolutional / pooling layers 220: Convolutional layers: like Figure 3 The convolutional / pooling layer 220 shown may include layers as in Examples 221-226. For instance, in one implementation, layer 221 is a convolutional layer, layer 222 is a pooling layer, layer 223 is a convolutional layer, layer 224 is a pooling layer, layer 225 is a convolutional layer, and layer 226 is a pooling layer; in another implementation, layers 221 and 222 are convolutional layers, layer 223 is a pooling layer, layers 224 and 225 are convolutional layers, and layer 226 is a pooling layer. That is, the output of the convolutional layer can be used as the input to a subsequent pooling layer, or as the input to another convolutional layer to continue the convolution operation.

[0132] The following section will use convolutional layer 221 as an example to introduce the internal working principle of a convolutional layer.

[0133] Convolutional layer 221 can include multiple convolution operators, also known as kernels. In image processing, a convolution operator acts as a filter to extract specific information from the input image matrix. Essentially, a convolution operator can be a weight matrix, which is usually predefined. During the convolution operation, the weight matrix typically processes the input image pixel by pixel (or two pixels by two pixels, depending on the stride) along the horizontal direction, thus extracting specific features from the image. The size of the weight matrix should be related to the image size. It's important to note that the depth dimension of the weight matrix is ​​the same as the depth dimension of the input image; during convolution, the weight matrix extends to the entire depth of the input image. Therefore, convolution with a single weight matrix produces a single-depth convolutional output. However, in most cases, a single weight matrix is ​​not used; instead, multiple weight matrices of the same size (rows × columns) are applied—multiple identical matrices. The outputs of each weight matrix are stacked to form the depth dimension of the convolutional image; this dimension can be understood as being determined by the "multiple" mentioned above. Different weight matrices can be used to extract different features from an image. For example, one weight matrix can be used to extract edge information, another to extract specific colors, and yet another to blur unwanted noise. These multiple weight matrices have the same size (rows × columns), and the feature maps extracted by these identical weight matrices also have the same size. These extracted feature maps are then merged to form the output of the convolution operation.

[0134] The weight values ​​in these weight matrices need to be obtained through extensive training in practical applications. The weight matrices formed by the weight values ​​obtained through training can be used to extract information from the input image, thereby enabling the convolutional neural network 200' to make correct predictions.

[0135] When a convolutional neural network 200' has multiple convolutional layers, the initial convolutional layers (e.g., 221) tend to extract more general features, which can also be called low-level features. As the depth of the convolutional neural network 200' increases, the features extracted by later convolutional layers (e.g., 226) become more and more complex, such as high-level semantic features. Features with higher semantic levels are more suitable for the problem to be solved.

[0136] Pooling layer: Because it is often necessary to reduce the number of training parameters, pooling layers are often introduced periodically after convolutional layers, such as... Figure 5BLayers 221-226 in example 220 can be a convolutional layer followed by a pooling layer, or multiple convolutional layers followed by one or more pooling layers. In image processing, the sole purpose of pooling layers is to reduce the spatial size of the image. Pooling layers can include average pooling and / or max pooling operators to sample the input image to obtain a smaller image size. The average pooling operator calculates the average value of pixel values ​​within a specific range as the result of average pooling. The max pooling operator takes the pixel with the largest value within a specific range as the result of max pooling. Furthermore, just as the size of the weight matrix in a convolutional layer should be related to the image size, the operators in a pooling layer should also be related to the image size. The size of the output image after processing by the pooling layer can be smaller than the size of the input image of the pooling layer. Each pixel in the output image of the pooling layer represents the average or maximum value of the corresponding sub-region of the input image of the pooling layer.

[0137] Fully connected layer 230: After processing by the convolutional / pooling layers 220, the convolutional neural network 200' is still insufficient to output the required information. As mentioned earlier, the convolutional / pooling layers 220 only extract features and reduce the parameters introduced by the input image. However, to generate the final output information (the required class information or other relevant information), the convolutional neural network 200' needs to utilize fully connected layers 230 to generate one or a set of outputs representing the required number of classes. Therefore, the fully connected layers 230 can include multiple hidden layers (such as...). Figure 5B As shown in 231, 232 to 23n), the parameters contained in this multi-layer hidden layer can be pre-trained based on relevant training data for a specific task type. For example, the task type may include image recognition, image classification, image super-resolution reconstruction, etc. After the multiple hidden layers in the fully connected layer 230, which is the final layer of the entire convolutional neural network 200', is the output layer 240. This output layer 240 has a loss function similar to the classification cross-entropy, specifically used to calculate the prediction error. Once the entire convolutional neural network 200' has propagated forward (as... Figure 3 Propagation from 210 to 240 degrees is considered forward propagation, while backward propagation (e.g.) is completed. Figure 5B The propagation from 240 to 210 (backpropagation) will begin to update the weight values ​​and biases of the layers mentioned above, in order to reduce the loss of the convolutional neural network 200' and the error between the output of the convolutional neural network 200' through the output layer and the ideal result.

[0138] It should be noted that, as Figure 3The convolutional neural network 200' shown is merely an example of a convolutional neural network. In specific applications, convolutional neural networks can also exist in the form of other network models, for example, including only... Figure 3 As shown in the network structure, for example, the convolutional neural network used in the embodiments of this application may only include an input layer 210, a convolutional / pooling layer 220, and an output layer 240.

[0139] It should be noted that, as Figure 5B The convolutional neural network 200' shown is only an example of a convolutional neural network. In specific applications, convolutional neural networks can also exist in the form of other network models, such as... Figure 5C The multiple convolutional / pooling layers shown are implemented in parallel, and the extracted features are all input into the fully connected layer 230 for processing.

[0140] (3) Deep Neural Networks

[0141] Deep Neural Networks (DNNs), also known as multilayer neural networks, can be understood as neural networks with many hidden layers, though there's no specific metric for "many." DNNs can be categorized into three layers based on their position: input layers, hidden layers, and output layers. Generally, the first layer is the input layer, the last layer is the output layer, and the layers in between are hidden layers. All layers are fully connected, meaning that any neuron in the i-th layer is connected to any neuron in the (i+1)-th layer. Although DNNs appear complex, the operation of each layer is actually quite simple, resembling a linear relationship as follows: ,in, It is the input vector. It is the output vector. It is an offset vector. This is the weight matrix (also called coefficients), and α() is the activation function. Each layer is simply a subset of the input vector. The output vector is obtained through such a simple operation. Because DNNs have many layers, the coefficients... and offset vector The number of these parameters is therefore quite large. These parameters are defined in DNNs as follows: [as coefficients] For example: Suppose in a three-layer DNN, the linear coefficient from the fourth neuron in the second layer to the second neuron in the third layer is defined as... The superscript 3 represents the coefficient. The layer number is used, and the index corresponds to the output third layer index 2 and the input second layer index 4. In summary: the coefficients from the k-th neuron in layer L-1 to the j-th neuron in layer L are defined as... It's important to note that the input layer does not have... Parameters. In deep neural networks, more hidden layers allow the network to better depict complex situations in the real world. Theoretically, the more parameters a model has, the higher its complexity and "capacity," meaning it can accomplish more complex learning tasks. Training a deep neural network is essentially the process of learning the weight matrix, and its ultimate goal is to obtain the weight matrix of all layers in the trained deep neural network (a weight matrix formed by vectors W from many layers).

[0142] (4) Loss function

[0143] In training a deep neural network, to ensure the output closely approximates the desired predicted value, we compare the network's prediction with the target value. Based on the difference, we update the weight vector of each layer (usually pre-configuring parameters before the initial update). For example, if the prediction is too high, the weight vector is adjusted to predict a lower value. This adjustment continues until the deep neural network predicts the target value or a value very close to it. Therefore, we need to predefine "how to compare the difference between the predicted and target values," which is the loss function or objective function. These are important equations used to measure the difference between the predicted and target values. Taking the loss function as an example, a higher output value (loss) indicates a greater difference, and training the deep neural network becomes a process of minimizing this loss.

[0144] (5) Backpropagation algorithm

[0145] Convolutional neural networks can employ backpropagation (BP) to correct the parameters in the initial super-resolution model during training, thereby reducing the reconstruction error loss. Specifically, forward propagation of the input signal to the output generates an error loss; this error loss information is then propagated back to update the parameters in the initial super-resolution model, leading to convergence of the error loss. The backpropagation algorithm is an error-loss-driven backpropagation process aimed at obtaining the optimal parameters of the super-resolution model, such as the weight matrix.

[0146] (6) Image semantic segmentation: The process of subdividing an image into different sub-regions according to certain rules (such as lighting, category). As shown in the example below, the image is divided into different sub-regions at the pixel level according to categories. Different colors in the image represent different regions, such as buildings, sky, and plants.

[0147] (7) Image domain and image style: The abstract features that characterize an image as belonging to a specific dataset are called image style, and the image space consisting of the corresponding specific dataset and potential image data of the same style is called image domain.

[0148] (8) Source domain: The image domain corresponding to the dataset on which the definition (or parameter training) of the model or algorithm depends is called the image source domain.

[0149] (9) Domain generalization: The process of applying a model or algorithm obtained from the image source domain to an unseen image domain is called domain generalization.

[0150] Image segmentation helps distinguish the relationships between objects and has wide applications in image enhancement, image editing, and other fields. However, training datasets often cannot cover all real-world scenes, meaning there is a domain shift between the training data and the real-world scene. Furthermore, supervised learning-based models have limited generalization ability, leading to poor performance during deployment.

[0151] In safety-critical business scenarios such as autonomous driving, there are high requirements for the generalization ability of models during deployment. This means that the trained model must have good prediction results in multiple unknown real-world scenarios (such as nighttime, extreme weather, and different road structures). Therefore, improving the model's generalization ability in different scenarios is extremely important and helps to enhance product competitiveness.

[0152] One existing strategy to improve model generalization is to expand the coverage of the data by using image style transfer algorithms to transfer the styles of images from real-world scenes to the training dataset, thus enriching the style diversity of the training dataset. This method generates a series of images with different styles as training samples using a pre-trained style transfer model, and obtains the final domain-generalized segmentation model after a certain number of iterations.

[0153] However, the styles transferred by these methods still differ from the distribution of real-world scenarios, so they still cannot cover all real-world scenarios, resulting in limited generalization effects and consequently poor model accuracy.

[0154] To address the aforementioned problems, embodiments of this application provide a data processing method. The data processing method of this application embodiment will be described in detail below with reference to the accompanying drawings.

[0155] Reference Figure 6 , Figure 6 This is a flowchart illustrating a data processing method provided in an embodiment of this application, such as... Figure 6 As shown in the embodiment of this application, a data processing method may include steps 601 to 603, which are described in detail below.

[0156] 601. Obtain the first image feature corresponding to the image; In one possible implementation, the image can be processed by an image encoder (or feature extraction network) to obtain the first image features corresponding to the image.

[0157] For example, an image encoder (Or it could be called a visual encoder) can process a given image We use the Swin Transformer as a visual encoder to extract multi-level visual features, and combine the multi-scale visual features generated by multiple stages (taking four stages as an example) in the Swin Transformer.

[0158] 602. Based on the similarity between the distribution features of the first image feature and each distribution feature in the pre-trained multiple distribution features, the multiple distribution features are fused to obtain the second distribution feature.

[0159] In one possible implementation, the distribution characteristics of the first image features can represent the style of the image, which may be related to the shooting environment, shooting time, artistic style, etc.

[0160] In one possible implementation, the distribution characteristics can be the mean and variance.

[0161] In one possible implementation, the first image feature includes features from multiple channels, and the distribution feature of the first image feature includes the distribution feature corresponding to each of the multiple channels. That is, a distribution feature can be calculated based on the features corresponding to each channel. For example, the mean and variance can be calculated for each channel as the distribution feature corresponding to that channel.

[0162] In one possible implementation, the multiple distribution features can be fused based on the similarity between the distribution features of the first image features and each of the multiple distribution features in the pre-trained dataset to obtain a second distribution feature.

[0163] In other words, the multiple pre-trained distribution features can be called style bases. Different style bases can correspond to different image styles. For example, there can be orthogonal constraints between different style bases. The similarity between the distribution features of the first image feature and each distribution feature among the multiple distribution features can be used as the weights corresponding to each pre-trained distribution feature. Based on the weights, the multiple pre-trained distribution features are fused to obtain the second distribution feature, which can be used to represent the style of the image.

[0164] Due to the limitations of training samples, it is usually impossible to exhaustively represent all image styles. Therefore, style encoders for input images often cannot accurately extract and learn styles. In this embodiment, the style space is represented by multiple pre-trained style features. Then, by fusing the multiple distribution features based on the similarity between the distribution features of the first image feature and each distribution feature in the pre-trained multiple distribution features, the original image style is mapped to the style space to obtain a more accurate style expression. Because this style expression is more accurate, the image processing accuracy of the model is improved.

[0165] In one possible implementation, the multiple distribution features can be fused based on the similarity between the distribution features corresponding to each channel and each distribution feature in the multiple pre-trained distribution features to obtain a second distribution feature, the second distribution feature including the fused distribution features corresponding to each of the multiple channels.

[0166] 603. Based on the second distribution feature, the first image feature is adjusted to obtain the second image feature.

[0167] In one possible implementation, the distribution of the first image features can be adjusted using the second distribution features to obtain the second image features.

[0168] For example, refer to Figure 7 , Figure 7 This is a flowchart illustrating an embodiment of the present application, which includes: feature style extraction, specifically, calculating basic image features. The mean and variance of each channel dimension are calculated and then used to construct style vectors in channel order. and Feature standardization: Normalization is performed to obtain normalized image features. Style similarity metric: Calculates the style vector of the input image and the style similarity of each style base. The similarity between them is: ,in The distance metric is optional; common examples include KL divergence and Wasserstein distance. To constrain the distance metric to a normalized function that sums to 1; Style re-representation: The style basis is weighted according to similarity to obtain the style representation of the current image. Feature restylization: Stylizing normalized image features using style representations to obtain stylized features. .

[0169] Figure 7The proposed architecture dynamically preserves image style information from different data domains and uses the similarity between style bases of unseen image data domains as a weighting factor to represent the style of unseen images through weighted combinations of style bases. It can retain style information from different training datasets, avoiding brute-force removal of image style information; it does not require style augmentation of training samples, thus avoiding the need for training style transfer networks and dependence on external datasets.

[0170] It should be understood that the network structure may include multiple network layers for feature extraction, and the above-described adjustment process for image features can be embedded after any one or more network layers for feature extraction. For example, a feature extraction network can be connected after step 603 for feature extraction.

[0171] 604. Based on the second image feature, process the image to obtain the image processing result.

[0172] In one possible implementation, the image processing result is specifically an image segmentation result or an object detection result. For example, it can be a mask region or a detection box.

[0173] In one possible implementation, the semantic category to which each feature point belongs can be determined based on the similarity between each feature point in the second image features and multiple semantic features, wherein each semantic feature corresponds to a semantic category, and the semantic category is used to indicate the image processing result of the image.

[0174] In one possible implementation, the plurality of semantic features consist of multiple sets of semantic features, each set of semantic features including at least one semantic feature, and each set of semantic features corresponds to a class of image styles.

[0175] For example, stylized features can be input into the deep feature extraction module 300 to obtain deep image features. ;Will Inputting into the semantic clustering module 400 yields the segmentation result: Semantic similarity metric: This measures the similarity of each point in the feature space. Calculate its similarity with each semantic base. It can be Common distance metrics such as distance; semantic prediction: the semantic category of the spatial location corresponding to the point is the semantic category corresponding to the maximum similarity. .

[0176] By using the above method, the semantics of images in different domains are represented in the form of semantic bases, and the semantic category of the current pixel is determined based on the distance between the current pixel features and the semantic bases. This avoids learning the segmentation head, reduces the learning parameters, and improves the generalization ability of the model.

[0177] In one possible implementation, the style mapping module can be embedded as a base module within any layer of the neural network. One possible structure is as follows: Figure 8 As shown: This application provides a data processing method, comprising: acquiring a first image feature corresponding to an image; fusing the multiple distribution features according to the distribution features of the first image feature and the similarity between each distribution feature in a pre-trained set of multiple distribution features to obtain a second distribution feature; adjusting the first image feature based on the second distribution feature to obtain a second image feature; and processing the image according to the second image feature to obtain an image processing result of the image.

[0178] The style space is represented by multiple pre-trained style features. Then, by fusing the multiple distribution features based on the similarity between the distribution features of the first image feature and each of the pre-trained distribution features, the original image style is mapped to this style space to obtain a more accurate style expression. Because this style expression is more accurate, the model's image processing accuracy is improved.

[0179] From the perspective of the model training process, this application embodiment also provides a data processing method, including: obtaining a first image feature corresponding to an image through a feature extraction grid; fusing the multiple distribution features according to the distribution features of the first image feature and the similarity between each distribution feature in the multiple distribution features to obtain a second distribution feature; adjusting the first image feature based on the second distribution feature to obtain a second image feature; processing the image according to the second image feature to obtain an image processing result of the image; and updating the feature extraction grid according to the image processing result and the corresponding ground truth.

[0180] In one possible implementation, the plurality of distribution features can also be updated based on the distribution features of the first image features and the corresponding ground truth values.

[0181] In one possible implementation, the semantic category to which each feature point belongs can be determined based on the similarity between each feature point in the second image features and multiple semantic features, wherein each semantic feature corresponds to a semantic category, and the semantic category is used to indicate the image processing result of the image.

[0182] In one possible implementation, the semantic features include target semantic features corresponding to the target semantic category, and the target semantic features can be updated based on the mean value of feature points belonging to the target semantic category in the second image features, and the target semantic features.

[0183] For example, a loss function can be set, and stochastic gradient descent can be used to train the model parameters; style vectors can be used. and Update style base ;according to The semantic base is updated by updating the semantic category of each feature point. A common approach is to directly use... The middle belongs to the semantic category The mean of the point features Updated proportionally: ,in This is the scaling factor. During training, an initialization step is performed once, and then data is randomly sampled from the training set. The above steps are repeated until the set convergence criteria are met, such as the maximum number of iterations, or the accuracy of the validation set reaches a certain value.

[0184] One system architecture of this application embodiment can be as follows: Figure 9 As shown, it mainly comprises four core modules: a basic feature extraction module 101', a style mapping module 201', a deep feature extraction module 300, and a semantic clustering module 400. This invention receives an input image from an unknown domain and generates the corresponding semantic segmentation result.

[0185] A structural block diagram of an embodiment of this application can be shown as follows: Figure 10 As shown: One embodiment of this application uses a DeepLabV3+ model with ResNet-50 as its backbone as a reference. The first convolutional and pooling layer is used as the basic feature extraction module 101', followed by a style mapping module 201'. The remaining structure remains unchanged. The last convolutional layer, which originally corresponded to the number of semantic categories, is replaced with a two-layer convolutional structure, outputting a feature with N channels (256 in this example). This part serves as the deep feature extraction module 300. Then, it is connected to the semantic clustering module 400 of this invention.

[0186] The structure of style mapping module 201' is as follows Figure 11A As shown on the left, the detailed implementation steps are as follows: Feature style extraction: Calculate the basic image features The mean and variance of each channel dimension are calculated and then used to construct style vectors in channel order. and Feature standardization: Normalization is performed to obtain normalized image features. Style similarity metric: Calculates the style vector of the input image and the style similarity of each style base. The similarity between them is: The distance metric is set to Style re-representation: The style representation of the current image is obtained by weighting the style base based on similarity. Feature restylization: Stylizing normalized image features using style representations to obtain stylized features. .

[0187] The semantic clustering module 400 structure is as follows: Figure 11A As shown on the right, the detailed implementation steps are as follows: Semantic similarity measurement: for each point in the feature space Calculate its similarity with each semantic base. Semantic prediction: The semantic category of the spatial location corresponding to this point is the semantic category corresponding to the maximum similarity. .

[0188] Additional steps during training: Define the loss function, which consists of three parts: a. Cross-entropy loss: ,in These are the height and width of the image, respectively. This represents the number of semantic categories. For point and the The normalized distance metric for semantic base classes is set here as follows: , for and the Minimum distance between semantic bases.

[0189] b. Intra-class clustering loss: ,in The deep feature extraction module obtains the data from the first... The domain belongs to the first Features of class semantics.

[0190] c. Comparative learning loss: ,in for The middle belongs to the semantic category Point features The mean, i.e. Category feature center point. Representation and semantic categories The corresponding semantic base, Representation and semantic categories Non-corresponding semantic base. It is an adjustable control parameter.

[0191] The model parameters were then trained using stochastic gradient descent.

[0192] Update the style base using the following formula: ,in To update the scaling factors, the semantic base is updated using the following formula: .

[0193] The technical effects of the embodiments of this application will be introduced through experiments. The datasets include synthetic data GTAV and Synthia, and real data IDD, Cityscapes, BDD100K, and Mapillary.

[0194] Different backbone models were used: MobileNet, ShuffleNet, ResNet-50, and ResNet-101. The benchmark methods for comparison included: WildNet, IBN-Net, RobustNet, SAN-SAW, MLDG, and PintheMen.

[0195] Using Mean IoU as the performance evaluation metric, this patent embodiment is compared with several benchmark algorithms on a given training and test set, and exhibits the following beneficial effects. This application embodiment verifies the effectiveness of the method in training sets containing single-domain (GTAV), dual-domain (GTAV+Synthia), and triple-domain (GTAV+Synthia+IDD) cases. The results are shown in Tables 1, 2, and 3. Table 1 compares the performance in the single-domain case, Table 2 compares the performance in the dual-domain case, and Table 3 compares the performance in the triple-domain case. Table 1

[0196] Table 2

[0197] Table 3

[0198] in This indicates the average precision on unseen data. This represents the average precision over the source data domain used in training. This represents the average accuracy across the unseen data and the original data domain. It can be observed that the embodiments of this application achieve significant accuracy improvements in both single-domain and multi-domain scenarios. Particularly in the multi-domain scenario, it not only achieves a consistent advantage on the unseen dataset but also maintains a significant advantage on the source domain. This demonstrates the effectiveness of the embodiments of this application in preserving the style and semantic information of the source domain.

[0199] Furthermore, the embodiments of this application verified the effectiveness under different model structures, and the results are shown in Table 4: Table 4

[0200] As can be seen, the embodiments of this application are robust to different model structures. In particular, they still maintain significant superiority under lightweight model structures (MobileNet, ShuffleNet).

[0201] The embodiments of this application are comparable to existing methods in terms of runtime latency. Table 5 shows a comparison of the inference latency of the method of this invention and the benchmark method at an image resolution of 2048x1024. The runtime latency of the embodiments of this application can be controlled within 10ms. Table 5

[0202] Figure 11B and Figure 11C The visualization results of the embodiments of this application on an actual unseen dataset are shown, and it can be seen that the effect of the embodiments of this application is significantly better than the comparison method. Figure 11B Figure [Figure Number] shows a comparison of the performance of the embodiments of this application and the benchmark method on a daytime road dataset. Figure 11C Comparison of the performance of the embodiments and benchmark methods in this application on nighttime road datasets

[0203] Reference Figure 12 , Figure 12 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application, such as... Figure 12 As shown in the figure, an embodiment of this application provides a data processing apparatus 1200, comprising: Processing module 1201 is used to obtain the first image feature corresponding to the image; Based on the similarity between the distribution features of the first image features and each distribution feature in the pre-trained multiple distribution features, the multiple distribution features are fused to obtain the second distribution feature; Based on the second distribution feature, the first image feature is adjusted to obtain the second image feature; Based on the second image feature, the image is processed to obtain the image processing result.

[0204] The specific description of the processing module 1201 can be found in the description of steps 601 to 604 in the above embodiments, and will not be repeated here.

[0205] In one possible implementation, the image processing result is specifically the image segmentation result or the object detection result.

[0206] In one possible implementation, the first image feature includes features of multiple channels, and the distribution features of the first image feature include the distribution features corresponding to each of the multiple channels; The processing module is specifically used to fuse the multiple distribution features based on the similarity between the distribution features corresponding to each channel and each distribution feature in the multiple pre-trained distribution features to obtain a second distribution feature, wherein the second distribution feature includes the fused distribution features corresponding to each of the multiple channels.

[0207] In one possible implementation, the distribution characteristics include mean and variance.

[0208] In one possible implementation, the processing module is specifically configured to determine the semantic category to which each feature point belongs based on the similarity between each feature point in the second image features and multiple semantic features, wherein each semantic feature corresponds to a semantic category, and the semantic category is used to indicate the image processing result of the image.

[0209] In one possible implementation, the plurality of semantic features consist of multiple sets of semantic features, each set of semantic features including at least one semantic feature, and each set of semantic features corresponds to a class of image styles.

[0210] This application also provides a data processing apparatus, including: The processing module is used to obtain the first image features corresponding to the image through the feature extraction grid; Based on the distribution features of the first image features and the similarity between each distribution feature, the multiple distribution features are fused to obtain the second distribution feature; Based on the second distribution feature, the first image feature is adjusted to obtain the second image feature; Based on the second image feature, the image is processed to obtain the image processing result; An update module is used to update the feature extraction grid based on the image processing results and the corresponding ground truth values.

[0211] In one possible implementation, the update module is further configured to update the plurality of distribution features based on the distribution features of the first image features and the corresponding ground truth values.

[0212] In one possible implementation, the processing module is specifically configured to determine the semantic category to which each feature point belongs based on the similarity between each feature point in the second image features and multiple semantic features, wherein each semantic feature corresponds to a semantic category, and the semantic category is used to indicate the image processing result of the image.

[0213] In one possible implementation, the semantic features include target semantic features corresponding to the target semantic category, and the updating module is further configured to update the target semantic features based on the mean of the feature points in the second image features that belong to the target semantic category and the target semantic features.

[0214] The following describes an execution device provided in an embodiment of this application. Please refer to [link / reference]. Figure 13 , Figure 13 This is a schematic diagram of an execution device provided in an embodiment of this application. The execution device 1300 can specifically be a virtual reality (VR) device, a mobile phone, a tablet, a laptop, a smart wearable device, a monitoring data processing device, or a server, etc., and is not limited thereto. Specifically, the execution device 1300 includes: a receiver 1301, a transmitter 1302, a processor 1303, and a memory 1304 (wherein the execution device 1300 may have one or more processors 1303). Figure 13 (Taking a processor as an example), processor 1303 may include application processor 13031 and communication processor 13032. In some embodiments of this application, receiver 1301, transmitter 1302, processor 1303 and memory 1304 may be connected via bus or other means.

[0215] Memory 1304 may include read-only memory and random access memory, and provides instructions and data to processor 1303. A portion of memory 1304 may also include non-volatile random access memory (NVRAM). Memory 1304 stores processor and operation instructions, executable modules, or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.

[0216] Processor 1303 controls the operation of the execution device. In specific applications, the various components of the execution device are coupled together through a bus system, which may include not only the data bus, but also power buses, control buses, and status signal buses. However, for clarity, all buses are referred to as the bus system in the diagram.

[0217] The methods disclosed in the embodiments of this application can be applied to or implemented by the processor 1303. The processor 1303 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 1303 or by instructions in software form. The processor 1303 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor, or a microcontroller, and may further include an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The processor 1303 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 1304. Processor 1303 reads the information from memory 1304 and, in conjunction with its hardware, completes the steps involved in the model inference process described above.

[0218] Receiver 1301 can be used to receive input digital or character information, and to generate signal inputs related to the settings and function control of the execution device. Transmitter 1302 can be used to output digital or character information through the first interface; transmitter 1302 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; transmitter 1302 may also include a display device such as a display screen.

[0219] This application also provides a training device; please refer to [link / reference]. Figure 14 , Figure 14This is a schematic diagram of a training device provided in an embodiment of this application. Specifically, the training device 1400 is implemented by one or more servers. The training device 1400 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1414 (e.g., one or more processors) and memory 1432, and one or more storage media 1430 (e.g., one or more mass storage devices) for storing application programs 1442 or data 1444. The memory 1432 and storage media 1430 can be temporary or persistent storage. The program stored in the storage media 1430 may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the training device. Furthermore, the CPU 1414 may be configured to communicate with the storage media 1430 and execute the series of instruction operations in the storage media 1430 on the training device 1400.

[0220] The training device 1400 may also include one or more power supplies 1426, one or more wired or wireless network interfaces 1450, one or more input / output interfaces 1458; or, one or more operating systems 1441, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0221] In this embodiment, the central processing unit 1414 is used to perform actions related to model training in the above embodiments.

[0222] This application also provides a computer program product that, when run on a computer, causes the computer to perform steps as performed by the aforementioned execution device, or causes the computer to perform steps as performed by the aforementioned training device.

[0223] This application also provides a computer-readable storage medium storing a program for signal processing, which, when run on a computer, causes the computer to perform steps as performed by the aforementioned execution device, or causes the computer to perform steps as performed by the aforementioned training device.

[0224] The execution device, training device, or terminal device provided in this application embodiment can specifically be a chip. The chip includes a processing unit and a communication unit. The processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, pins, or circuits. The processing unit can execute computer execution instructions stored in the storage unit to cause the chip within the execution device to execute the data processing method described in the above embodiments, or to cause the chip within the training device to execute the data processing method described in the above embodiments. Optionally, the storage unit can be a storage unit within the chip, such as a register or cache. Alternatively, the storage unit can be a storage unit located outside the chip within the wireless access device, such as a read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, such as random access memory (RAM).

[0225] For details, please refer to Figure 15 , Figure 15 This is a schematic diagram of a chip provided in an embodiment of this application. The chip can be represented as a neural network processor (NPU) 1500. The NPU 1500 is mounted as a coprocessor on the host CPU, and tasks are assigned by the host CPU. The core part of the NPU is the arithmetic circuit 1503, which is controlled by the controller 1504 to extract matrix data from the memory and perform multiplication operations.

[0226] In some implementations, the arithmetic circuit 1503 internally includes multiple processing engines (PEs). In some implementations, the arithmetic circuit 1503 is a two-dimensional pulsating array. The arithmetic circuit 1503 can also be a one-dimensional pulsating array or other electronic circuitry capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 1503 is a general-purpose matrix processor.

[0227] For example, suppose we have an input matrix A, a weight matrix B, and an output matrix C. The arithmetic circuit retrieves the corresponding data of matrix B from the weight memory 1502 and caches it in each PE of the arithmetic circuit. The arithmetic circuit retrieves the data of matrix A from the input memory 1501 and performs matrix operations with matrix B. The partial result or the final result of the obtained matrix is ​​stored in the accumulator 1508.

[0228] Unified memory 1506 is used to store input and output data. Weight data is directly transferred to weight memory 1502 via Direct Memory Access Controller (DMAC) 1505. Input data is also transferred to unified memory 1506 via DMAC.

[0229] BIU stands for Bus Interface Unit, which is used for interaction between the AXI bus and the DMAC and the Instruction Fetch Buffer (IFB) 1509.

[0230] The Bus Interface Unit (BIU) 1510 is used by the instruction fetch memory 1509 to fetch instructions from external memory, and also by the memory access controller 1505 to fetch the original data of the input matrix A or the weight matrix B from external memory.

[0231] The DMAC is mainly used to move input data from external memory DDR to unified memory 1506, or to weight data to weight memory 1502, or to input data to input memory 1501.

[0232] The vector computation unit 1507 includes multiple processing units that further process the output of the computation circuit 1503 when needed, such as vector multiplication, vector addition, exponential operations, logarithmic operations, size comparisons, etc. It is mainly used for computation in non-convolutional / fully connected layers of neural networks, such as batch normalization, pixel-level summation, and upsampling of feature planes.

[0233] In some implementations, the vector computation unit 1507 can store the processed output vector in the unified memory 1506. For example, the vector computation unit 1507 can apply a linear function, or a nonlinear function, to the output of the computation circuit 1503, such as linear interpolation of feature planes extracted by a convolutional layer, or, for example, a vector of accumulated values, to generate activation values. In some implementations, the vector computation unit 1507 generates normalized values, pixel-level summed values, or both. In some implementations, the processed output vector can be used as activation input to the computation circuit 1503, for example, for use in subsequent layers of the neural network.

[0234] The instruction fetch buffer 1509 connected to the controller 1504 is used to store the instructions used by the controller 1504; Unified memory 1506, input memory 1501, weighted memory 1502, and instruction fetch memory 1509 are all on-chip memories. External memory is proprietary to this NPU hardware architecture.

[0235] The processor mentioned above can be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits used to control the execution of the above program.

[0236] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0237] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0238] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0239] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. A data processing method, characterized in that, include: Obtain the first image feature corresponding to the image; Based on the similarity between the distribution features corresponding to each channel and each distribution feature in the pre-trained multiple distribution features, the multiple distribution features are fused to obtain a second distribution feature. The second distribution feature includes the fused distribution features corresponding to each channel in the multiple channels. Different distribution features in the pre-trained multiple distribution features correspond to different image styles, and the second distribution feature is used to represent the style of the image. The first image feature includes features of multiple channels, and the distribution features of the first image feature include the distribution features corresponding to each channel in the multiple channels. Based on the second distribution feature, the first image feature is adjusted to obtain the second image feature; Based on the second image feature, the image is processed to obtain the image processing result.

2. The method according to claim 1, characterized in that, The image processing result is specifically the image segmentation result or the target detection result.

3. The method according to claim 1 or 2, characterized in that, The distribution characteristics include mean and variance.

4. The method according to claim 1 or 2, characterized in that, The step of processing the image based on the second image feature to obtain the image processing result includes: Based on the similarity between each feature point and multiple semantic features in the second image features, the semantic category to which each feature point belongs is determined, wherein each semantic feature corresponds to a semantic category, and the semantic category is used to indicate the image processing result of the image.

5. The method according to claim 4, characterized in that, The multiple semantic features are composed of multiple sets of semantic features, each set of semantic features includes at least one semantic feature, and each set of semantic features corresponds to a type of image style.

6. A data processing method, characterized in that, include: The first image feature is obtained by using a feature extraction grid. Based on the distribution features of the first image features and the similarity between each distribution feature among the multiple distribution features, the multiple distribution features are fused to obtain a second distribution feature, wherein different distribution features among the multiple distribution features correspond to different image styles, and the second distribution feature is used to represent the style attribute of the image; Based on the second distribution feature, the first image feature is adjusted to obtain the second image feature; Based on the similarity between each feature point and multiple semantic features in the second image features, the semantic category to which each feature point belongs is determined, wherein each semantic feature corresponds to a semantic category, and the semantic category is used to indicate the image processing result of the image; The feature extraction grid is updated based on the image processing results and the corresponding ground truth values.

7. The method according to claim 6, characterized in that, The method further includes: Based on the distribution features of the first image features and the corresponding ground truth values, the plurality of distribution features are updated.

8. The method according to claim 6, characterized in that, The semantic features include target semantic features corresponding to the target semantic category, and the method further includes: The target semantic features are updated based on the mean value of feature points belonging to the target semantic category in the second image features, and the target semantic features.

9. A data processing apparatus, characterized in that, include: The processing module is used to obtain the first image feature corresponding to the image; Based on the similarity between the distribution features corresponding to each channel and each distribution feature in the pre-trained multiple distribution features, the multiple distribution features are fused to obtain a second distribution feature. The second distribution feature includes the fused distribution features corresponding to each channel in the multiple channels. Different distribution features in the pre-trained multiple distribution features correspond to different image styles, and the second distribution feature is used to represent the style of the image. The first image feature includes features of multiple channels, and the distribution features of the first image feature include the distribution features corresponding to each channel in the multiple channels. Based on the second distribution feature, the first image feature is adjusted to obtain the second image feature; Based on the second image feature, the image is processed to obtain the image processing result.

10. The apparatus according to claim 9, characterized in that, The image processing result is specifically the image segmentation result or the target detection result.

11. The apparatus according to claim 9 or 10, characterized in that, The distribution characteristics include mean and variance.

12. The apparatus according to claim 9 or 10, characterized in that, The processing module is specifically used to determine the semantic category to which each feature point belongs based on the similarity between each feature point and multiple semantic features in the second image features, wherein each semantic feature corresponds to a semantic category, and the semantic category is used to indicate the image processing result of the image.

13. The apparatus according to claim 12, characterized in that, The multiple semantic features are composed of multiple sets of semantic features, each set of semantic features includes at least one semantic feature, and each set of semantic features corresponds to a type of image style.

14. A data processing apparatus, characterized in that, include: The processing module is used to obtain the first image features corresponding to the image through the feature extraction grid; Based on the distribution features of the first image features and the similarity between each distribution feature among the multiple distribution features, the multiple distribution features are fused to obtain a second distribution feature, wherein different distribution features among the multiple distribution features correspond to different image styles, and the second distribution feature is used to represent the style of the image; Based on the second distribution feature, the first image feature is adjusted to obtain the second image feature; Based on the similarity between each feature point and multiple semantic features in the second image features, the semantic category to which each feature point belongs is determined, wherein each semantic feature corresponds to a semantic category, and the semantic category is used to indicate the image processing result of the image; An update module is used to update the feature extraction grid based on the image processing results and the corresponding ground truth values.

15. The apparatus according to claim 14, characterized in that, The update module is further configured to update the plurality of distribution features based on the distribution features of the first image features and the corresponding ground truth values.

16. The apparatus according to claim 14, characterized in that, The semantic features include target semantic features corresponding to the target semantic category. The update module is further configured to update the target semantic features based on the mean value of the feature points in the second image features that belong to the target semantic category and the target semantic features.

17. A computer storage medium, characterized in that, The computer storage medium stores one or more instructions, which, when executed by one or more computers, cause the one or more computers to perform the operation of the method according to any one of claims 1 to 8.

18. A computer program product, characterized in that, Includes computer-readable instructions that, when executed on a computer device, cause the computer device to perform the method as described in any one of claims 1 to 8.

19. A data processing system, comprising at least one processor and at least one memory; the processor and the memory are connected via a communication bus and communicate with each other. The at least one memory is used to store code; The at least one processor is used to execute the code to perform the method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Data processing method and device

    CN115757692A