Image processing method and related apparatus

By performing spectral decomposition and weight fusion on multispectral raw images, the processing of multispectral raw images is optimized, solving the problem of wasted computing power and time caused by useless spectral bands and reducing the difficulty of model learning.

WO2025227727A9PCT designated stage Publication Date: 2026-01-15HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/137710
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-29
Filing Date
2024-12-09
Publication Date
2026-01-15

AI Technical Summary

Technical Problem

Existing technologies in multispectral raw image processing suffer from the problem of wasting computational and time resources due to useless spectral band data, and increasing the difficulty of model learning.

Method used

By performing spectral decomposition on multispectral raw images, the influence of each sub-spectral band is identified, and the bands are fused with weights to reduce useless data components and optimize model input, thereby reducing computational and time overhead.

Benefits of technology

While ensuring the quality of downstream tasks, the computational and time costs were reduced, and the difficulty of model learning was lowered.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024137710_15012026_PF_FP_ABST
    Figure CN2024137710_15012026_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides an image processing method. The method comprises: acquiring a multispectral raw image (901); performing spectral decomposition on the multispectral raw image to obtain multiple first sub-spectral raw images, different first sub-spectral raw images being images of different sub-spectral bands in a spectral band corresponding to the multispectral raw image (902); and, on the basis of weight information adapted to a first image processing task, fusing the multiple first sub-spectral raw images to obtain a fusion result, the weight information comprising a weight corresponding to each first sub-spectral raw image (903).
Need to check novelty before this filing date? Find Prior Art

Description

An image processing method and related apparatus

[0001] This application claims priority to Chinese Patent Application No. 202410536845.6, filed on April 29, 2024, entitled "An Image Processing Method and Related Apparatus", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of artificial intelligence (AI) technology, and more particularly to an image processing method, a computer-readable storage medium, and a computer program product. Background Technology

[0003] Early computer vision tasks primarily used raw images of the visible spectrum as input. Specifically, the raw image of the visible spectrum was processed to obtain an RGB image, which was then used for computer vision tasks (such as image enhancement, segmentation, and detection). However, the spectrum corresponding to the raw image of the visible spectrum only represents a portion of the solar spectrum, missing other parts. This leads to performance limitations in certain scenarios. For example, in foggy photography, the light corresponding to the raw visible spectrum cannot penetrate tiny water droplets floating in the air, resulting in a hazy and poor-quality image. Based on this, multispectral computer vision tasks were developed. These tasks take the full spectrum as input, avoiding information loss at the initial stage of the task.

[0004] However, within the spectral bands of multispectral raw images, for a specific downstream task, some spectral bands may be useful (i.e., they will affect the quality of the task processing results), while other spectral bands may be useless or have very little effect (i.e., they will not affect the quality of the task processing results). In this case, on the one hand, if the data from these useless spectral bands is used as input when processing downstream tasks, it will lead to an excessive amount of data that the network performing the downstream task needs to process, resulting in a waste of computing power and time. Moreover, due to the high complexity of the input, it will increase the learning difficulty of the model during training. Summary of the Invention

[0005] Firstly, this application provides an image processing method, which includes: acquiring a multispectral raw image containing information of multiple spectral bands; for a downstream task to be performed (e.g., the first image processing task in this embodiment), the multispectral raw image can be spectrally decomposed to obtain multiple sub-spectral images, and the magnitude of the effect of each sub-spectral band on the processing task can be identified. The magnitude of this effect is then used as a weight to fuse the multiple sub-spectral images. The fusion result reduces (or completely eliminates) components of data that are useless or have a very small effect on the downstream task, thereby reducing the waste of computing power and time while ensuring the execution quality of the downstream task. Furthermore, since useless input components are masked, the learning difficulty of the model can be reduced compared to existing technologies during model training.

[0006] Specifically, the multispectral raw image can be spectrally decomposed to obtain multiple first subspectral raw images. Different first subspectral raw images are images of different subspectral bands in the spectral bands corresponding to the multispectral raw image. According to the weight information adapted to the first image processing task, the multiple first subspectral raw images are fused to obtain a fusion result. The weight information includes the weight corresponding to each first subspectral raw image.

[0007] In this embodiment, the multispectral raw image encompasses a wider range of spectral bands than each sub-spectral raw image. The spectral bands of each sub-spectral raw image can be considered a subset of the spectral bands of the multispectral raw image. For example, the spectral bands of the multispectral raw image can be the entire solar spectrum, i.e., the full spectrum, or a subset of the full spectrum. In this embodiment, the multispectral raw image can be a raw image including multiple spectral bands, such as multiple bands from infrared, visible light, and ultraviolet. It should be understood that the spectral bands in this embodiment can include, but are not limited to, infrared, visible light, and ultraviolet, or infrared can be further subdivided into finer-grained near-infrared, mid-infrared, etc.

[0008] The sub-spectral raw images in this application embodiment can be raw images of infrared bands, raw images of visible bands, raw images of ultraviolet bands, or raw images with finer-grained band divisions, such as raw images of near-infrared bands or raw images of mid-infrared bands. Alternatively, they may not strictly follow the above divisions, but rather be raw images of bands that mix multiple band types. For example, a sub-spectral raw image may include raw images of both infrared bands and visible bands in certain wavelength ranges. This application embodiment is not limited to this.

[0009] In one possible implementation, the method further includes performing the first image processing task on the fusion result.

[0010] In one possible implementation, the multispectral raw image includes a variety of combinations of data in the ultraviolet spectral band, data in the visible spectral band, and data in the infrared spectral band.

[0011] In one possible implementation, the step of spectrally decomposing the multispectral raw image to obtain multiple sub-spectral raw images includes: acquiring information of the first image processing task; and performing spectral decomposition on the multispectral raw image based on the multispectral raw image and the information of the first image processing task to obtain multiple sub-spectral raw images, wherein the information of the first image processing task is indication information or feature representation of the first image processing task.

[0012] In one possible implementation, for the same raw image, different downstream image processing tasks may lead to different spectral decomposition results. For example, information about a second image processing task can be obtained; based on the multispectral raw image and the information of the second image processing task, the multispectral raw image is spectrally decomposed to obtain multiple second sub-spectral raw images, where different second sub-spectral raw images contain data in different spectral bands; wherein the first image processing task and the second image processing task are different, and at least one first sub-spectral raw image corresponds to a different spectral band than each second sub-spectral raw image corresponds to.

[0013] In one possible implementation, the method further includes: fusing the plurality of second sub-spectral raw images according to weight information adapted to the second image processing task to obtain a fusion result; wherein the weight information adapted to the first image processing task and the weight information adapted to the second image processing task are different. That is, different downstream image processing tasks can lead to different weight information.

[0014] In one possible implementation, the step of spectrally decomposing the multispectral raw image to obtain multiple subspectral raw images includes: splitting the multispectral raw image along the channel dimension to obtain multiple subspectral raw images.

[0015] In one possible implementation, the method further includes: determining the weight information adapted to the first image processing task based on information from the first image processing task or at least one of the multispectral raw images.

[0016] In one possible implementation, the method further includes: determining information suitable for performing a first image processing task on the multispectral raw image based on the multispectral raw image; or receiving information input by a user regarding a first image processing task to be performed on the multispectral raw image.

[0017] In one possible implementation, the multispectral raw image includes: full-spectrum raw data and visible-spectrum raw data. For example, the full-spectrum raw data and the visible-spectrum raw data can be acquired by different sensors. It should be understood that the full-spectrum raw data and the visible-spectrum raw data can be obtained by capturing the same scene using a visual sensor.

[0018] The embodiments of this application do not limit the form of the weights; they can be floating-point numbers, vectors, matrices, or other forms.

[0019] In one possible implementation, each of the first sub-spectral raw images has a single weight value. That is, elements of each first sub-spectral raw image can share the same weight.

[0020] In one possible implementation, each first sub-spectral raw image corresponds to multiple weight values, and each weight value corresponds to all elements of one channel of the first sub-spectral raw image. That is, elements within the same channel of each first sub-spectral raw image can share the same weight.

[0021] In one possible implementation, each first sub-spectral raw image corresponds to multiple weight values, and each weight value corresponds to an element of the first sub-spectral raw image. That is, each element of each first sub-spectral raw image can correspond to a weight.

[0022] In one possible implementation, at least one of the plurality of first sub-spectral raw images has a weight of 0. That is, for a specific downstream task, information in some spectral bands can be masked out.

[0023] Secondly, this application provides an image processing apparatus, the apparatus comprising:

[0024] The acquisition module is used to acquire multispectral raw images;

[0025] The processing module is used to perform spectral decomposition on the multispectral raw image to obtain multiple first sub-spectral raw images, wherein different first sub-spectral raw images are images of different sub-spectral bands in the spectral bands corresponding to the multispectral raw image; and to fuse the multiple first sub-spectral raw images according to weight information adapted to the first image processing task to obtain a fusion result; wherein the weight information includes the weight corresponding to each first sub-spectral raw image.

[0026] In one possible implementation, the device further includes:

[0027] The inference module is used to perform the first image processing task on the fusion result.

[0028] In one possible implementation, the multispectral raw image includes a variety of combinations of data in the ultraviolet spectral band, data in the visible spectral band, and data in the infrared spectral band.

[0029] In one possible implementation, the processing module is specifically used for:

[0030] Obtain information about the first image processing task; based on the multispectral raw image and the information about the first image processing task, perform spectral decomposition on the multispectral raw image to obtain multiple subspectral raw images, wherein the information about the first image processing task is the indication information or feature representation of the first image processing task.

[0031] In one possible implementation, the processing module is further configured to:

[0032] Obtain information about the second image processing task;

[0033] Based on the information from the multispectral raw image and the second image processing task, the multispectral raw image is spectrally decomposed to obtain multiple second subspectral raw images. Different second subspectral raw images contain data from different spectral bands. The first image processing task and the second image processing task are different, and at least one of the spectral bands corresponding to the first subspectral raw image is different from the spectral bands corresponding to each of the second subspectral raw images.

[0034] In one possible implementation, the processing module is further configured to:

[0035] Based on the weight information adapted to the second image processing task, the plurality of second sub-spectral raw images are fused to obtain a fusion result; wherein the weight information adapted to the first image processing task and the weight information adapted to the second image processing task are different.

[0036] The processing module is specifically used for:

[0037] The multispectral raw image is split along the channel dimension to obtain multiple subspectral raw images.

[0038] In one possible implementation, the processing module is further configured to:

[0039] The weight information adapted to the first image processing task is determined based on at least one of the information from the first image processing task or the multispectral raw image.

[0040] In one possible implementation, the processing module is further configured to:

[0041] Based on the multispectral raw image, determine information suitable for performing a first image processing task on the multispectral raw image; or...

[0042] The system receives user input regarding a first image processing task to be performed on the multispectral raw image.

[0043] In one possible implementation, the multispectral raw image includes: full-spectrum raw data and visible spectral raw data.

[0044] In one possible implementation, the weight corresponding to each of the first sub-spectral raw images is a single weight value; or,

[0045] Each of the first sub-spectral raw images corresponds to multiple weight values, and each weight value corresponds to all elements of one channel of the first sub-spectral raw image; or...

[0046] Each of the first sub-spectral raw images has multiple weight values, and each weight value corresponds to an element of the first sub-spectral raw image.

[0047] In one possible implementation, at least one of the plurality of first subspectral raw images has a weight of 0.

[0048] Thirdly, this application provides a chip including at least one processing unit and an interface circuit. The interface circuit is used to provide program instructions or data to the at least one processing unit. The at least one processing unit is used to execute the program instructions to implement the method described in any one of the first aspects. The at least one processing unit includes a first hardware unit and a second hardware unit. The first hardware unit is used to calculate the prefix sum in the channel dimension, and the second hardware unit is used to calculate the prefix sum in the spatial dimension.

[0049] Fourthly, embodiments of this application provide an image 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 of the optional methods thereon.

[0050] Fifthly, 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 of its optional methods.

[0051] Sixthly, embodiments of this application provide a computer program that, when run on a computer, causes the computer to perform the first aspect and any of its optional methods described above.

[0052] In a seventh aspect, this application provides a chip system including a processor for supporting an image processing apparatus in implementing the functions involved in the foregoing aspects, such as transmitting or processing data or information involved in the foregoing methods. In one possible design, the chip system further includes a memory for storing program instructions and data necessary for executing or training the device. The chip system may be composed of chips or may include chips and other discrete devices. Attached Figure Description

[0053] To more clearly illustrate the technical methods of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly described below.

[0054] Figure 1 is a schematic diagram of an application architecture provided in an embodiment of this application;

[0055] Figures 2 to 7 are schematic diagrams of an application architecture provided in an embodiment of this application;

[0056] Figure 8 is a schematic diagram of an image processing method provided in an embodiment of this application;

[0057] Figure 9 is a schematic diagram of the application architecture of an embodiment of this application;

[0058] Figure 10 is a schematic diagram of the application architecture of an embodiment of this application;

[0059] Figure 11 is a schematic diagram of the application architecture of an embodiment of this application;

[0060] Figure 12 is a schematic diagram of the structure of an image processing device provided in an embodiment of this application;

[0061] Figure 13 is a schematic diagram of a device provided in an embodiment of this application;

[0062] Figure 14 is a schematic diagram of a device provided in an embodiment of this application;

[0063] Figure 15 is a schematic diagram of a chip provided in an embodiment of this application. Detailed Implementation

[0064] The embodiments of the present invention will now be described with reference to the accompanying drawings. The terminology used in the embodiments section is for illustrative purposes only and is not intended to limit the scope of the invention.

[0065] 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.

[0066] 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.

[0067] First, the overall workflow of an artificial intelligence system is described, as shown in Figure 1. Figure 1 is a structural diagram of the main framework of artificial intelligence. The framework is then elaborated on from 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 artificial intelligence 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.

[0068] (1) Infrastructure

[0069] 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.

[0070] (2) Data

[0071] 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.

[0072] (3) Data processing

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

[0074] Among them, machine learning and deep learning can perform intelligent information modeling, extraction, preprocessing, and training on data, including symbolization and formalization.

[0075] 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.

[0076] 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.

[0077] (4) General ability

[0078] 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.

[0079] (5) Smart Products and Industry Applications

[0080] 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.

[0081] This application can be applied, but is not limited to, the field of image processing in the field of artificial intelligence. Specifically, it can be applied to image enhancement, image classification, object detection, object recognition, image segmentation and other fields in the field of image processing. The following will introduce several application scenarios that have been implemented in products.

[0082] To better understand the solutions of the embodiments of this application, the possible application scenarios of the embodiments of this application will be briefly introduced below with reference to Figures 2 to 5.

[0083] I. Image Processing Applications

[0084] The product form of this application embodiment can be an image processing application, which can run on a terminal device or a cloud server.

[0085] In one possible implementation, an image processing application can perform image processing tasks and obtain processing results.

[0086] The image processing task can be an image processing task that performs image processing based on the user-input image (e.g., a raw image, including but not limited to a multispectral raw image or a subspectral raw image) to obtain the image processing result.

[0087] In one possible implementation, a user can open an image processing application installed on a terminal device and input an image (e.g., a raw image, including but not limited to a multispectral raw image or a subspectral raw image). The image processing application can process the image using a model trained by the method provided in the embodiments of this application, or by the method 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, playing, saving, uploading to the cloud, etc.).

[0088] In one possible implementation, a user can open an image processing application installed on a terminal device and input an image (e.g., a raw image, including but not limited to a multispectral raw image or a subspectral raw image). The image processing application can send the image (e.g., a raw image, including but not limited to a multispectral raw image or a subspectral raw image) to a cloud-based server. The cloud-based server processes the image (e.g., a raw image, including but not limited to a multispectral raw image or a subspectral raw image) using a model trained by 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, playing, saving, uploading to the cloud, etc.).

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

[0090] Referring to Figure 2, which is a schematic diagram of the functional architecture of the image processing application in an embodiment of this application:

[0091] In one possible implementation, as shown in FIG2, the image processing application 102 may receive input parameters 101 (e.g., including an image (e.g., a raw image, including but not limited to a multispectral raw image or a subspectral raw image)) and generate a processing result 103. The image processing application 102 may execute on at least one computer system (for example) and includes computer code that, when executed by one or more computers, causes the computers to execute a model trained by the methods provided in the embodiments of this application.

[0092] Referring to Figure 3, which is a schematic diagram of the entity architecture of the image processing application running in an embodiment of this application:

[0093] Referring to Figure 3, which illustrates a system architecture, the system may include a terminal 100 and a server 200. The server 200 may include one or more servers (Figure 3 uses one server as an example), and the server 200 can provide image processing functions for one or more terminals.

[0094] The terminal 100 may have an image processing application installed or a webpage related to image processing functions open. The application and webpage can provide an interface. The terminal 100 can receive relevant parameters input by the user on the image processing function 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.

[0095] 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.

[0096] The product form of terminal 100 in Figure 3 is described below;

[0097] 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.

[0098] Figure 4 shows a schematic diagram of an optional hardware structure for terminal 100.

[0099] Referring to Figure 4, terminal 100 may include components such as 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, and a power supply 190. Those skilled in the art will understand that Figure 4 is merely an example of a terminal or multi-functional device and does not constitute a limitation on the terminal or multi-functional device; it may include more or fewer components than illustrated, or combine certain components, or use different components.

[0100] The input unit 130 can be used to receive input digital 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 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.

[0101] Other input devices 132 can receive input images (e.g., raw images, including but not limited to multispectral raw images or subspectral raw images).

[0102] 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 playback of any multimedia file. In this embodiment, the display unit 140 can be used to display the interface and processing results of image processing applications.

[0103] 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.

[0104] 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 and processes data of the terminal 100, 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.

[0105] The memory 120 can be used to store software code related to the image processing method, and the processor 170 can execute the steps of the chip's image 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.

[0106] 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.

[0107] In this embodiment of the application, the radio frequency unit 110 can send images (e.g., raw images, including but not limited to multispectral raw images or subspectral raw images) to the server 200 and receive processing results sent by the server 200.

[0108] 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.

[0109] 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.

[0110] 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.

[0111] Although not shown, terminal 100 may also include a flash, a wireless fidelity (WiFi) module, a Bluetooth module, and sensors with various functions, which will not be described in detail here. Some or all of the methods described below can be applied to terminal 100 as shown in Figure 4.

[0112] The product form of server 200 in Figure 3 is described below;

[0113] Figure 5 provides a schematic diagram of the structure of a server 200. As shown in Figure 5, the server 200 includes a bus 201, a processor 202, a communication interface 203, and a memory 204. The processor 202, the memory 204, and the communication interface 203 communicate with each other via the bus 201.

[0114] 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, only one thick line is used in Figure 5, but this does not indicate that there is only one bus or one type of bus.

[0115] 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).

[0116] 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 disk drive (HDD), or solid state drive (SSD).

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

[0118] 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.

[0119] 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 the server is not limited to the processor-memory architecture described above. The system architecture provided in the embodiments of this application will be described in detail below with reference to Figure 6.

[0120] Figure 6 is a schematic diagram of the system architecture provided in an embodiment of this application. As shown in Figure 6, 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 system 560.

[0121] 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.

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

[0123] The data acquisition device 560 is used to collect training samples. After collecting the training samples, the data acquisition device 560 stores these training samples in the database 530.

[0124] The training device 520 can maintain training samples in the database 530 to obtain the target model / rule 501 from the neural network to be trained.

[0125] 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.

[0126] 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.

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

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

[0129] In Figure 6, the execution device 510 is configured with an input / output (I / O) interface 512 for data interaction with external devices. The user can input data (such as images (e.g., raw images, including but not limited to multispectral raw images or subspectral raw images)) to the I / O interface 512 through the client device 540.

[0130] 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.

[0131] 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.

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

[0133] In the scenario shown in Figure 6, 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.

[0134] It is worth noting that Figure 6 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 figure do not constitute any limitation. For example, in Figure 6, the data storage system 550 is an external memory relative to the execution device 510. In other cases, the data storage system 550 can also be placed in the execution device 510. It should be understood that the aforementioned execution device 510 can be deployed in the client device 540.

[0135] The following describes a more detailed architecture of the execution entity that performs the neural network search method in the embodiments of this application.

[0136] The system architecture provided in this application embodiment will be described in detail below with reference to Figure 6. Figure 6 is a schematic diagram of the system architecture provided in this application embodiment. As shown in Figure 6, 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 system 560.

[0137] 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.

[0138] The data acquisition device 560 is used to collect training samples. After collecting the training samples, the data acquisition device 560 stores these training samples in the database 530.

[0139] 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.

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

[0141] Specifically, the training device 520 can transmit the neural network to the execution device 510.

[0142] In Figure 6, the execution device 510 is configured with an input / output (I / O) interface 512 for data interaction with external devices. Users can input data to the I / O interface 512 through the client device 540.

[0143] 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.

[0144] 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.

[0145] Finally, the I / O interface 512 presents the processing results to the client device 540, thereby providing them to the user.

[0146] From the inference side of the model:

[0147] 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 image processing method in this embodiment.

[0148] 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.

[0149] Specifically, the computing module 511 of the execution device 510 can be a hardware system with the function of executing instructions. The image processing method 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 image processing method provided in this application embodiment.

[0150] 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 of the image processing method provided in the embodiments of this application can also be implemented by the hardware system without the function of executing instructions in the computing module 511 of the execution device 510, which is not limited here.

[0151] From the training side of the model:

[0152] In this embodiment, the training device 520 can obtain the code stored in the memory (not shown in Figure 6, which can be integrated into the training device 520 or deployed separately from the training device 520) to implement the neural network search method in this embodiment.

[0153] 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.

[0154] Specifically, the training device 520 can be a hardware system with the function of executing instructions. The image processing method provided in this application embodiment can be software code stored in memory. The training device 520 can obtain the software code from the memory and execute the obtained software code to train the model.

[0155] It should be understood that the training device 520 can be a combination of a hardware system without instruction execution function and a hardware system with instruction execution function. Some steps of the neural network search method provided in this application embodiment can also be implemented by the hardware system in the training device 520 without instruction execution function, which is not limited here.

[0156] II. Image processing functions provided by the server (like cloud services):

[0157] In one possible implementation, the server can provide image processing services to the client side through an application programming interface (API).

[0158] In this process, the terminal device can send relevant parameters (such as images (e.g., raw images, including but not limited to multispectral raw images or subspectral raw images)) to the server via APIs provided by the cloud. The server can obtain processing results based on the received parameters and return the processing results to the terminal.

[0159] The description of the terminal and server can be found in the above embodiments, and will not be repeated here.

[0160] Figure 7 illustrates the process of using a cloud service with image processing capabilities provided by a cloud platform.

[0161] 1. Activate and purchase image processing services.

[0162] 2. Users can download the software development kit (SDK) corresponding to the image processing 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.

[0163] 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.

[0164] 4. When an image processing application is used, it can trigger an API call for the image processing function when image processing is required. When the application triggers the image processing function, it initiates an API request to the running instance of the image processing function service in the cloud environment. The API request carries an image (e.g., a raw image, including but not limited to multispectral raw images or subspectral raw images), which is then processed by the running instance in the cloud environment to obtain the processing result.

[0165] 5. The cloud environment returns the processing result to the application, thus completing one image processing function call.

[0166] 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.

[0167] (1) Neural Network

[0168] A neural network can be composed of neural units, which can be operational units that take xs and an intercept of 1 as inputs, and whose output can be:

[0169] 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.

[0170] (2) Loss Function

[0171] 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.

[0172] (3) Backpropagation algorithm

[0173] 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.

[0174] (4) Raw image

[0175] RAW format images refer to unprocessed image formats that record the raw data and information from when the camera converts light signals into digital signals. This format retains all the raw information collected on the image sensor, including exposure, white balance, tone, color, and style, facilitating post-processing. RAW format is not the photograph itself, but a file that records the raw data from when the camera takes the picture.

[0176] Early computer vision tasks primarily used raw images of the visible spectrum as input. Specifically, the raw image of the visible spectrum was processed to obtain an RGB image, which was then used for computer vision tasks (such as image enhancement, segmentation, and detection). However, the spectrum corresponding to the raw image of the visible spectrum only represents a portion of the solar spectrum, missing other parts. This leads to performance limitations in certain scenarios. For example, in foggy photography, the light corresponding to the raw visible spectrum cannot penetrate tiny water droplets floating in the air, resulting in a hazy and poor-quality image. Based on this, multispectral computer vision tasks were developed. These tasks take the full spectrum as input, avoiding information loss at the initial stage of the task.

[0177] To address the aforementioned problems, this application provides an image processing method. Referring to FIG8, which is a schematic illustration of an embodiment of the image processing method provided by this application, as shown in FIG8, the image processing method provided by this application may include:

[0178] 901. Obtain multispectral raw images;

[0179] In one possible implementation, the multispectral raw image includes a variety of combinations of data in the ultraviolet spectral band, data in the visible spectral band, and data in the infrared spectral band.

[0180] Multispectral raw images can be acquired by multispectral image sensors. Compared to RGB image sensors, multispectral image sensors based on multispectral technology aim to capture the original spectral signal more completely. Multispectral refers to a spectral detection technology that can simultaneously acquire multiple optical spectrum bands (usually more than three) and extend beyond visible light into both infrared and ultraviolet light.

[0181] In one possible implementation, the multispectral raw image includes: full-spectrum raw data and visible-spectrum raw data. For example, the full-spectrum raw data and the visible-spectrum raw data can be acquired by different sensors. It should be understood that the full-spectrum raw data and the visible-spectrum raw data can be obtained by capturing the same scene using a visual sensor.

[0182] In one possible implementation, image processing needs to be performed on the multispectral raw image. For example, a first image processing task can be performed on the multispectral raw image. The first image processing task can be determined based on the multispectral raw data or can be specified by the user.

[0183] For example, multispectral raw images can be processed using machine learning models to obtain image processing tasks suitable for multispectral raw images. For instance, if the multispectral raw image is captured from a foggy scene, the first image processing task can be a defogging task.

[0184] In this embodiment of the application, information about the first image processing task can be obtained. The information about the first image processing task can be indication information (e.g., task label) or feature representation of the first image processing task.

[0185] In one possible implementation, information suitable for performing a first image processing task on the multispectral raw image can be determined by a machine learning model based on the multispectral raw image (e.g., it may be multispectral raw, raw with a single visible spectral band, or raw with multispectral raw combined with visible spectral bands), or the information for the first image processing task may be user-specified.

[0186] Specifically, in one possible implementation, information suitable for performing a first image processing task on the multispectral raw image can be determined based on the multispectral raw image; or, the user can input information about the first image processing task, and the system can receive the user-inputted information about the first image processing task to be performed on the multispectral raw image.

[0187] 902. Perform spectral decomposition on the multispectral raw image to obtain multiple first subspectral raw images, wherein different first subspectral raw images are images of different subspectral bands in the spectral bands corresponding to the multispectral raw image.

[0188] In the spectral bands of multispectral raw images, for a specific downstream task, some spectral bands may be useful (i.e., they will affect the quality of the task processing results), while other spectral bands are useless or have little effect (i.e., they will not affect the quality of the task processing results). In this case, on the one hand, if the data of these useless spectral bands is used as input when processing downstream tasks, it will lead to the network performing downstream tasks having to process too much data, resulting in a waste of computing power and time. Moreover, due to the high complexity of the input, it will increase the learning difficulty of the model during training.

[0189] In this embodiment, for the downstream task to be performed (e.g., the first image processing task in this embodiment), the multispectral raw image can be spectrally decomposed to obtain multiple sub-spectral images. The magnitude of the effect of each sub-spectral band on the processing task is identified, and the magnitude of this effect is used as a weight to fuse the multiple sub-spectral images. The fusion result reduces (or completely eliminates) the components of data that are useless or have a very small effect on the downstream task, thereby reducing the waste of computing power and time while ensuring the execution quality of the downstream task. Moreover, since useless components of the input are shielded, the learning difficulty of the model can be reduced compared to existing technologies during model training.

[0190] In this embodiment, the multispectral raw image encompasses a wider range of spectral bands than each sub-spectral raw image. The spectral bands of each sub-spectral raw image can be considered a subset of the spectral bands of the multispectral raw image. For example, the spectral bands of the multispectral raw image can be the entire solar spectrum, i.e., the full spectrum, or a subset of the full spectrum. In this embodiment, the multispectral raw image can be a raw image including multiple spectral bands, such as multiple bands from infrared, visible light, and ultraviolet. It should be understood that the spectral bands in this embodiment can include, but are not limited to, infrared, visible light, and ultraviolet, or infrared can be further subdivided into finer-grained near-infrared, mid-infrared, etc.

[0191] The sub-spectral raw images in this application embodiment can be raw images of infrared bands, raw images of visible bands, raw images of ultraviolet bands, or raw images with finer-grained band divisions, such as raw images of near-infrared bands or raw images of mid-infrared bands. Alternatively, they may not strictly follow the above divisions, but rather be raw images of bands that mix multiple band types. For example, a sub-spectral raw image may include raw images of both infrared bands and visible bands in certain wavelength ranges. This application embodiment is not limited to this.

[0192] In one possible implementation, when performing spectral decomposition on a multispectral raw image, the input full spectrum can be decomposed with different emphases depending on the downstream task, achieving optimal overall performance. Specifically, information from the first image processing task can be obtained; based on the multispectral raw image and the information from the first image processing task, (optionally, a machine learning model) the multispectral raw image can be spectrally decomposed to obtain multiple sub-spectral raw images.

[0193] In one possible implementation, for the same raw image, different downstream image processing tasks may lead to different spectral decomposition results. For example, information about a second image processing task can be obtained; based on the multispectral raw image and the information of the second image processing task, the multispectral raw image is spectrally decomposed to obtain multiple second sub-spectral raw images, where different second sub-spectral raw images contain data in different spectral bands; wherein the first image processing task and the second image processing task are different, and at least one first sub-spectral raw image corresponds to a different spectral band than each second sub-spectral raw image corresponds to.

[0194] It should be understood that, in addition to spectral decomposition through machine learning models, the multispectral raw image can also be split along the channel dimension to obtain multiple subspectral raw images.

[0195] 903. Based on the weight information adapted to the first image processing task, the plurality of first sub-spectral raw images are fused to obtain a fusion result; the weight information includes the weight corresponding to each first sub-spectral raw image.

[0196] In one possible implementation, weight information that can be adapted to the first image processing task can be determined, and the plurality of first sub-spectral raw images can be fused to obtain a fusion result; the weight information includes the weight corresponding to each first sub-spectral raw image.

[0197] In one possible implementation, when determining the weights, in addition to using information about the task itself (such as information about the first image processing task in this embodiment) as input, a multispectral raw image can also be used as input, thereby improving the accuracy of the determined weights. Specifically, the weight information adapted to the first image processing task can be determined based on at least one of the information about the first image processing task or the multispectral raw image.

[0198] The embodiments of this application do not limit the form of the weights; they can be floating-point numbers, vectors, matrices, or other forms.

[0199] In one possible implementation, each of the first sub-spectral raw images has a single weight value. That is, elements of each first sub-spectral raw image can share the same weight.

[0200] In one possible implementation, each first sub-spectral raw image corresponds to multiple weight values, and each weight value corresponds to all elements of one channel of the first sub-spectral raw image. That is, elements within the same channel of each first sub-spectral raw image can share the same weight.

[0201] In one possible implementation, each first sub-spectral raw image corresponds to multiple weight values, and each weight value corresponds to an element of the first sub-spectral raw image. That is, each element of each first sub-spectral raw image can correspond to a weight.

[0202] In one possible implementation, at least one of the plurality of first sub-spectral raw images has a weight of 0. That is, for a specific downstream task, information in some spectral bands can be masked out.

[0203] In one possible implementation, after fusing the plurality of first sub-spectral raw images according to weight information adapted to the first image processing task to obtain a fusion result, the first image processing task can be performed on the fusion result.

[0204] The following describes a system architecture of an embodiment of this application with reference to the accompanying drawings. Referring to Figure 9, which is a schematic diagram of a system architecture of an embodiment of this application, the system includes: ① a task-adaptive spectral band selection module; and ② a task-adaptive spectral band decomposition module. The inputs are multispectral raw data, visible spectral raw data (corresponding to visible light raw data in Figure 9), and task labels (optional). The output is the computer vision task processing result. The output format may vary depending on the task, such as images, classification results, detection results, etc.

[0205] The method of this application embodiment will be described below with reference to two specific image processing tasks.

[0206] Referring to Figure 10, taking "image dehazing" as a downstream computer vision task as an example, the "task label" is adaptively extracted from the image (i.e., the input of the entire system consists of only two raw images); the adaptive band decomposition module is selected.

[0207] Task label extraction: Using hazy multispectral RAW and hazy visible light RAW images as input, extract the task label corresponding to "image dehazing" from the two RAW images.

[0208] Spectral decomposition: Taking multispectral raw, visible light raw, and dehazing task tags as input, the full-spectrum multispectral raw is decomposed into the following sub-bands: ultraviolet, visible light, near-infrared, and mid-infrared. "Visible light" is derived from visible light raw.

[0209] Band selection: Taking visible light raw and dehazing task labels as input, the selection weights of each sub-band obtained from decomposition in step 2 are output as follows: 0 / 0.5 / 0.5 / 0.

[0210] Fusion and subsequent processing: The sub-bands are multiplied by their corresponding weights and then concatenated along the channel dimension. The result is then fed into the subsequent processing module UNet and output as a dehazed image.

[0211] Referring to Figure 11, taking "sunscreen detection" as a downstream computer vision task as an example, "task label (sunscreen detection task)" is one of the system inputs (i.e., the input of the entire system includes two raw images and the task label); the adaptive band decomposition module is not selected.

[0212] Task tag extraction: No additional extraction is required; the input tags are taken as the tags needed for subsequent processing.

[0213] Band decomposition: Not selected. The multispectral raw data is directly split in the channel dimension to obtain multiple sub-bands. Here, we take 4 sub-bands as an example.

[0214] Band selection: Using visible light raw and sunscreen detection task labels as input, the selection weights of each sub-band obtained in output 2 are: 0.5 / 0.5 / 0 / 0.

[0215] Fusion and subsequent processing: The sub-bands are multiplied by their corresponding weights and concatenated along the channel dimension before being input into the subsequent processing module Cascaded RCNN to output the sunscreen detection results.

[0216] Referring to FIG12, FIG12 is a schematic diagram of an embodiment of an image processing apparatus provided in this application. As shown in FIG12, the image processing apparatus 1200 provided in this application embodiment may include:

[0217] Acquisition module 1201 is used to acquire multispectral raw images;

[0218] The description of the acquisition module 1201 can be found in the description of step 901 in the above embodiments, and will not be repeated here.

[0219] Processing module 1202 is used to perform spectral decomposition on the multispectral raw image to obtain multiple first subspectral raw images, wherein different first subspectral raw images are images of different subspectral bands in the spectral bands corresponding to the multispectral raw image; and to fuse the multiple first subspectral raw images according to weight information adapted to the first image processing task to obtain a fusion result; wherein the weight information includes the weight corresponding to each first subspectral raw image.

[0220] The description of the processing module 1202 can be found in the description of steps 902 and 903 in the above embodiments, and will not be repeated here.

[0221] In one possible implementation, the device further includes:

[0222] The inference module is used to perform the first image processing task on the fusion result.

[0223] In one possible implementation, the multispectral raw image includes a variety of combinations of data in the ultraviolet spectral band, data in the visible spectral band, and data in the infrared spectral band.

[0224] In one possible implementation, the processing module 1202 is specifically used for:

[0225] Obtain information about the first image processing task; based on the multispectral raw image and the information about the first image processing task, perform spectral decomposition on the multispectral raw image to obtain multiple subspectral raw images, wherein the information about the first image processing task is the indication information or feature representation of the first image processing task.

[0226] In one possible implementation, the processing module 1202 is further configured to:

[0227] Obtain information about the second image processing task;

[0228] Based on the information from the multispectral raw image and the second image processing task, the multispectral raw image is spectrally decomposed to obtain multiple second subspectral raw images. Different second subspectral raw images contain data from different spectral bands. The first image processing task and the second image processing task are different, and at least one of the spectral bands corresponding to the first subspectral raw image is different from the spectral bands corresponding to each of the second subspectral raw images.

[0229] In one possible implementation, the processing module 1202 is further configured to:

[0230] Based on the weight information adapted to the second image processing task, the plurality of second sub-spectral raw images are fused to obtain a fusion result; wherein the weight information adapted to the first image processing task and the weight information adapted to the second image processing task are different.

[0231] The processing module 1202 is specifically used for:

[0232] The multispectral raw image is split along the channel dimension to obtain multiple subspectral raw images.

[0233] In one possible implementation, the processing module 1202 is further configured to:

[0234] The weight information adapted to the first image processing task is determined based on at least one of the information from the first image processing task or the multispectral raw image.

[0235] In one possible implementation, the processing module 1202 is further configured to:

[0236] Based on the multispectral raw image, determine information suitable for performing a first image processing task on the multispectral raw image; or...

[0237] The system receives user input regarding a first image processing task to be performed on the multispectral raw image.

[0238] In one possible implementation, the multispectral raw image includes: full-spectrum raw data and visible spectral raw data.

[0239] In one possible implementation, the weight corresponding to each of the first sub-spectral raw images is a single weight value; or,

[0240] Each of the first sub-spectral raw images corresponds to multiple weight values, and each weight value corresponds to all elements of one channel of the first sub-spectral raw image; or...

[0241] Each of the first sub-spectral raw images has multiple weight values, and each weight value corresponds to an element of the first sub-spectral raw image.

[0242] In one possible implementation, at least one of the plurality of first subspectral raw images has a weight of 0.

[0243] The following describes an execution device provided in an embodiment of this application. Please refer to Figure 13, which is a schematic diagram of the structure 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 here. Specifically, the execution device 1300 includes: a receiver 1301, a transmitter 1302, a processor 1303, and a memory 1304 (the number of processors 1303 in the execution device 1300 can be one or more; Figure 13 shows one processor as an example). The processor 1303 may include an application processor 13031 and a communication processor 13032. In some embodiments of this application, the receiver 1301, transmitter 1302, processor 1303, and memory 1304 can be connected via a bus or other means.

[0244] 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.

[0245] 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.

[0246] 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 circuits 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 in memory 1304 and, in conjunction with its hardware, completes the steps of the above method.

[0247] 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; transmitter 1302 can also be used to send instructions to the disk group to modify the data in the disk group.

[0248] In one embodiment of this application, the processor 1303 is used to execute the image processing method executed by the execution device in the above embodiment.

[0249] This application embodiment also provides a training device. Please refer to Figure 14, which is a structural schematic diagram of the training device provided in this application embodiment. The training device 1400 may deploy the device described in the embodiment corresponding to Figure 12. Specifically, the training device 1400 is implemented by one or more servers. The training device 1400 may vary considerably 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 may be temporary or persistent storage. The program stored in the storage media 1430 may include one or more modules (not shown in the figure), and 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.

[0250] 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.

[0251] In this embodiment, the central processing unit 1414 is used to execute the method in the embodiment corresponding to FIG8.

[0252] 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 image processing apparatus, or causes the computer to perform steps as performed by the aforementioned image processing apparatus.

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

[0254] 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 image processing method described in the above embodiments, or to cause the chip within the training device to execute the image 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).

[0255] Specifically, please refer to Figure 15, which is a schematic diagram of a chip structure provided in an embodiment of this application. This 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.

[0256] 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 circuits capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 1503 is a general-purpose matrix processor.

[0257] 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.

[0258] 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.

[0259] 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.

[0260] 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.

[0261] 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.

[0262] The vector computation unit 1507 includes multiple arithmetic processing units that further process the output of the computation circuit as 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.

[0263] 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 performing linear interpolation on the feature planes extracted by the convolutional layer, or, for example, accumulating a vector of 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 an activation input to the computation circuit 1503, for example, for use in subsequent layers of the neural network.

[0264] The instruction fetch buffer 1509 connected to the controller 1504 is used to store the instructions used by the controller 1504;

[0265] 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.

[0266] 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.

[0267] 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.

[0268] 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 the preferred 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.

[0269] In the above embodiments, the 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, in the form of a computer program product.

[0270] 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. An image processing method, characterized in that, The method includes: Acquire multispectral raw images; The multispectral raw image is spectrally decomposed to obtain multiple first subspectral raw images. Different first subspectral raw images are images of different subspectral bands in the spectral bands corresponding to the multispectral raw image. Based on the weight information adapted to the first image processing task, the plurality of first sub-spectral raw images are fused to obtain a fusion result; the weight information includes the weight corresponding to each first sub-spectral raw image.

2. The method according to claim 1, characterized in that, The method further includes: The first image processing task is performed on the fusion result.

3. The method according to claim 1 or 2, characterized in that, The multispectral raw image includes a variety of combinations of the following: data in the ultraviolet spectral band, data in the visible spectral band, and data in the infrared spectral band.

4. The method according to any one of claims 1 to 3, characterized in that, The step of performing spectral decomposition on the multispectral raw image to obtain multiple sub-spectral raw images includes: Obtain information about the first image processing task; Based on the information from the multispectral raw image and the first image processing task, the multispectral raw image is spectrally decomposed to obtain multiple subspectral raw images. The information from the first image processing task is the indication information or feature representation of the first image processing task.

5. The method according to claim 4, characterized in that, The method further includes: Obtain information about the second image processing task; Based on the information from the multispectral raw image and the second image processing task, the multispectral raw image is spectrally decomposed to obtain multiple second subspectral raw images. Different second subspectral raw images contain data from different spectral bands. The first image processing task and the second image processing task are different, and at least one of the spectral bands corresponding to the first subspectral raw image is different from the spectral bands corresponding to each of the second subspectral raw images.

6. The method according to claim 5, characterized in that, The method further includes: Based on the weight information adapted to the second image processing task, the plurality of second sub-spectral raw images are fused to obtain a fusion result; wherein the weight information adapted to the first image processing task and the weight information adapted to the second image processing task are different.

7. The method according to any one of claims 1 to 6, characterized in that, The step of performing spectral decomposition on the multispectral raw image to obtain multiple sub-spectral raw images includes: The multispectral raw image is split along the channel dimension to obtain multiple subspectral raw images.

8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: The weight information adapted to the first image processing task is determined based on at least one of the information from the first image processing task or the multispectral raw image.

9. The method according to any one of claims 4 to 8, characterized in that, The method further includes: Based on the multispectral raw image, determine information suitable for performing a first image processing task on the multispectral raw image; or... The system receives user input regarding a first image processing task to be performed on the multispectral raw image.

10. The method according to any one of claims 1 to 9, characterized in that, The multispectral raw image includes: full-spectrum raw data and visible spectral raw data.

11. The method according to any one of claims 1 to 10, characterized in that, Each of the first sub-spectral raw images corresponds to a weight value; or... Each first sub-spectral raw image corresponds to multiple weight values, and each weight value corresponds to all elements of one channel of the first sub-spectral raw image; or, Each of the first sub-spectral raw images has multiple weight values, and each weight value corresponds to an element of the first sub-spectral raw image.

12. The method according to any one of claims 1 to 11, characterized in that, At least one of the plurality of first sub-spectral raw images has a weight of 0.

13. An image processing apparatus, characterized in that, The device includes: The acquisition module is used to acquire multispectral raw images; The processing module is used to perform spectral decomposition on the multispectral raw image to obtain multiple first sub-spectral raw images, wherein different first sub-spectral raw images are images of different sub-spectral bands in the spectral bands corresponding to the multispectral raw image; and to fuse the multiple first sub-spectral raw images according to weight information adapted to the first image processing task to obtain a fusion result; wherein the weight information includes the weight corresponding to each first sub-spectral raw image.

14. The apparatus according to claim 13, characterized in that, The processing module is specifically used for: Obtain information about the first image processing task; based on the multispectral raw image and the information about the first image processing task, perform spectral decomposition on the multispectral raw image to obtain multiple subspectral raw images, wherein the information about the first image processing task is the indication information or feature representation of the first image processing task.

15. The apparatus according to claim 14, characterized in that, The processing module is further configured to: Obtain information about the second image processing task; Based on the information from the multispectral raw image and the second image processing task, the multispectral raw image is spectrally decomposed to obtain multiple second subspectral raw images. Different second subspectral raw images contain data from different spectral bands. The first image processing task and the second image processing task are different, and at least one of the spectral bands corresponding to the first subspectral raw image is different from the spectral bands corresponding to each of the second subspectral raw images.

16. The apparatus according to any one of claims 13 to 15, characterized in that, The processing module is specifically used for: The multispectral raw image is split along the channel dimension to obtain multiple subspectral raw images.

17. The apparatus according to any one of claims 13 to 15, characterized in that, The processing module is further configured to: The weight information adapted to the first image processing task is determined based on at least one of the information from the first image processing task or the multispectral raw image.

18. The apparatus according to any one of claims 13 to 17, characterized in that, The multispectral raw image includes: full-spectrum raw data and visible spectral raw data.

19. The apparatus according to any one of claims 13 to 18, characterized in that, Each of the first sub-spectral raw images corresponds to a weight value; or... Each first sub-spectral raw image corresponds to multiple weight values, and each weight value corresponds to all elements of one channel of the first sub-spectral raw image; or, Each of the first sub-spectral raw images has multiple weight values, and each weight value corresponds to an element of the first sub-spectral raw image.

20. The apparatus according to any one of claims 13 to 19, characterized in that, The weight of at least one of the plurality of first sub-spectral raw images is 0.

21. A computing device, characterized in that, The device includes at least one processor and at least one memory, wherein the at least one memory stores computer-readable instructions; the at least one processor executes the computer-readable instructions to cause the computing device to perform the method as described in any one of claims 1 to 12.

22. A computer-readable storage medium, characterized in that, Includes computer-readable instructions; the computer-readable instructions are used to implement the method according to any one of claims 1 to 12.

23. A computer program product, characterized in that, Includes computer-readable instructions; the computer-readable instructions are used to implement the method according to any one of claims 1 to 12.

24. A chip, characterized in that, It includes at least one processing unit and an interface circuit, the interface circuit being used to provide program instructions or data to the at least one processing unit, the at least one processing unit being used to execute the program instructions to implement the method of any one of claims 1 to 12.