WO2022222652A1 - Image processing method and apparatus, storage medium, device, and model training method - Google Patents

Image processing method and apparatus, storage medium, device, and model training method Download PDF

Info

Publication number
WO2022222652A1
WO2022222652A1 PCT/CN2022/081257 CN2022081257W WO2022222652A1 WO 2022222652 A1 WO2022222652 A1 WO 2022222652A1 CN 2022081257 W CN2022081257 W CN 2022081257W WO 2022222652 A1 WO2022222652 A1 WO 2022222652A1
Authority
WO
WIPO (PCT)
Prior art keywords
preset
image data
raw image
neural network
network model
Prior art date
Application number
PCT/CN2022/081257
Other languages
French (fr)
Chinese (zh)
Inventor
孙亚锋
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2022222652A1 publication Critical patent/WO2022222652A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis

Definitions

  • Embodiments of the present application provide an image processing method, apparatus, storage medium, device, and model training method, which can improve image processing efficiency.
  • the embodiments of the present application provide an image processing method, including:
  • the RAW image data is processed by an AI processor, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and the first RAW image data corresponding to the preset RAW image data.
  • a label information is trained.
  • an embodiment of the present application also provides a model training method, including:
  • the preset neural network model is trained according to the input data and the output data to determine model parameters.
  • an embodiment of the present application further provides an image processing apparatus, including:
  • the image acquisition module is used to acquire RAW image data through the image sensor
  • the image processing module is used to process the RAW image data through an AI processor, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and preset
  • the first label information corresponding to the RAW image data is obtained by training.
  • an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program runs on a computer, the computer is made to execute the method provided by any embodiment of the present application.
  • an image processing method or, when the computer program runs on a computer, causing the computer to execute the neural network model training method provided by any embodiment of the present application.
  • the embodiments of the present application further provide an electronic device
  • an image sensor including an image sensor, and an AI processor connected to the image sensor;
  • the image sensor for acquiring RAW image data
  • the AI processor is used to process the RAW image data, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and the preset RAW image.
  • the first label information corresponding to the data is obtained by training.
  • an embodiment of the present application further provides an electronic device, including a processor and a memory, the memory has a computer program, and the processor is used to execute the computer program provided by any embodiment of the present application by invoking the computer program.
  • the processor is configured to execute the neural network model training method provided by any embodiment of the present application by invoking the computer program.
  • FIG. 1 is a schematic flowchart of a first type of image processing method provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a first structure of an electronic device provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a second structure of an electronic device according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of an operation manner of a convolution kernel in a preset neural network model in an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a RAW image data in an embodiment of the present application.
  • FIG. 6 is a schematic diagram of pixel separation in an image processing method provided by an embodiment of the present application. .
  • FIG. 7 is a schematic structural diagram of an image processing apparatus provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a third structure of an electronic device provided by an embodiment of the present application.
  • the embodiment of the present application provides an image processing method, and the execution body of the image processing method may be the image processing apparatus provided by the embodiment of the present application, or an electronic device integrated with the image processing apparatus, wherein the image processing apparatus may adopt hardware or implemented in software.
  • the electronic device may be a smartphone, a tablet computer, a palmtop computer, a notebook computer, or a desktop computer, a vehicle terminal, and other devices.
  • the application provides an image processing method, including:
  • the RAW image data is processed by an AI processor, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and the first RAW image data corresponding to the preset RAW image data.
  • a label information is trained.
  • the RAW image data is processed by an AI processor, including:
  • the multi-channel RAW image data is processed by an AI processor.
  • the preset neural network model is an image classification model, an object detection model, an image segmentation model or an instance segmentation model.
  • the method before acquiring the RAW image data through the image sensor, the method further includes:
  • the neural network model is trained based on the input data and the output data to determine model parameters.
  • the present application also provides a neural network model training method, including:
  • the preset neural network model is trained according to the input data and the output data to determine model parameters.
  • acquiring preset RAW image data as input data for the preset neural network model includes:
  • the second label information of the first preset RGB image data is mapped to the preset RAW image data to obtain first label information, which is used as output data of the preset neural network model.
  • acquiring the first label information corresponding to the preset RAW image data as the output data of the preset neural network model includes:
  • the second label information of the preset RGB image data is mapped to the preset RAW image data to obtain the first label information, which is used as output data of model training.
  • FIG. 1 is a schematic flowchart of a first image processing method provided by an embodiment of the present application.
  • the specific process of the image processing method provided by the embodiment of the present application may be as follows:
  • FIG. 2 is a schematic diagram of a first structure of an electronic device according to an embodiment of the present application.
  • the electronic device is provided with an image sensor and an AI processor.
  • the AI processor is a processor capable of performing neural network operations.
  • the operations of the neural network model can be performed by any processor capable of executing neural networks, such as GPU (Graphics Processing Unit, graphics processor), DSP (Digital Signal Process, digital signal processor), NPU (Neural-network Processing Unit, embedded AI processor), CPU (central processing unit, central processing unit), etc.
  • GPU Graphics Processing Unit, graphics processor
  • DSP Digital Signal Process, digital signal processor
  • NPU Neuro-network Processing Unit
  • embedded AI processor embedded AI processor
  • CPU central processing unit, central processing unit
  • FIG. 3 is a schematic diagram of a second structure of an electronic device provided by an embodiment of the present application.
  • FIG. 3 depicts a specific implementation of the electronic device provided by the embodiment of the present application, wherein the electronic device includes a data acquisition module, a data receiving module, and an AI processor, and the data acquisition module includes one or more image sensors (in the figure Multiple image sensors are shown), the RAW image data collected by the image sensor is transmitted to the data receiving module through the transmitting-end media access controller and the transmitting-end physical layer device, and the data receiving module includes the receiving-end physical layer device and the receiving-end media connected in turn.
  • the access controller, the first buffer unit and the data interface unit, and the data receiving module transmits the received RAW image data to the AI processor for processing.
  • the AI processor includes an AI computing unit, a first cache unit, and a storage unit, and the storage unit may be a DDR.
  • the first buffer unit is used for buffering the received RAW image data
  • the storage unit is used for storing the preset neural network model
  • the AI computing unit is used for processing the RAW image data through the preset neural network model.
  • the AI processor stores a pre-trained preset neural network model, and the preset neural network model may be an image classification model, a target detection model, an image segmentation model or an instance segmentation model.
  • the preset neural network model includes a convolution layer. Please refer to FIG. 4 .
  • FIG. 4 is a schematic diagram of an operation manner of a convolution kernel in the preset neural network model in an embodiment of the present application.
  • the 6 ⁇ 6 input feature map is subjected to the convolution operation of a convolution kernel with a size of 2 ⁇ 2 and a stride of 2 to obtain a 3 ⁇ 3 output feature map.
  • the electronic device shoots the scene to be detected through the image sensor to generate RAW image data.
  • the RAW image (that is, the Bayer image with the suffix .raw format) data is CMOS (Complementary Metal Oxide Semiconductor, complementary metal oxide semiconductor) or CCD (Charge Coupled Device, charge coupled device image sensor)
  • CMOS Complementary Metal Oxide Semiconductor, complementary metal oxide semiconductor
  • CCD Charge Coupled Device, charge coupled device image sensor
  • the captured light source signal is converted into the original data of the digital signal.
  • the original RAW image data has a higher gray level and preserves the complete data information.
  • the three colors of RGB in the RAW image data can be arranged in various ways, such as RGGB, GRBG, GBRG, and BGGR.
  • FIG. 5 is a schematic diagram of RAW image data according to an embodiment of the present application.
  • the RAW image to be detected is acquired, the RAW image to be detected is transmitted to the AI processor, and the RAW image to be detected is used as input data of the preset neural network model for image processing.
  • the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and corresponds to the preset RAW image data
  • the first label information of the training is obtained.
  • the RAW image to be detected is input into a preset neural network model for calculation.
  • the preset neural network model is a classification model
  • the detected object category can be output.
  • the electronic device is a vehicle identification device, and the vehicle identification device can be an in-vehicle device.
  • the image in front of the vehicle is captured in real time by an image sensor to obtain a Raw image to be detected, and the raw image to be detected is transmitted to the AI processor for image processing. Determine if there is a vehicle ahead.
  • the preset neural network model is obtained by performing model training according to the preset RAW image data and the first label information corresponding to the preset RAW image data. For example, acquiring preset RAW image data as input data of a preset neural network model; acquiring first label information corresponding to the preset RAW image data as output data of the preset neural network model; according to the input The data and the output data train the preset neural network model to determine model parameters.
  • the format of the input data used is the RAW format.
  • the default neural network model needs to keep the format and size of the input data the same during the training phase and the application phase. Based on this, the preset neural network model also needs to use RAW images as input data for model training during the training phase.
  • the format of image data used for model training is generally RGB format, which is a visual image format, and users can directly add label information to samples as needed.
  • RGB format is a visual image format
  • users can directly add label information to samples as needed.
  • images in RAW format can be collected as input data for model training, they cannot be directly labeled due to the invisibility of RAW format.
  • RAW data records the most original image information output by the image sensor and cannot be directly used for display, so users cannot directly mark RAW data.
  • the present application adopts different data processing methods for different data formats in the data set to obtain input data and output data for model training.
  • acquiring preset RAW image data as input data for the preset neural network model includes: acquiring first preset RGB image data; The first preset RGB image data is converted into corresponding preset RAW image data, and the preset RAW image data is used as input data of the preset neural network model.
  • Obtaining the first label information corresponding to the preset RAW image data as the output data of the preset neural network model includes: obtaining second label information corresponding to the first preset RGB image data; The second label information of a preset RGB image data is mapped to the preset RAW image data, and the first label information is obtained, which is used as the output data of the preset neural network model.
  • a data set is obtained, the data set includes several preset RGB image data, and the preset RGB image data is converted according to the pre-trained full preset neural network model to obtain each preset RGB image data The corresponding preset RAW image data.
  • a pixel in a RAW image has only one color information of the three colors of RGB, while a pixel in the RGB image data contains three color information of RGB.
  • a fully convolutional network is pre-built.
  • the preset fully convolutional neural network includes a fully convolutional part and a deconvolutional part. After the input data is subjected to the convolution operation of the fully convolutional part, depth features are obtained, and then After the operation of the deconvolution part, the output image of the same size as the original input image can be obtained.
  • the preset RGB image data can be directly displayed on the computer, and the user can mark the preset RGB image data correspondingly according to the type of the preset neural network model.
  • the preset neural network model is the target detection model
  • the label information can be the bounding box of the target subject in the sample image.
  • the user manually marks the rectangular bounding box of the image to be recognized on the image, and the corresponding position coordinates and Size information, as label information.
  • the convolutional neural network is an image classification model
  • the label information is the category information of the target subject in the sample image.
  • the preset RGB image data and the preset RAW image data have the same image size.
  • the preset RGB image data can be The second label information on the data is directly mapped to the preset RAW image data according to its position to obtain the corresponding first label information. In this way, the indirect marking of the preset RAW image data can be completed.
  • the preset neural network model is trained by preset RAW image data and its first label information to determine model parameters.
  • acquiring the first label information corresponding to the preset RAW image data as the output data of the preset neural network model includes: acquiring the preset corresponding to the preset RAW image data RGB image data, and second label information of the preset RGB image data; mapping the second label information of the preset RGB image data to the preset RAW image data to obtain the first label information, which is used as model training output data.
  • the data set used for model training includes the preset RAW image data, but the sample RAAW image cannot be marked directly, so the preset RAW image data is converted into the corresponding preset RGB image data and then marked to obtain the first RAW image data.
  • the second label information is mapped to the preset RAW image data to obtain the first label information, which is used as the output data of model training. In this way, the indirect marking of the preset RAW image data can be completed.
  • the preset neural network model is trained by preset RAW image data and its first label information to determine model parameters.
  • the present application is not limited by the execution order of the described steps, and certain steps may also be performed in other sequences or simultaneously under the condition of no conflict.
  • the RAW image data is obtained through the image sensor; the RAW image data is processed through the AI processor, because the preset neural network model is pre- Assuming that the RAW image data and the corresponding first label information are obtained by training, in the image processing stage, the original RAW image output by the image sensor can be used for direct detection without ISP processing, which improves the efficiency of image processing.
  • processing the RAW image data by the AI processor includes: converting the RAW image data from single-channel RAW image data to multi-channel RAW image data; and processing the multi-channel RAW image data by the AI processor Channel RAW image data for processing.
  • the original RAW image to be detected is a single-channel image.
  • it can be processed by pixel separation to obtain multi-channel RAW image data.
  • the feature map on the channel corresponds to only one color.
  • the specific pixel separation manner is determined according to the arrangement manner of the pixels in the RAW image to be detected.
  • FIG. 6 is a schematic diagram of pixel separation in an image processing method provided by an embodiment of the present application.
  • the pixels in the RAW image to be detected are arranged in the order of RGGB.
  • a channel map of four channels is obtained, and the four channels are arranged in the order of R, G, G, and B.
  • the pixel arrangement order in the RAW image to be detected may be GRBG and GBRG, then the pixel arrangement is adjusted to RGGB by deleting the first row of pixels or the first column of pixels, and then the pixel is adjusted to RGGB.
  • the RAW image to be detected needs to be converted in the model training stage in the image stage, the input data needs to be subjected to the same pixel separation processing in the model training stage, and the channel order should be consistent.
  • An embodiment of the present application further provides a model training method, including: acquiring preset RAW image data as input data of a neural network model; acquiring first label information corresponding to the preset RAW image data as the neural network model output data; train the preset neural network model according to the input data and the output data to determine model parameters.
  • acquiring preset RAW image data as input data for the preset neural network model includes: acquiring first preset RGB image data; The first preset RGB image data is converted into corresponding preset RAW image data, and the preset RAW image data is used as input data of the preset neural network model.
  • Obtaining the first label information corresponding to the preset RAW image data as the output data of the preset neural network model includes: obtaining second label information corresponding to the first preset RGB image data; The second label information of a preset RGB image data is mapped to the preset RAW image data, and the first label information is obtained, which is used as the output data of the preset neural network model.
  • acquiring first label information corresponding to the preset RAW image data as output data of the preset neural network model includes: acquiring preset RGB image data corresponding to the preset RAW image data , and the second label information of the preset RGB image data; map the second label information of the preset RGB image data to the preset RAW image data to obtain the first label information as the output data of model training .
  • the model training methods provided in the above embodiments can be applied to a server. After the server performs model training, it updates model parameters, and sends the updated model parameters to the electronic device, so that the electronic device updates its stored presets. Neural network model.
  • the RAW image is used as the input data for model training, and the RGB image data corresponding to the RAW image is marked, and then the label information is mapped, so as to obtain the preset RAW image data with the label information, Carry out model training. Since the preset neural network model is obtained by training the preset RAW image data and the corresponding label information, in the image processing stage, the original RAW image output by the image sensor can be used for direct detection without ISP processing. Improve image processing efficiency.
  • the present application also provides an image processing device, comprising:
  • the image acquisition module is used to acquire RAW image data through the image sensor
  • the image processing module is used to process the RAW image data through an AI processor, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and preset
  • the first label information corresponding to the RAW image data is obtained by training.
  • the image acquisition module for converting the RAW image data from single-channel RAW image data to multi-channel RAW image data
  • the multi-channel RAW image data is processed by an AI processor.
  • the preset neural network model is an image classification model, an object detection model, an image segmentation model or an instance segmentation model.
  • the apparatus further includes:
  • a model training module for acquiring the preset RAW image data as input data for the preset neural network model
  • the neural network model is trained based on the input data and the output data to determine model parameters.
  • the embodiment of the present application also provides a neural network model training device, including:
  • a model training module for acquiring the preset RAW image data as input data for the preset neural network model
  • the neural network model is trained based on the input data and the output data to determine model parameters.
  • model training module is also used to:
  • the second label information of the first preset RGB image data is mapped to the preset RAW image data to obtain first label information, which is used as output data of the preset neural network model.
  • model training module is also used to:
  • the second label information of the preset RGB image data is mapped to the preset RAW image data to obtain the first label information, which is used as output data of model training.
  • an image processing apparatus is also provided.
  • FIG. 7 is a schematic structural diagram of an image processing apparatus 300 according to an embodiment of the present application.
  • the image processing apparatus 300 is applied to electronic equipment, and the image processing apparatus 300 includes an image acquisition module 301 and an image processing module 302, as follows:
  • An image acquisition module 301 configured to acquire RAW image data through an image sensor
  • the image processing module 302 is configured to process the RAW image data through an AI processor, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and the preset RAW image data. It is assumed that the first label information corresponding to the RAW image data is obtained by training.
  • the image processing module 302 is further configured to convert the RAW image data from single-channel RAW image data to multi-channel RAW image data; and process the multi-channel RAW image data through an AI processor.
  • the preset neural network model is an image classification model, an object detection model, an image segmentation model or an instance segmentation model.
  • the image processing apparatus 300 further includes:
  • a model training module for acquiring the preset RAW image data as input data for the preset neural network model
  • the neural network model is trained based on the input data and the output data to determine model parameters.
  • the model training module is further configured to obtain the first preset RGB image data
  • the first preset RGB image data is converted into corresponding preset RAW image data, and the preset RAW image data is used as the input data of the preset neural network model ;
  • the model training module is further configured to acquire preset RGB image data corresponding to the preset RAW image data, and second label information of the preset RGB image data;
  • the second label information of the preset RGB image data is mapped to the preset RAW image data to obtain the first label information, which is used as output data of model training.
  • the image processing device proposed in the embodiments of the present application acquires RAW image data through an image sensor when performing image processing, and processes the RAW image data through an AI processor, because the preset neural network model Assuming that the RAW image data and the corresponding first label information are obtained by training, in the image processing stage, the original RAW image output by the image sensor can be used for direct detection without ISP processing, which improves the efficiency of image processing.
  • FIG. 8 is a third schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device 400 includes a processor 401 having one or more processing cores, a memory 402 having one or more computer-readable storage media, and a computer program stored on the memory 402 and executable on the processor.
  • the processor 401 is electrically connected to the memory 402 .
  • the processor 401 is the control center of the electronic device 400, uses various interfaces and lines to connect various parts of the entire electronic device 400, runs or loads the software programs and/or modules stored in the memory 402, and calls the software programs and/or modules stored in the memory 402. to perform various functions of the electronic device 400 and process data, so as to monitor the electronic device 400 as a whole.
  • the processor 401 in the electronic device 400 loads the instructions corresponding to the processes of one or more application programs into the memory 402 according to the following steps, and the processor 401 executes the instructions stored in the memory. 402 application in order to achieve various functions:
  • the RAW image data is processed by an AI processor, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and the first RAW image data corresponding to the preset RAW image data.
  • a label information is trained.
  • the electronic device 400 further includes: a touch display screen 403 , a radio frequency circuit 404 , an audio circuit 405 , an input unit 406 and a power supply 407 .
  • the processor 401 is electrically connected to the touch display screen 403 , the radio frequency circuit 404 , the audio circuit 405 , the input unit 406 and the power supply 407 , respectively.
  • the structure of the electronic device shown in FIG. 5 does not constitute a limitation on the electronic device, and may include more or less components than the one shown, or combine some components, or arrange different components.
  • the touch screen 403 can be used to display a graphical user interface and receive operation instructions generated by a user acting on the graphical user interface.
  • the touch display 403 may include a display panel and a touch panel.
  • the display panel can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof.
  • the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light emitting diode (OLED, Organic Light-Emitting Diode), and the like.
  • the touch panel can be used to collect the user's touch operations on or near it (such as the user's operations on or near the touch panel using a finger, stylus, etc., any suitable object or accessory), and generate corresponding operations instruction, and the operation instruction executes the corresponding program.
  • the touch panel may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the touch controller. To the processor 401, and can receive the command sent by the processor 401 and execute it.
  • the touch panel can cover the display panel, and when the touch panel detects a touch operation on or near it, it is transmitted to the processor 401 to determine the type of the touch event, and then the processor 401 provides the display panel according to the type of the touch event. Corresponding visual output.
  • the touch panel and the display panel may be integrated into the touch display screen 403 to implement input and output functions.
  • the touch panel and the touch panel may be used as two independent components to implement input and output functions. That is, the touch display screen 403 can also be used as a part of the input unit 406 to realize the input function.
  • the radio frequency circuit 404 can be used to send and receive radio frequency signals, so as to establish wireless communication with the network device or other electronic devices through wireless communication, and to send and receive signals with the network device or other electronic devices.
  • the audio circuit 405 may be used to provide an audio interface between the user and the electronic device through speakers and microphones.
  • the audio circuit 405 can convert the received audio data into an electrical signal, and transmit it to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is converted after being received by the audio circuit 405.
  • the audio data is output to the processor 401 for processing, and then sent to, for example, another electronic device via the radio frequency circuit 404, or the audio data is output to the memory 402 for further processing.
  • the audio circuit 405 may also include an earphone jack to provide for communication of peripheral headphones with the electronic device.
  • the input unit 406 can be used to receive input numbers, character information or user characteristic information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control .
  • character information or user characteristic information such as fingerprint, iris, facial information, etc.
  • Power supply 407 is used to power various components of electronic device 400 .
  • the power supply 407 may be logically connected to the processor 401 through a power management system, so that functions such as charging, discharging, and power consumption management are implemented through the power management system.
  • the power source 407 may also include one or more DC or AC power sources, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and any other components.
  • the electronic device 400 may further include an image sensor, a sensor, a Wi-Fi module, a Bluetooth module, and the like, which will not be repeated here.
  • the electronic device provided in this embodiment acquires RAW image data through an image sensor when performing image processing; and processes the RAW image data through an AI processor, because the preset neural network model is obtained by preset RAW image data.
  • the image data and the corresponding first label information are obtained by training.
  • the original RAW image output by the image sensor can be used for direct detection without ISP processing, which improves the efficiency of image processing.
  • the embodiments of the present application provide a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer programs can be loaded by a processor to execute any of the image processing methods provided by the embodiments of the present application.
  • the computer program may perform the following steps:
  • the RAW image data is processed by an AI processor, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and the first RAW image data corresponding to the preset RAW image data.
  • a label information is trained.
  • the computer program can be loaded by the processor to execute the steps in any of the neural network model training methods provided in the embodiments of the present application.
  • the computer program may perform the following steps:
  • the storage medium may include: a read-only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and the like.
  • ROM Read Only Memory
  • RAM Random Access Memory
  • magnetic disk or an optical disk and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

Embodiments of the present application disclose an image processing method and apparatus, a storage medium, a device, and a model training method. The image processing method comprises: obtaining RAW image data by means of an image sensor; and processing the RAW image data by means of an AI processor, wherein the AI processor comprises a preset neural network model, and the preset neural network model is obtained by training according to preset RAW image data and first label information corresponding to the preset RAW image data.

Description

图像处理方法、装置、存储介质、设备以及模型训练方法Image processing method, device, storage medium, device, and model training method
本申请要求于2021年04月23日提交中国专利局、申请号为202110443987.4、申请名称为“图像处理方法、装置、存储介质、设备以及模型训练方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on April 23, 2021 with the application number 202110443987.4 and the application name "image processing method, device, storage medium, equipment and model training method", the entire content of which is Incorporated herein by reference.
技术领域technical field
基于神经网络的AI(Artificial Intelligence,人工智能)芯片在推理过程中,例如在目标识别过程中,需要经过专门的软硬件模块将图像传感器采集的图像由原始的RAW格式(图像感应器将捕捉到的光源信号转化为数字信号的原始数据)转换为RGB(Red、Green、Blue,红、绿、蓝色彩模式)格式,再输入到神经网络模型中进行处理,整个处理过程中由于存在RAW格式与RGB格式数据的转化步骤,导致处理效率低。In the inference process of neural network-based AI (Artificial Intelligence) chips, such as in the process of target recognition, special software and hardware modules are required to convert the images collected by the image sensor into the original RAW format (the image sensor will capture the The light source signal is converted into the original data of the digital signal) into RGB (Red, Green, Blue, red, green, blue color mode) format, and then input into the neural network model for processing. In the whole processing process, due to the existence of RAW format and The conversion step of RGB format data leads to low processing efficiency.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种图像处理方法、装置、存储介质、设备以及模型训练方法,能够提升图像处理效率。Embodiments of the present application provide an image processing method, apparatus, storage medium, device, and model training method, which can improve image processing efficiency.
第一方面,本申请实施例提供一种图像处理方法,包括:In a first aspect, the embodiments of the present application provide an image processing method, including:
通过图像传感器获取RAW图像数据;Obtain RAW image data through the image sensor;
通过AI处理器对所述RAW图像数据进行处理,其中所述AI处理器包括预设神经网络模型,所述预设神经网络模型是根据预设RAW图像数据及与预设RAW图像数据对应的第一标签信息训练得到。The RAW image data is processed by an AI processor, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and the first RAW image data corresponding to the preset RAW image data. A label information is trained.
第二方面,本申请实施例还提供一种模型训练方法,包括:In a second aspect, an embodiment of the present application also provides a model training method, including:
获取预设RAW图像数据,作为神经网络模型的输入数据;Obtain the preset RAW image data as the input data of the neural network model;
获取所述预设RAW图像数据对应的第一标签信息,作为所述神经网络模型的输出数据;Acquiring first label information corresponding to the preset RAW image data as output data of the neural network model;
根据所述输入数据和所述输出数据训练所述预设神经网络模型,以确定模型参数。The preset neural network model is trained according to the input data and the output data to determine model parameters.
第三方面,本申请实施例还提供一种图像处理装置,包括:In a third aspect, an embodiment of the present application further provides an image processing apparatus, including:
图像采集模块,用于通过图像传感器获取RAW图像数据;The image acquisition module is used to acquire RAW image data through the image sensor;
图像处理模块,用于通过AI处理器对所述RAW图像数据进行处理,其中所述AI处理器包括预设神经网络模型,所述预设神经网络模型是根据预设RAW图像数据及与预设RAW图像数据对应的第一标签信息训练得到。The image processing module is used to process the RAW image data through an AI processor, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and preset The first label information corresponding to the RAW image data is obtained by training.
第四方面,本申请实施例还提供一种计算机可读存储介质,其上存储有计算机 程序,当所述计算机程序在计算机上运行时,使得所述计算机执行如本申请任一实施例提供的图像处理方法;或者,当所述计算机程序在计算机上运行时,使得所述计算机执行如本申请任一实施例提供的神经网络模型训练方法。In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program runs on a computer, the computer is made to execute the method provided by any embodiment of the present application. an image processing method; or, when the computer program runs on a computer, causing the computer to execute the neural network model training method provided by any embodiment of the present application.
第五方面,本申请实施例还提供一种电子设备,In a fifth aspect, the embodiments of the present application further provide an electronic device,
包括图像传感器,以及与所述图像传感器连接的AI处理器;including an image sensor, and an AI processor connected to the image sensor;
所述图像传感器,用于获取RAW图像数据;the image sensor for acquiring RAW image data;
所述AI处理器,用于对所述RAW图像数据进行处理,其中所述AI处理器包括预设神经网络模型,所述预设神经网络模型是根据预设RAW图像数据及与预设RAW图像数据对应的第一标签信息训练得到。The AI processor is used to process the RAW image data, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and the preset RAW image. The first label information corresponding to the data is obtained by training.
第六方面,本申请实施例还提供一种电子设备,包括处理器和存储器,所述存储器有计算机程序,述处理器通过调用所述计算机程序,用于执行如本申请任一实施例提供的图像处理方法;In a sixth aspect, an embodiment of the present application further provides an electronic device, including a processor and a memory, the memory has a computer program, and the processor is used to execute the computer program provided by any embodiment of the present application by invoking the computer program. image processing method;
或者,所述处理器通过调用所述计算机程序,用于执行如本申请任一实施例提供的神经网络模型训练方法。Alternatively, the processor is configured to execute the neural network model training method provided by any embodiment of the present application by invoking the computer program.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained from these drawings without creative effort.
图1为本申请实施例提供的图像处理方法的第一种流程示意图。FIG. 1 is a schematic flowchart of a first type of image processing method provided by an embodiment of the present application.
图2为本申请实施例提供的电子设备第一种结构示意图。FIG. 2 is a schematic diagram of a first structure of an electronic device provided by an embodiment of the present application.
图3为本申请实施例提供的电子设备第二种结构示意图。FIG. 3 is a schematic diagram of a second structure of an electronic device according to an embodiment of the present application.
图4为本申请实施例中的预设神经网络模型中的卷积核的运算方式示意图。FIG. 4 is a schematic diagram of an operation manner of a convolution kernel in a preset neural network model in an embodiment of the present application.
图5为本申请实施例中的一种RAW图像数据示意图。FIG. 5 is a schematic diagram of a RAW image data in an embodiment of the present application.
图6为本申请实施例提供的图像处理方法中像素分离的示意图。。FIG. 6 is a schematic diagram of pixel separation in an image processing method provided by an embodiment of the present application. .
图7为本申请实施例提供的图像处理装置的结构示意图。FIG. 7 is a schematic structural diagram of an image processing apparatus provided by an embodiment of the present application.
图8为本申请实施例提供的电子设备的第三种结构示意图。FIG. 8 is a schematic diagram of a third structure of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有付出创造性劳动前提下所获 得的所有其他实施例,都属于本申请的保护范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art under the premise of not paying creative work belong to the protection scope of the present application.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor a separate or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
本申请实施例提供一种图像处理方法,该图像处理方法的执行主体可以是本申请实施例提供的图像处理装置,或者集成了该图像处理装置的电子设备,其中该图像处理装置可以采用硬件或者软件的方式实现。其中,电子设备可以是智能手机、平板电脑、掌上电脑、笔记本电脑、或者台式电脑、车载终端等设备。The embodiment of the present application provides an image processing method, and the execution body of the image processing method may be the image processing apparatus provided by the embodiment of the present application, or an electronic device integrated with the image processing apparatus, wherein the image processing apparatus may adopt hardware or implemented in software. The electronic device may be a smartphone, a tablet computer, a palmtop computer, a notebook computer, or a desktop computer, a vehicle terminal, and other devices.
本申请提供一种图像处理方法,包括:The application provides an image processing method, including:
通过图像传感器获取RAW图像数据;Obtain RAW image data through the image sensor;
通过AI处理器对所述RAW图像数据进行处理,其中所述AI处理器包括预设神经网络模型,所述预设神经网络模型是根据预设RAW图像数据及与预设RAW图像数据对应的第一标签信息训练得到。The RAW image data is processed by an AI processor, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and the first RAW image data corresponding to the preset RAW image data. A label information is trained.
在一些实施例中,通过AI处理器对所述RAW图像数据进行处理,包括:In some embodiments, the RAW image data is processed by an AI processor, including:
将所述RAW图像数据由单通道RAW图像数据转换为多通道RAW图像数据;以及converting the RAW image data from single-channel RAW image data to multi-channel RAW image data; and
通过AI处理器对所述多通道RAW图像数据进行处理。The multi-channel RAW image data is processed by an AI processor.
在一些实施例中,所述预设神经网络模型为图像分类模型、目标检测模型、图像分割模型或者实例分割模型。In some embodiments, the preset neural network model is an image classification model, an object detection model, an image segmentation model or an instance segmentation model.
在一些实施例中,所述通过图像传感器获取RAW图像数据之前,还包括:In some embodiments, before acquiring the RAW image data through the image sensor, the method further includes:
获取所述预设RAW图像数据,作为所述预设神经网络模型的输入数据;Acquiring the preset RAW image data as the input data of the preset neural network model;
获取所述预设RAW图像数据对应的所述第一标签信息,作为所述预设神经网络模型的输出数据;以及Acquiring the first label information corresponding to the preset RAW image data as output data of the preset neural network model; and
根据所述输入数据和所述输出数据训练所述神经网络模型,以确定模型参数。The neural network model is trained based on the input data and the output data to determine model parameters.
本申请还提供一种神经网络模型训练方法,包括:The present application also provides a neural network model training method, including:
获取预设RAW图像数据,作为神经网络模型的输入数据;Obtain the preset RAW image data as the input data of the neural network model;
获取所述预设RAW图像数据对应的第一标签信息,作为所述神经网络模型的输出数据;Acquiring first label information corresponding to the preset RAW image data as output data of the neural network model;
根据所述输入数据和所述输出数据训练所述预设神经网络模型,以确定模型参数。The preset neural network model is trained according to the input data and the output data to determine model parameters.
在一些实施例中,获取预设RAW图像数据,作为所述预设神经网络模型的输入数据,包括:In some embodiments, acquiring preset RAW image data as input data for the preset neural network model includes:
获取第一预设RGB图像数据;obtaining the first preset RGB image data;
根据预设全卷积神经网络,将所述第一预设RGB图像数据转换为对应的预设RAW图像数据,将所述预设RAW图像数据作为所述预设神经网络模型的输入数据;Converting the first preset RGB image data into corresponding preset RAW image data according to a preset fully convolutional neural network, and using the preset RAW image data as input data of the preset neural network model;
获取所述预设RAW图像数据对应的第一标签信息,作为所述预设神经网络模型的输出数据,包括:Obtain the first label information corresponding to the preset RAW image data as the output data of the preset neural network model, including:
获取所述第一预设RGB图像数据对应的第二标签信息;acquiring second label information corresponding to the first preset RGB image data;
将所述第一预设RGB图像数据的第二标签信息映射至所述预设RAW图像数据,得到第一标签信息,作为所述预设神经网络模型的输出数据。The second label information of the first preset RGB image data is mapped to the preset RAW image data to obtain first label information, which is used as output data of the preset neural network model.
在一些实施例中,获取所述预设RAW图像数据对应的第一标签信息,作为所述预设神经网络模型的输出数据,包括:In some embodiments, acquiring the first label information corresponding to the preset RAW image data as the output data of the preset neural network model includes:
获取所述预设RAW图像数据对应的预设RGB图像数据,以及所述预设RGB图像数据的第二标签信息;Acquiring preset RGB image data corresponding to the preset RAW image data, and second label information of the preset RGB image data;
将所述预设RGB图像数据的第二标签信息映射至所述预设RAW图像数据,得到第一标签信息,作为模型训练的输出数据。The second label information of the preset RGB image data is mapped to the preset RAW image data to obtain the first label information, which is used as output data of model training.
请参阅图1,图1为本申请实施例提供的图像处理方法的第一种流程示意图。本申请实施例提供的图像处理方法的具体流程可以如下:Please refer to FIG. 1. FIG. 1 is a schematic flowchart of a first image processing method provided by an embodiment of the present application. The specific process of the image processing method provided by the embodiment of the present application may be as follows:
101、通过图像传感器获取RAW图像数据。101. Acquire RAW image data through an image sensor.
本申请实施例可以应用于计算机视觉领域的应用,包括但不限于分类、定位、语义分割和实例分割。请参阅图2,图2为本申请实施例提供的电子设备第一种结构示意图。该电子设备设置有图像传感器和AI处理器。其中,AI处理器为能够进行神经网络的运算的处理器,例如,神经网络模型的运算可以由任何能够执行神经网络的处理器执行,例如GPU(Graphics Processing Unit,图形处理器)、DSP(Digital Signal Process,数字信号处理器)、NPU(Neural-network Processing Unit,嵌入式AI处理器)、CPU(central processing unit,中央处理器)等,这些处理器都可以认为是AI处理器。The embodiments of the present application can be applied to applications in the field of computer vision, including but not limited to classification, localization, semantic segmentation, and instance segmentation. Please refer to FIG. 2 , which is a schematic diagram of a first structure of an electronic device according to an embodiment of the present application. The electronic device is provided with an image sensor and an AI processor. The AI processor is a processor capable of performing neural network operations. For example, the operations of the neural network model can be performed by any processor capable of executing neural networks, such as GPU (Graphics Processing Unit, graphics processor), DSP (Digital Signal Process, digital signal processor), NPU (Neural-network Processing Unit, embedded AI processor), CPU (central processing unit, central processing unit), etc. These processors can be considered as AI processors.
请参阅图3,图3为本申请实施例提供的电子设备第二种结构示意图。图3描述了本申请实施例提供的电子设备的一种具体实施方式,其中,该电子设备包括数据采集模块、数据接收模块以及AI处理器,数据采集模块包括一个或者多个图像传感器(图中示出多个图像传感器),图像传感器采集的RAW图像数据经过发送端 媒体访问控制器以及发送端物理层设备传输至数据接收模块,数据接收模块包括依次连接的接收端物理层设备、接收端媒体访问控制器、第一缓存单元以及数据接口单元,数据接收模块将接收到的RAW图像数据传输至AI处理器进行处理。其中,AI处理器包括AI运算单元、第一缓存单元以及存储单元,存储单元可以为DDR。其中,第一缓存单元用于缓存接收到的RAW图像数据,存储单元用于存储预设神经网络模型,AI运算单元用于通过预设神经网络模型对RAW图像数据进行处理。Please refer to FIG. 3 , which is a schematic diagram of a second structure of an electronic device provided by an embodiment of the present application. FIG. 3 depicts a specific implementation of the electronic device provided by the embodiment of the present application, wherein the electronic device includes a data acquisition module, a data receiving module, and an AI processor, and the data acquisition module includes one or more image sensors (in the figure Multiple image sensors are shown), the RAW image data collected by the image sensor is transmitted to the data receiving module through the transmitting-end media access controller and the transmitting-end physical layer device, and the data receiving module includes the receiving-end physical layer device and the receiving-end media connected in turn. The access controller, the first buffer unit and the data interface unit, and the data receiving module transmits the received RAW image data to the AI processor for processing. The AI processor includes an AI computing unit, a first cache unit, and a storage unit, and the storage unit may be a DDR. The first buffer unit is used for buffering the received RAW image data, the storage unit is used for storing the preset neural network model, and the AI computing unit is used for processing the RAW image data through the preset neural network model.
该AI处理器存储有预先训练好的预设神经网络模型,该预设神经网络模型可以为图像分类模型、目标检测模型、图像分割模型或者实例分割模型。该预设神经网络模型包括卷积层,请参阅图4,图4为本申请实施例中的预设神经网络模型中的卷积核的运算方式示意图。将6×6的输入特征图,经过大小为2×2、步长为2的卷积核的卷积运算,得到3×3的输出特征图。The AI processor stores a pre-trained preset neural network model, and the preset neural network model may be an image classification model, a target detection model, an image segmentation model or an instance segmentation model. The preset neural network model includes a convolution layer. Please refer to FIG. 4 . FIG. 4 is a schematic diagram of an operation manner of a convolution kernel in the preset neural network model in an embodiment of the present application. The 6×6 input feature map is subjected to the convolution operation of a convolution kernel with a size of 2×2 and a stride of 2 to obtain a 3×3 output feature map.
电子设备通过图像传感器对待检测场景进行拍摄,生成RAW图像数据。其中,RAW图像(即后缀名为.raw格式的拜尔(Bayer)图像)数据,是CMOS(Complementary Metal Oxide Semiconductor,互补金属氧化物半导体)或者CCD(Charge Coupled Device,电荷藕合器件图像传感器)将捕捉到的光源信号转化为数字信号的原始数据,原始的RAW图像数据有更高的灰度级,保存了完整的数据信息。其中,RAW图像数据中的RGB三种颜色可以有多种排列方式,如RGGB、GRBG、GBRG以及BGGR。或者,若CCD中的滤光镜为补色滤光镜,则可以得到CMYB(蓝绿、紫红、黄、黑)四个通道的颜色排列而成的RAW图像。请参阅图5,图5为本申请实施例中的一种RAW图像数据示意图。The electronic device shoots the scene to be detected through the image sensor to generate RAW image data. Among them, the RAW image (that is, the Bayer image with the suffix .raw format) data is CMOS (Complementary Metal Oxide Semiconductor, complementary metal oxide semiconductor) or CCD (Charge Coupled Device, charge coupled device image sensor) The captured light source signal is converted into the original data of the digital signal. The original RAW image data has a higher gray level and preserves the complete data information. Among them, the three colors of RGB in the RAW image data can be arranged in various ways, such as RGGB, GRBG, GBRG, and BGGR. Alternatively, if the filter in the CCD is a complementary color filter, a RAW image in which the colors of the four channels of CMYB (cyan, magenta, yellow, and black) are arranged can be obtained. Please refer to FIG. 5 , which is a schematic diagram of RAW image data according to an embodiment of the present application.
获取到待检测RAW图像之后,将该待检测RAW图像传输至AI处理器,将该待检测RAW图像作为预设神经网络模型的输入数据,进行图像处理。After the RAW image to be detected is acquired, the RAW image to be detected is transmitted to the AI processor, and the RAW image to be detected is used as input data of the preset neural network model for image processing.
102、通过AI处理器对所述RAW图像数据进行处理,其中所述AI处理器包括预设神经网络模型,所述预设神经网络模型是根据预设RAW图像数据及与预设RAW图像数据对应的第一标签信息训练得到。102. Process the RAW image data by an AI processor, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and corresponds to the preset RAW image data The first label information of the training is obtained.
得到待检测RAW图像之后,将该待检测RAW图像输入预设神经网络模型进行计算。例如,若预设神经网络模型为分类模型,则可以输出检测到的物体类别。比如,电子设备为车辆识别设备,该车辆识别设备可以是车载设备,通过图像传感器实时拍摄车辆前方的画面,得到待检测Raw图像,将该待检测RAW图像传输至AI处理器进行图像处理,以判断前方是否有车辆。After the RAW image to be detected is obtained, the RAW image to be detected is input into a preset neural network model for calculation. For example, if the preset neural network model is a classification model, the detected object category can be output. For example, the electronic device is a vehicle identification device, and the vehicle identification device can be an in-vehicle device. The image in front of the vehicle is captured in real time by an image sensor to obtain a Raw image to be detected, and the raw image to be detected is transmitted to the AI processor for image processing. Determine if there is a vehicle ahead.
该预设神经网络模型根据预设RAW图像数据和预设RAW图像数据对应的第 一标签信息,进行模型训练得到。例如,获取预设RAW图像数据,作为预设神经网络模型的输入数据;获取所述预设RAW图像数据对应的第一标签信息,作为所述预设神经网络模型的输出数据;根据所述输入数据和所述输出数据训练所述预设神经网络模型,以确定模型参数。The preset neural network model is obtained by performing model training according to the preset RAW image data and the first label information corresponding to the preset RAW image data. For example, acquiring preset RAW image data as input data of a preset neural network model; acquiring first label information corresponding to the preset RAW image data as output data of the preset neural network model; according to the input The data and the output data train the preset neural network model to determine model parameters.
本申请实施例中,在预设神经网络模型的应用阶段,使用的输入数据的格式为RAW格式。预设神经网络模型在训练阶段和应用阶段,需要保持输入数据的格式和尺寸都是相同的。基于此,该预设神经网络模型在训练阶段也需要使用RAW图像作为输入数据进行模型训练。In the embodiment of the present application, in the application stage of the preset neural network model, the format of the input data used is the RAW format. The default neural network model needs to keep the format and size of the input data the same during the training phase and the application phase. Based on this, the preset neural network model also needs to use RAW images as input data for model training during the training phase.
常规的数据集中,用于进行模型训练的图像数据的格式一般是RGB格式,这种格式是一种可视化的图像格式,用户可以根据需要直接在样本上添加标签信息。此外,即使可以采集RAW格式的图像作为模型训练的输入数据,也会因为RAW格式的不可视性导致不能直接对其进行标记。因为对于计算机设备来说,RAW数据记录的是图像传感器输出的最原始的图像信息,并不能直接用于显示,因此用户无法直接在RAW数据上进行标记。In conventional datasets, the format of image data used for model training is generally RGB format, which is a visual image format, and users can directly add label information to samples as needed. In addition, even if images in RAW format can be collected as input data for model training, they cannot be directly labeled due to the invisibility of RAW format. Because for computer equipment, RAW data records the most original image information output by the image sensor and cannot be directly used for display, so users cannot directly mark RAW data.
基于上述原因,本申请针对数据集中不同的数据格式,采用不同的数据处理方式来得到模型训练的输入数据和输出数据。Based on the above reasons, the present application adopts different data processing methods for different data formats in the data set to obtain input data and output data for model training.
在一些实施例中,获取预设RAW图像数据,作为所述预设神经网络模型的输入数据,包括:获取第一预设RGB图像数据;根据预先训练好的全卷积神经网络,将所述第一预设RGB图像数据转换为对应的预设RAW图像数据,将所述预设RAW图像数据作为所述预设神经网络模型的输入数据。In some embodiments, acquiring preset RAW image data as input data for the preset neural network model includes: acquiring first preset RGB image data; The first preset RGB image data is converted into corresponding preset RAW image data, and the preset RAW image data is used as input data of the preset neural network model.
获取所述预设RAW图像数据对应的第一标签信息,作为所述预设神经网络模型的输出数据,包括:获取所述第一预设RGB图像数据对应的第二标签信息;将所述第一预设RGB图像数据的第二标签信息映射至所述预设RAW图像数据,得到第一标签信息,作为所述预设神经网络模型的输出数据。Obtaining the first label information corresponding to the preset RAW image data as the output data of the preset neural network model includes: obtaining second label information corresponding to the first preset RGB image data; The second label information of a preset RGB image data is mapped to the preset RAW image data, and the first label information is obtained, which is used as the output data of the preset neural network model.
该实施例中,获取数据集,该数据集中包含若干预设RGB图像数据,根据预先训练好的全预设神经网络模型对该预设RGB图像数据进行转换处理,得到每一预设RGB图像数据对应的预设RAW图像数据。In this embodiment, a data set is obtained, the data set includes several preset RGB image data, and the preset RGB image data is converted according to the pre-trained full preset neural network model to obtain each preset RGB image data The corresponding preset RAW image data.
RAW图像中的一个像素点处只有RGB三种颜色中的一种颜色信息,而RGB图像数据中一个像素点包含RGB三种颜色信息。本申请实施例预先构建一个全卷积网络,该预设全卷积神经网络包括全卷积部分和反卷积部分,其输入数据经过全卷积部分的卷积运算之后,得到深度特征,再经过反卷积部分的运算可以得到与原 输入图像相同尺寸的输出图像。获取若干RAW图像,以及经过ISP处理得到的对应的RGB图像数据,构成若干个图像对,将RGB图像数据作为输入数据、RAW图像作为输出数据对该全卷积神经网络进行训练,确定出网络参数,经过训练的网络学习得到的网络参数表征RGB图像数据与RAW图像之间的转换关系,将预设RGB图像数据输入该网络进行计算,可以得到对应的相同尺寸的预设RAW图像数据,作为模型训练的输入数据。A pixel in a RAW image has only one color information of the three colors of RGB, while a pixel in the RGB image data contains three color information of RGB. In this embodiment of the present application, a fully convolutional network is pre-built. The preset fully convolutional neural network includes a fully convolutional part and a deconvolutional part. After the input data is subjected to the convolution operation of the fully convolutional part, depth features are obtained, and then After the operation of the deconvolution part, the output image of the same size as the original input image can be obtained. Obtain several RAW images and the corresponding RGB image data processed by ISP to form several image pairs, use the RGB image data as input data and the RAW image as output data to train the fully convolutional neural network, and determine the network parameters , the network parameters learned by the trained network represent the conversion relationship between the RGB image data and the RAW image, and the preset RGB image data is input into the network for calculation, and the corresponding preset RAW image data of the same size can be obtained as a model input data for training.
预设RGB图像数据可以直接在计算机上进行显示,用户可以根据预设神经网络模型的类型,对预设RGB图像数据进行对应的标记。例如,预设神经网络模型为目标检测模型,标签信息可以为样本图像中目标主体的边界框,用户手动在图像上标记出待识别图像的矩形边界框,根据该边界框生成对应的位置坐标和尺寸信息,作为标签信息。又例如,卷积神经网络为图像分类模型,则标签信息为样本图像中目标主体的类别信息。The preset RGB image data can be directly displayed on the computer, and the user can mark the preset RGB image data correspondingly according to the type of the preset neural network model. For example, the preset neural network model is the target detection model, and the label information can be the bounding box of the target subject in the sample image. The user manually marks the rectangular bounding box of the image to be recognized on the image, and the corresponding position coordinates and Size information, as label information. For another example, if the convolutional neural network is an image classification model, the label information is the category information of the target subject in the sample image.
获取预设RGB图像数据对应的第二标签信息,预设RGB图像数据与预设RAW图像数据具有相同的图像尺寸,对于含有位置信息的标签信息来说,比如边界框,可以将预设RGB图像数据上的第二标签信息按照其位置直接映射到预设RAW图像数据上,得到对应的第一标签信息。按照该方式即可完成预设RAW图像数据的间接标记。通过预设RAW图像数据及其第一标签信息训练预设神经网络模型,以确定模型参数。Obtain the second label information corresponding to the preset RGB image data. The preset RGB image data and the preset RAW image data have the same image size. For the label information containing position information, such as a bounding box, the preset RGB image data can be The second label information on the data is directly mapped to the preset RAW image data according to its position to obtain the corresponding first label information. In this way, the indirect marking of the preset RAW image data can be completed. The preset neural network model is trained by preset RAW image data and its first label information to determine model parameters.
或者,在另一些实施例中,获取所述预设RAW图像数据对应的第一标签信息,作为所述预设神经网络模型的输出数据,包括:获取所述预设RAW图像数据对应的预设RGB图像数据,以及所述预设RGB图像数据的第二标签信息;将所述预设RGB图像数据的第二标签信息映射至所述预设RAW图像数据,得到第一标签信息,作为模型训练的输出数据。Or, in other embodiments, acquiring the first label information corresponding to the preset RAW image data as the output data of the preset neural network model includes: acquiring the preset corresponding to the preset RAW image data RGB image data, and second label information of the preset RGB image data; mapping the second label information of the preset RGB image data to the preset RAW image data to obtain the first label information, which is used as model training output data.
该实施例中,用于模型训练的数据集中包括预设RAW图像数据,但是样本RAAW图像无法直接进行标记,故将预设RAW图像数据转换为对应的预设RGB图像数据后进行标记,得到第二标签信息,再将其映射到预设RAW图像数据,得到第一标签信息,作为模型训练的输出数据。按照该方式即可完成预设RAW图像数据的间接标记。通过预设RAW图像数据及其第一标签信息训练预设神经网络模型,以确定模型参数。In this embodiment, the data set used for model training includes the preset RAW image data, but the sample RAAW image cannot be marked directly, so the preset RAW image data is converted into the corresponding preset RGB image data and then marked to obtain the first RAW image data. The second label information is mapped to the preset RAW image data to obtain the first label information, which is used as the output data of model training. In this way, the indirect marking of the preset RAW image data can be completed. The preset neural network model is trained by preset RAW image data and its first label information to determine model parameters.
具体实施时,本申请不受所描述的各个步骤的执行顺序的限制,在不产生冲突的情况下,某些步骤还可以采用其它顺序进行或者同时进行。During specific implementation, the present application is not limited by the execution order of the described steps, and certain steps may also be performed in other sequences or simultaneously under the condition of no conflict.
由上可知,本申请实施例提供的图像处理方法,在进行图像处理时,通过图像传感器获取RAW图像数据;通过AI处理器对该RAW图像数据进行处理,由于该预设神经网络模型是通过预设RAW图像数据以及对应的第一标签信息训练得到的,在图像处理阶段,可以使用图像传感器输出的原始RAW图像直接进行检测,无需经过ISP处理,提升了图像处理的效率。It can be seen from the above that, in the image processing method provided by the embodiment of the present application, when performing image processing, the RAW image data is obtained through the image sensor; the RAW image data is processed through the AI processor, because the preset neural network model is pre- Assuming that the RAW image data and the corresponding first label information are obtained by training, in the image processing stage, the original RAW image output by the image sensor can be used for direct detection without ISP processing, which improves the efficiency of image processing.
在一些实施例中,通过AI处理器对所述RAW图像数据进行处理,包括:将所述RAW图像数据由单通道RAW图像数据转换为多通道RAW图像数据;以及通过AI处理器对所述多通道RAW图像数据进行处理。In some embodiments, processing the RAW image data by the AI processor includes: converting the RAW image data from single-channel RAW image data to multi-channel RAW image data; and processing the multi-channel RAW image data by the AI processor Channel RAW image data for processing.
原始的待检测RAW图像为单通道图像,为了提高运算速度,在将其输入到预设神经网络模型中进行运算之前,可以将其进行像素分离处理,得到多通道RAW图像数据,其中,每一个通道上的特征图只对应于一种颜色。The original RAW image to be detected is a single-channel image. In order to improve the operation speed, before inputting it into the preset neural network model for operation, it can be processed by pixel separation to obtain multi-channel RAW image data. The feature map on the channel corresponds to only one color.
具体的像素分离方式根据该待检测RAW图像中像素的排列方式来确定。请参阅图6,图6为本申请实施例提供的图像处理方法中像素分离的示意图。该实施例中,待检测RAW图像中的像素是按照RGGB的顺序排列的,进行像素分离后,得到的四个通道的通道图,并且这四个通道按照R、G、G、B的顺序排列。在其他实施例汇总,待检测RAW图像中的像素排列顺序可能为GRBG、GBRG,则通过删除第一行像素点或者第一列像素点的方式,将其像素排列方式调整为RGGB,再进行像素分离处理,以使分离后通道按照R、G、G、B的顺序排列。假设待检测RAW图像的尺寸为W*H,则经过像素分离处理后,得到四个通道上的特征图的尺寸均为W/2*H/2。The specific pixel separation manner is determined according to the arrangement manner of the pixels in the RAW image to be detected. Please refer to FIG. 6, which is a schematic diagram of pixel separation in an image processing method provided by an embodiment of the present application. In this embodiment, the pixels in the RAW image to be detected are arranged in the order of RGGB. After pixel separation, a channel map of four channels is obtained, and the four channels are arranged in the order of R, G, G, and B. . In the summary of other embodiments, the pixel arrangement order in the RAW image to be detected may be GRBG and GBRG, then the pixel arrangement is adjusted to RGGB by deleting the first row of pixels or the first column of pixels, and then the pixel is adjusted to RGGB. Separation processing, so that the channels after separation are arranged in the order of R, G, G, B. Assuming that the size of the RAW image to be detected is W*H, after pixel separation processing, the size of the feature maps on the four channels is W/2*H/2.
可以理解的是,若需要在图像阶段将待检测RAW图像转换在模型训练阶段,则在模型训练阶段就需要对输入数据进行同样的像素分离处理,并且通道顺序保持一致。It can be understood that if the RAW image to be detected needs to be converted in the model training stage in the image stage, the input data needs to be subjected to the same pixel separation processing in the model training stage, and the channel order should be consistent.
本申请实施例还提供一种模型训练方法,包括:获取预设RAW图像数据,作为神经网络模型的输入数据;获取所述预设RAW图像数据对应的第一标签信息,作为所述神经网络模型的输出数据;根据所述输入数据和所述输出数据训练所述预设神经网络模型,以确定模型参数。An embodiment of the present application further provides a model training method, including: acquiring preset RAW image data as input data of a neural network model; acquiring first label information corresponding to the preset RAW image data as the neural network model output data; train the preset neural network model according to the input data and the output data to determine model parameters.
在一些实施例中,获取预设RAW图像数据,作为所述预设神经网络模型的输入数据,包括:获取第一预设RGB图像数据;根据预先训练好的全卷积神经网络,将所述第一预设RGB图像数据转换为对应的预设RAW图像数据,将所述预设RAW图像数据作为所述预设神经网络模型的输入数据。获取所述预设RAW图像数据对 应的第一标签信息,作为所述预设神经网络模型的输出数据,包括:获取所述第一预设RGB图像数据对应的第二标签信息;将所述第一预设RGB图像数据的第二标签信息映射至所述预设RAW图像数据,得到第一标签信息,作为所述预设神经网络模型的输出数据。In some embodiments, acquiring preset RAW image data as input data for the preset neural network model includes: acquiring first preset RGB image data; The first preset RGB image data is converted into corresponding preset RAW image data, and the preset RAW image data is used as input data of the preset neural network model. Obtaining the first label information corresponding to the preset RAW image data as the output data of the preset neural network model includes: obtaining second label information corresponding to the first preset RGB image data; The second label information of a preset RGB image data is mapped to the preset RAW image data, and the first label information is obtained, which is used as the output data of the preset neural network model.
在一些实施例中,获取所述预设RAW图像数据对应的第一标签信息,作为所述预设神经网络模型的输出数据,包括:获取所述预设RAW图像数据对应的预设RGB图像数据,以及所述预设RGB图像数据的第二标签信息;将所述预设RGB图像数据的第二标签信息映射至所述预设RAW图像数据,得到第一标签信息,作为模型训练的输出数据。In some embodiments, acquiring first label information corresponding to the preset RAW image data as output data of the preset neural network model includes: acquiring preset RGB image data corresponding to the preset RAW image data , and the second label information of the preset RGB image data; map the second label information of the preset RGB image data to the preset RAW image data to obtain the first label information as the output data of model training .
其中,上述各实施例提供的模型训练方法可以应用于服务器,服务器进行模型训练之后,进行模型参数的更新,并将更新后的模型参数发送到电子设备,以使电子设备更新其存储的预设神经网络模型。The model training methods provided in the above embodiments can be applied to a server. After the server performs model training, it updates model parameters, and sends the updated model parameters to the electronic device, so that the electronic device updates its stored presets. Neural network model.
该实施例提供的模型训练方法,将RAW图像作为模型训练的输入数据,并通过RAW图像对应的RGB图像数据进行标记,再进行标签信息的映射,从而得到具有标签信息的预设RAW图像数据,进行模型训练,由于该预设神经网络模型是通过预设RAW图像数据以及对应的标签信息训练得到的,在图像处理阶段,可以使用图像传感器输出的原始RAW图像直接进行检测,无需经过ISP处理,提升图像处理效率。In the model training method provided by this embodiment, the RAW image is used as the input data for model training, and the RGB image data corresponding to the RAW image is marked, and then the label information is mapped, so as to obtain the preset RAW image data with the label information, Carry out model training. Since the preset neural network model is obtained by training the preset RAW image data and the corresponding label information, in the image processing stage, the original RAW image output by the image sensor can be used for direct detection without ISP processing. Improve image processing efficiency.
本申请还提供一种图像处理装置,包括:The present application also provides an image processing device, comprising:
图像采集模块,用于通过图像传感器获取RAW图像数据;The image acquisition module is used to acquire RAW image data through the image sensor;
图像处理模块,用于通过AI处理器对所述RAW图像数据进行处理,其中所述AI处理器包括预设神经网络模型,所述预设神经网络模型是根据预设RAW图像数据及与预设RAW图像数据对应的第一标签信息训练得到。The image processing module is used to process the RAW image data through an AI processor, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and preset The first label information corresponding to the RAW image data is obtained by training.
在一些实施例中,所述图像采集模块,用于将所述RAW图像数据由单通道RAW图像数据转换为多通道RAW图像数据;以及In some embodiments, the image acquisition module for converting the RAW image data from single-channel RAW image data to multi-channel RAW image data; and
通过AI处理器对所述多通道RAW图像数据进行处理。The multi-channel RAW image data is processed by an AI processor.
在一些实施例中,所述预设神经网络模型为图像分类模型、目标检测模型、图像分割模型或者实例分割模型。In some embodiments, the preset neural network model is an image classification model, an object detection model, an image segmentation model or an instance segmentation model.
在一些实施例中,所述装置还包括:In some embodiments, the apparatus further includes:
模型训练模块,用于获取所述预设RAW图像数据,作为所述预设神经网络模型的输入数据;a model training module for acquiring the preset RAW image data as input data for the preset neural network model;
获取所述预设RAW图像数据对应的所述第一标签信息,作为所述预设神经网络模型的输出数据;以及Acquiring the first label information corresponding to the preset RAW image data as output data of the preset neural network model; and
根据所述输入数据和所述输出数据训练所述神经网络模型,以确定模型参数。The neural network model is trained based on the input data and the output data to determine model parameters.
本申请实施例还提供一种神经网络模型训练装置,包括:The embodiment of the present application also provides a neural network model training device, including:
模型训练模块,用于获取所述预设RAW图像数据,作为所述预设神经网络模型的输入数据;a model training module for acquiring the preset RAW image data as input data for the preset neural network model;
获取所述预设RAW图像数据对应的所述第一标签信息,作为所述预设神经网络模型的输出数据;以及Acquiring the first label information corresponding to the preset RAW image data as output data of the preset neural network model; and
根据所述输入数据和所述输出数据训练所述神经网络模型,以确定模型参数。The neural network model is trained based on the input data and the output data to determine model parameters.
在一些实施例中,模型训练模块还用于:In some embodiments, the model training module is also used to:
获取第一预设RGB图像数据;obtaining the first preset RGB image data;
根据预设全卷积神经网络,将所述第一预设RGB图像数据转换为对应的预设RAW图像数据,将所述预设RAW图像数据作为所述预设神经网络模型的输入数据;Converting the first preset RGB image data into corresponding preset RAW image data according to a preset fully convolutional neural network, and using the preset RAW image data as input data of the preset neural network model;
获取所述第一预设RGB图像数据对应的第二标签信息;acquiring second label information corresponding to the first preset RGB image data;
将所述第一预设RGB图像数据的第二标签信息映射至所述预设RAW图像数据,得到第一标签信息,作为所述预设神经网络模型的输出数据。The second label information of the first preset RGB image data is mapped to the preset RAW image data to obtain first label information, which is used as output data of the preset neural network model.
在一些实施例中,模型训练模块还用于:In some embodiments, the model training module is also used to:
获取所述预设RAW图像数据对应的预设RGB图像数据,以及所述预设RGB图像数据的第二标签信息;Acquiring preset RGB image data corresponding to the preset RAW image data, and second label information of the preset RGB image data;
将所述预设RGB图像数据的第二标签信息映射至所述预设RAW图像数据,得到第一标签信息,作为模型训练的输出数据。The second label information of the preset RGB image data is mapped to the preset RAW image data to obtain the first label information, which is used as output data of model training.
在一实施例中还提供一种图像处理装置。请参阅图7,图7为本申请实施例提供的图像处理装置300的结构示意图。其中该图像处理装置300应用于电子设备,该图像处理装置300包括图像采集模块301、以及图像处理模块302,如下:In an embodiment, an image processing apparatus is also provided. Please refer to FIG. 7 , which is a schematic structural diagram of an image processing apparatus 300 according to an embodiment of the present application. The image processing apparatus 300 is applied to electronic equipment, and the image processing apparatus 300 includes an image acquisition module 301 and an image processing module 302, as follows:
图像采集模块301,用于通过图像传感器获取RAW图像数据;An image acquisition module 301, configured to acquire RAW image data through an image sensor;
图像处理模块302,用于通过AI处理器对所述RAW图像数据进行处理,其中所述AI处理器包括预设神经网络模型,所述预设神经网络模型是根据预设RAW图像数据及与预设RAW图像数据对应的第一标签信息训练得到。The image processing module 302 is configured to process the RAW image data through an AI processor, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and the preset RAW image data. It is assumed that the first label information corresponding to the RAW image data is obtained by training.
在一些实施例中,图像处理模块302,还用于将所述RAW图像数据由单通道RAW图像数据转换为多通道RAW图像数据;以及通过AI处理器对所述多通道RAW图像数据进行处理。In some embodiments, the image processing module 302 is further configured to convert the RAW image data from single-channel RAW image data to multi-channel RAW image data; and process the multi-channel RAW image data through an AI processor.
在一些实施例中,所述预设神经网络模型为图像分类模型、目标检测模型、图像分割模型或者实例分割模型。In some embodiments, the preset neural network model is an image classification model, an object detection model, an image segmentation model or an instance segmentation model.
在一些实施例中,该图像处理装置300还包括:In some embodiments, the image processing apparatus 300 further includes:
模型训练模块,用于获取所述预设RAW图像数据,作为所述预设神经网络模型的输入数据;a model training module for acquiring the preset RAW image data as input data for the preset neural network model;
获取所述预设RAW图像数据对应的所述第一标签信息,作为所述预设神经网络模型的输出数据;以及Acquiring the first label information corresponding to the preset RAW image data as output data of the preset neural network model; and
根据所述输入数据和所述输出数据训练所述神经网络模型,以确定模型参数。The neural network model is trained based on the input data and the output data to determine model parameters.
在一些实施例中,模型训练模块,还用于获取第一预设RGB图像数据;In some embodiments, the model training module is further configured to obtain the first preset RGB image data;
根据预先训练好的全卷积神经网络,将所述第一预设RGB图像数据转换为对应的预设RAW图像数据,将所述预设RAW图像数据作为所述预设神经网络模型的输入数据;According to the pre-trained fully convolutional neural network, the first preset RGB image data is converted into corresponding preset RAW image data, and the preset RAW image data is used as the input data of the preset neural network model ;
以及,获取所述第一预设RGB图像数据对应的第二标签信息;将所述第一预设RGB图像数据的第二标签信息映射至所述预设RAW图像数据,得到第一标签信息,作为所述预设神经网络模型的输出数据。and obtaining second label information corresponding to the first preset RGB image data; mapping the second label information of the first preset RGB image data to the preset RAW image data to obtain the first label information, as the output data of the preset neural network model.
在一些实施例中,模型训练模块,还用于获取所述预设RAW图像数据对应的预设RGB图像数据,以及所述预设RGB图像数据的第二标签信息;In some embodiments, the model training module is further configured to acquire preset RGB image data corresponding to the preset RAW image data, and second label information of the preset RGB image data;
将所述预设RGB图像数据的第二标签信息映射至所述预设RAW图像数据,得到第一标签信息,作为模型训练的输出数据。The second label information of the preset RGB image data is mapped to the preset RAW image data to obtain the first label information, which is used as output data of model training.
应当说明的是,本申请实施例提供的图像处理装置与上文实施例中的图像处理方法属于同一构思,通过该图像处理装置可以实现图像处理方法实施例中提供的任一方法,其具体实现过程详见图像处理方法实施例,此处不再赘述。It should be noted that the image processing apparatus provided in the embodiments of the present application and the image processing methods in the above embodiments belong to the same concept, and any method provided in the image processing method embodiments can be implemented by the image processing apparatus. For details of the process, please refer to the embodiment of the image processing method, which will not be repeated here.
由上可知,本申请实施例提出的图像处理装置,在进行图像处理时,通过图像传感器获取RAW图像数据;通过AI处理器对该RAW图像数据进行处理,由于该预设神经网络模型是通过预设RAW图像数据以及对应的第一标签信息训练得到的,在图像处理阶段,可以使用图像传感器输出的原始RAW图像直接进行检测,无需经过ISP处理,提升了图像处理的效率。It can be seen from the above that the image processing device proposed in the embodiments of the present application acquires RAW image data through an image sensor when performing image processing, and processes the RAW image data through an AI processor, because the preset neural network model Assuming that the RAW image data and the corresponding first label information are obtained by training, in the image processing stage, the original RAW image output by the image sensor can be used for direct detection without ISP processing, which improves the efficiency of image processing.
本申请实施例还提供一种电子设备,该电子设备可以为终端,该终端可以为智能手机、平板电脑、笔记本电脑、触控屏幕、游戏机、个人计算机(PC,Personal Computer)、个人数字助理(Personal Digital Assistant,PDA)等终端设备。如图8所示,图8为本申请实施例提供的电子设备的第三种结构示意图。该电子设备400包 括有一个或者一个以上处理核心的处理器401、有一个或一个以上计算机可读存储介质的存储器402及存储在存储器402上并可在处理器上运行的计算机程序。其中,处理器401与存储器402电性连接。本领域技术人员可以理解,图中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。An embodiment of the present application further provides an electronic device, and the electronic device may be a terminal, and the terminal may be a smart phone, a tablet computer, a notebook computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA) and other terminal equipment. As shown in FIG. 8 , FIG. 8 is a third schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device 400 includes a processor 401 having one or more processing cores, a memory 402 having one or more computer-readable storage media, and a computer program stored on the memory 402 and executable on the processor. The processor 401 is electrically connected to the memory 402 . Those skilled in the art can understand that the structure of the electronic device shown in the figures does not constitute a limitation on the electronic device, and may include more or less components than those shown in the figures, or combine some components, or arrange different components.
处理器401是电子设备400的控制中心,利用各种接口和线路连接整个电子设备400的各个部分,通过运行或加载存储在存储器402内的软件程序和/或模块,以及调用存储在存储器402内的数据,执行电子设备400的各种功能和处理数据,从而对电子设备400进行整体监控。The processor 401 is the control center of the electronic device 400, uses various interfaces and lines to connect various parts of the entire electronic device 400, runs or loads the software programs and/or modules stored in the memory 402, and calls the software programs and/or modules stored in the memory 402. to perform various functions of the electronic device 400 and process data, so as to monitor the electronic device 400 as a whole.
在本申请实施例中,电子设备400中的处理器401会按照如下的步骤,将一个或一个以上的应用程序的进程对应的指令加载到存储器402中,并由处理器401来运行存储在存储器402中的应用程序,从而实现各种功能:In this embodiment of the present application, the processor 401 in the electronic device 400 loads the instructions corresponding to the processes of one or more application programs into the memory 402 according to the following steps, and the processor 401 executes the instructions stored in the memory. 402 application in order to achieve various functions:
通过图像传感器获取RAW图像数据;Obtain RAW image data through the image sensor;
通过AI处理器对所述RAW图像数据进行处理,其中所述AI处理器包括预设神经网络模型,所述预设神经网络模型是根据预设RAW图像数据及与预设RAW图像数据对应的第一标签信息训练得到。The RAW image data is processed by an AI processor, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and the first RAW image data corresponding to the preset RAW image data. A label information is trained.
以上各个操作的具体实施可参见前面的实施例,在此不再赘述。For the specific implementation of the above operations, reference may be made to the foregoing embodiments, and details are not described herein again.
可选的,如图5所示,电子设备400还包括:触控显示屏403、射频电路404、音频电路405、输入单元406以及电源407。其中,处理器401分别与触控显示屏403、射频电路404、音频电路405、输入单元406以及电源407电性连接。本领域技术人员可以理解,图5中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Optionally, as shown in FIG. 5 , the electronic device 400 further includes: a touch display screen 403 , a radio frequency circuit 404 , an audio circuit 405 , an input unit 406 and a power supply 407 . The processor 401 is electrically connected to the touch display screen 403 , the radio frequency circuit 404 , the audio circuit 405 , the input unit 406 and the power supply 407 , respectively. Those skilled in the art can understand that the structure of the electronic device shown in FIG. 5 does not constitute a limitation on the electronic device, and may include more or less components than the one shown, or combine some components, or arrange different components.
触控显示屏403可用于显示图形用户界面以及接收用户作用于图形用户界面产生的操作指令。触控显示屏403可以包括显示面板和触控面板。其中,显示面板可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。可选的,可以采用液晶显示器(LCD,Liquid Crystal Display)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。触控面板可用于收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板上或在触控面板附近的操作),并生成相应的操作指令,且操作指令执行对应程序。可选的,触控面板可包括触摸检测装置和触摸控制器两个部分。其中,触摸 检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器401,并能接收处理器401发来的命令并加以执行。触控面板可覆盖显示面板,当触控面板检测到在其上或附近的触摸操作后,传送给处理器401以确定触摸事件的类型,随后处理器401根据触摸事件的类型在显示面板上提供相应的视觉输出。在本申请实施例中,可以将触控面板与显示面板集成到触控显示屏403而实现输入和输出功能。但是在某些实施例中,触控面板与触控面板可以作为两个独立的部件来实现输入和输出功能。即触控显示屏403也可以作为输入单元406的一部分实现输入功能。The touch screen 403 can be used to display a graphical user interface and receive operation instructions generated by a user acting on the graphical user interface. The touch display 403 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light emitting diode (OLED, Organic Light-Emitting Diode), and the like. The touch panel can be used to collect the user's touch operations on or near it (such as the user's operations on or near the touch panel using a finger, stylus, etc., any suitable object or accessory), and generate corresponding operations instruction, and the operation instruction executes the corresponding program. Optionally, the touch panel may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the touch controller. To the processor 401, and can receive the command sent by the processor 401 and execute it. The touch panel can cover the display panel, and when the touch panel detects a touch operation on or near it, it is transmitted to the processor 401 to determine the type of the touch event, and then the processor 401 provides the display panel according to the type of the touch event. Corresponding visual output. In this embodiment of the present application, the touch panel and the display panel may be integrated into the touch display screen 403 to implement input and output functions. However, in some embodiments, the touch panel and the touch panel may be used as two independent components to implement input and output functions. That is, the touch display screen 403 can also be used as a part of the input unit 406 to realize the input function.
射频电路404可用于收发射频信号,以通过无线通信与网络设备或其他电子设备建立无线通讯,与网络设备或其他电子设备之间收发信号。The radio frequency circuit 404 can be used to send and receive radio frequency signals, so as to establish wireless communication with the network device or other electronic devices through wireless communication, and to send and receive signals with the network device or other electronic devices.
音频电路405可以用于通过扬声器、传声器提供用户与电子设备之间的音频接口。音频电路405可将接收到的音频数据转换后的电信号,传输到扬声器,由扬声器转换为声音信号输出;另一方面,传声器将收集的声音信号转换为电信号,由音频电路405接收后转换为音频数据,再将音频数据输出处理器401处理后,经射频电路404以发送给比如另一电子设备,或者将音频数据输出至存储器402以便进一步处理。音频电路405还可能包括耳塞插孔,以提供外设耳机与电子设备的通信。The audio circuit 405 may be used to provide an audio interface between the user and the electronic device through speakers and microphones. The audio circuit 405 can convert the received audio data into an electrical signal, and transmit it to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is converted after being received by the audio circuit 405. As audio data, the audio data is output to the processor 401 for processing, and then sent to, for example, another electronic device via the radio frequency circuit 404, or the audio data is output to the memory 402 for further processing. The audio circuit 405 may also include an earphone jack to provide for communication of peripheral headphones with the electronic device.
输入单元406可用于接收输入的数字、字符信息或用户特征信息(例如指纹、虹膜、面部信息等),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。The input unit 406 can be used to receive input numbers, character information or user characteristic information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control .
电源407用于给电子设备400的各个部件供电。可选的,电源407可以通过电源管理系统与处理器401逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源407还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。 Power supply 407 is used to power various components of electronic device 400 . Optionally, the power supply 407 may be logically connected to the processor 401 through a power management system, so that functions such as charging, discharging, and power consumption management are implemented through the power management system. The power source 407 may also include one or more DC or AC power sources, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and any other components.
尽管图5中未示出,电子设备400还可以包括图像传感器、传感器、无线保真模块、蓝牙模块等,在此不再赘述。Although not shown in FIG. 5 , the electronic device 400 may further include an image sensor, a sensor, a Wi-Fi module, a Bluetooth module, and the like, which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
由上可知,本实施例提供的电子设备,在进行图像处理时,通过图像传感器获取RAW图像数据;通过AI处理器对该RAW图像数据进行处理,由于该预设神经 网络模型是通过预设RAW图像数据以及对应的第一标签信息训练得到的,在图像处理阶段,可以使用图像传感器输出的原始RAW图像直接进行检测,无需经过ISP处理,提升了图像处理的效率。As can be seen from the above, the electronic device provided in this embodiment acquires RAW image data through an image sensor when performing image processing; and processes the RAW image data through an AI processor, because the preset neural network model is obtained by preset RAW image data. The image data and the corresponding first label information are obtained by training. In the image processing stage, the original RAW image output by the image sensor can be used for direct detection without ISP processing, which improves the efficiency of image processing.
本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过指令来完成,或通过指令控制相关的硬件来完成,该指令可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructions, or by instructions that control relevant hardware, and the instructions can be stored in a computer-readable storage medium, and loaded and executed by the processor.
为此,本申请实施例提供一种计算机可读存储介质,其中存储有多条计算机程序,该计算机程序能够被处理器进行加载,以执行本申请实施例所提供的任一种图像处理方法中的步骤。例如,该计算机程序可以执行如下步骤:To this end, the embodiments of the present application provide a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer programs can be loaded by a processor to execute any of the image processing methods provided by the embodiments of the present application. A step of. For example, the computer program may perform the following steps:
通过图像传感器获取RAW图像数据;Obtain RAW image data through the image sensor;
通过AI处理器对所述RAW图像数据进行处理,其中所述AI处理器包括预设神经网络模型,所述预设神经网络模型是根据预设RAW图像数据及与预设RAW图像数据对应的第一标签信息训练得到。The RAW image data is processed by an AI processor, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and the first RAW image data corresponding to the preset RAW image data. A label information is trained.
或者,在另一实施例中,该计算机程序能够被处理器进行加载,以执行本申请实施例所提供的任一种神经网络模型训练方法中的步骤。例如,该计算机程序可以执行如下步骤:Or, in another embodiment, the computer program can be loaded by the processor to execute the steps in any of the neural network model training methods provided in the embodiments of the present application. For example, the computer program may perform the following steps:
获取预设RAW图像数据,作为神经网络模型的输入数据;获取所述预设RAW图像数据对应的第一标签信息,作为所述神经网络模型的输出数据;根据所述输入数据和所述输出数据训练所述预设神经网络模型,以确定模型参数。Acquiring preset RAW image data as input data of the neural network model; acquiring first label information corresponding to the preset RAW image data as output data of the neural network model; according to the input data and the output data The preset neural network model is trained to determine model parameters.
以上各个操作的具体实施可参见前面的实施例,在此不再赘述。For the specific implementation of the above operations, reference may be made to the foregoing embodiments, and details are not described herein again.
其中,该存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。Wherein, the storage medium may include: a read-only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and the like.
由于该存储介质中所存储的计算机程序,可以执行本申请实施例所提供的任一种图像处理方法中的步骤,因此,可以实现本申请实施例所提供的任一种图像处理方法所能实现的有益效果,详见前面的实施例,在此不再赘述。Since the computer program stored in the storage medium can execute the steps in any image processing method provided by the embodiments of the present application, it is possible to realize the realization of any image processing method provided by the embodiments of the present application. For the beneficial effects, please refer to the previous embodiments for details, which will not be repeated here.
以上对本申请实施例所提供的一种图像处理方法、装置、存储介质、设备以及模型训练方法进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The image processing method, device, storage medium, device, and model training method provided by the embodiments of the present application have been described in detail above. The principles and implementations of the present application are described with specific examples. The above embodiments The description is only used to help understand the method of the present application and its core idea; meanwhile, for those skilled in the art, according to the idea of the present application, there will be changes in the specific embodiments and application scope. In summary, the above , the contents of this specification should not be construed as limiting the application.

Claims (20)

  1. 一种图像处理方法,其中,包括:An image processing method, comprising:
    通过图像传感器获取RAW图像数据;Obtain RAW image data through the image sensor;
    通过AI处理器对所述RAW图像数据进行处理,其中所述AI处理器包括预设神经网络模型,所述预设神经网络模型是根据预设RAW图像数据及与预设RAW图像数据对应的第一标签信息训练得到。The RAW image data is processed by an AI processor, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and the first RAW image data corresponding to the preset RAW image data. A label information is trained.
  2. 如权利要求1所述的方法,其中,通过AI处理器对所述RAW图像数据进行处理,包括:The method of claim 1, wherein processing the RAW image data by an AI processor comprises:
    将所述RAW图像数据由单通道RAW图像数据转换为多通道RAW图像数据;以及converting the RAW image data from single-channel RAW image data to multi-channel RAW image data; and
    通过AI处理器对所述多通道RAW图像数据进行处理。The multi-channel RAW image data is processed by an AI processor.
  3. 如权利要求1所述的方法,其中,所述预设神经网络模型为图像分类模型、目标检测模型、图像分割模型或者实例分割模型。The method of claim 1, wherein the preset neural network model is an image classification model, a target detection model, an image segmentation model or an instance segmentation model.
  4. 如权利要求1至3任一项所述的方法,其中,所述通过图像传感器获取RAW图像数据之前,还包括:The method according to any one of claims 1 to 3, wherein before acquiring the RAW image data through the image sensor, the method further comprises:
    获取所述预设RAW图像数据,作为所述预设神经网络模型的输入数据;Acquiring the preset RAW image data as the input data of the preset neural network model;
    获取所述预设RAW图像数据对应的所述第一标签信息,作为所述预设神经网络模型的输出数据;以及Acquiring the first label information corresponding to the preset RAW image data as output data of the preset neural network model; and
    根据所述输入数据和所述输出数据训练所述神经网络模型,以确定模型参数。The neural network model is trained based on the input data and the output data to determine model parameters.
  5. 一种神经网络模型训练方法,其中,包括:A neural network model training method, comprising:
    获取预设RAW图像数据,作为神经网络模型的输入数据;Obtain the preset RAW image data as the input data of the neural network model;
    获取所述预设RAW图像数据对应的第一标签信息,作为所述神经网络模型的输出数据;Acquiring first label information corresponding to the preset RAW image data as output data of the neural network model;
    根据所述输入数据和所述输出数据训练所述预设神经网络模型,以确定模型参数。The preset neural network model is trained according to the input data and the output data to determine model parameters.
  6. 如权利要求5所述的方法,其中,获取预设RAW图像数据,作为所述预设神经网络模型的输入数据,包括:The method of claim 5, wherein acquiring preset RAW image data as the input data of the preset neural network model comprises:
    获取第一预设RGB图像数据;obtaining the first preset RGB image data;
    根据预设全卷积神经网络,将所述第一预设RGB图像数据转换为对应的预设RAW图像数据,将所述预设RAW图像数据作为所述预设神经网络模型的输入数据;Converting the first preset RGB image data into corresponding preset RAW image data according to a preset fully convolutional neural network, and using the preset RAW image data as input data of the preset neural network model;
    获取所述预设RAW图像数据对应的第一标签信息,作为所述预设神经网络模型的输出数据,包括:Obtain the first label information corresponding to the preset RAW image data as the output data of the preset neural network model, including:
    获取所述第一预设RGB图像数据对应的第二标签信息;acquiring second label information corresponding to the first preset RGB image data;
    将所述第一预设RGB图像数据的第二标签信息映射至所述预设RAW图像数据,得到第一标签信息,作为所述预设神经网络模型的输出数据。The second label information of the first preset RGB image data is mapped to the preset RAW image data to obtain first label information, which is used as output data of the preset neural network model.
  7. 如权利要求5所述的方法,其中,获取所述预设RAW图像数据对应的第一标签信息,作为所述预设神经网络模型的输出数据,包括:The method according to claim 5, wherein obtaining the first label information corresponding to the preset RAW image data as the output data of the preset neural network model, comprising:
    获取所述预设RAW图像数据对应的预设RGB图像数据,以及所述预设RGB图像数据的第二标签信息;Acquiring preset RGB image data corresponding to the preset RAW image data, and second label information of the preset RGB image data;
    将所述预设RGB图像数据的第二标签信息映射至所述预设RAW图像数据,得到第一标签信息,作为模型训练的输出数据。The second label information of the preset RGB image data is mapped to the preset RAW image data to obtain the first label information, which is used as output data of model training.
  8. 一种图像处理装置,其中,包括:An image processing device, comprising:
    图像采集模块,用于通过图像传感器获取RAW图像数据;The image acquisition module is used to acquire RAW image data through the image sensor;
    图像处理模块,用于通过AI处理器对所述RAW图像数据进行处理,其中所述AI处理器包括预设神经网络模型,所述预设神经网络模型是根据预设RAW图像数据及与预设RAW图像数据对应的第一标签信息训练得到。The image processing module is used to process the RAW image data through an AI processor, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and preset The first label information corresponding to the RAW image data is obtained by training.
  9. 如权利要求8所述的装置,其中,所述图像采集模块,用于将所述RAW图像数据由单通道RAW图像数据转换为多通道RAW图像数据;以及The apparatus of claim 8, wherein the image acquisition module is configured to convert the RAW image data from single-channel RAW image data to multi-channel RAW image data; and
    通过AI处理器对所述多通道RAW图像数据进行处理。The multi-channel RAW image data is processed by an AI processor.
  10. 如权利要求8所述的装置,其中,所述预设神经网络模型为图像分类模型、目标检测模型、图像分割模型或者实例分割模型。The apparatus of claim 8, wherein the preset neural network model is an image classification model, a target detection model, an image segmentation model or an instance segmentation model.
  11. 如权利要求8所述的装置,其中,所述装置还包括:The apparatus of claim 8, wherein the apparatus further comprises:
    模型训练模块,用于获取所述预设RAW图像数据,作为所述预设神经网络模型的输入数据;a model training module for acquiring the preset RAW image data as input data for the preset neural network model;
    获取所述预设RAW图像数据对应的所述第一标签信息,作为所述预设神经网络模型的输出数据;以及Acquiring the first label information corresponding to the preset RAW image data as output data of the preset neural network model; and
    根据所述输入数据和所述输出数据训练所述神经网络模型,以确定模型参数。The neural network model is trained based on the input data and the output data to determine model parameters.
  12. 一种神经网络模型训练装置,其中,包括:A neural network model training device, comprising:
    模型训练模块,用于获取所述预设RAW图像数据,作为所述预设神经网络模型的输入数据;a model training module for acquiring the preset RAW image data as input data for the preset neural network model;
    获取所述预设RAW图像数据对应的所述第一标签信息,作为所述预设神经网 络模型的输出数据;以及Obtaining the first label information corresponding to the preset RAW image data as the output data of the preset neural network model; And
    根据所述输入数据和所述输出数据训练所述神经网络模型,以确定模型参数。The neural network model is trained based on the input data and the output data to determine model parameters.
  13. 如权利要求12所述的装置,其中,模型训练模块还用于:The apparatus of claim 12, wherein the model training module is further used for:
    获取第一预设RGB图像数据;obtaining the first preset RGB image data;
    根据预设全卷积神经网络,将所述第一预设RGB图像数据转换为对应的预设RAW图像数据,将所述预设RAW图像数据作为所述预设神经网络模型的输入数据;Converting the first preset RGB image data into corresponding preset RAW image data according to a preset fully convolutional neural network, and using the preset RAW image data as input data of the preset neural network model;
    获取所述第一预设RGB图像数据对应的第二标签信息;acquiring second label information corresponding to the first preset RGB image data;
    将所述第一预设RGB图像数据的第二标签信息映射至所述预设RAW图像数据,得到第一标签信息,作为所述预设神经网络模型的输出数据。The second label information of the first preset RGB image data is mapped to the preset RAW image data to obtain first label information, which is used as output data of the preset neural network model.
  14. 如权利要求12所述的装置,其中,模型训练模块还用于:The apparatus of claim 12, wherein the model training module is further used for:
    获取所述预设RAW图像数据对应的预设RGB图像数据,以及所述预设RGB图像数据的第二标签信息;Acquiring preset RGB image data corresponding to the preset RAW image data, and second label information of the preset RGB image data;
    将所述预设RGB图像数据的第二标签信息映射至所述预设RAW图像数据,得到第一标签信息,作为模型训练的输出数据。The second label information of the preset RGB image data is mapped to the preset RAW image data to obtain the first label information, which is used as output data of model training.
  15. 一种计算机可读存储介质,其上存储有计算机程序,其中,当所述计算机程序在计算机上运行时,使得所述计算机执行如权利要求1至4任一项所述的图像处理方法;A computer-readable storage medium on which a computer program is stored, wherein, when the computer program runs on a computer, the computer is caused to execute the image processing method according to any one of claims 1 to 4;
    或者,当所述计算机程序在计算机上运行时,使得所述计算机执行如权利要求5至7任一项所述的神经网络模型训练方法。Alternatively, when the computer program runs on a computer, the computer is caused to execute the neural network model training method according to any one of claims 5 to 7.
  16. 一种电子设备,其中,包括图像传感器,以及与所述图像传感器连接的AI处理器;An electronic device, including an image sensor, and an AI processor connected to the image sensor;
    所述图像传感器,用于获取RAW图像数据;the image sensor for acquiring RAW image data;
    所述AI处理器,用于对所述RAW图像数据进行处理,其中所述AI处理器包括预设神经网络模型,所述预设神经网络模型是根据预设RAW图像数据及与预设RAW图像数据对应的第一标签信息训练得到。The AI processor is used to process the RAW image data, wherein the AI processor includes a preset neural network model, and the preset neural network model is based on the preset RAW image data and the preset RAW image. The first label information corresponding to the data is obtained by training.
  17. 如权利要求16所述的电子设备,其中,所述图像传感器还用于:The electronic device of claim 16, wherein the image sensor is further configured to:
    将所述RAW图像数据由单通道RAW图像数据转换为多通道RAW图像数据;以及converting the RAW image data from single-channel RAW image data to multi-channel RAW image data; and
    通过AI处理器对所述多通道RAW图像数据进行处理。The multi-channel RAW image data is processed by an AI processor.
  18. 如权利要求16所述的电子设备,其中,所述预设神经网络模型为图像分 类模型、目标检测模型、图像分割模型或者实例分割模型。The electronic device according to claim 16, wherein the preset neural network model is an image classification model, a target detection model, an image segmentation model or an instance segmentation model.
  19. 如权利要求16所述的电子设备,其中,所述AI处理器还用于:The electronic device of claim 16, wherein the AI processor is further configured to:
    获取所述预设RAW图像数据,作为所述预设神经网络模型的输入数据;Acquiring the preset RAW image data as the input data of the preset neural network model;
    获取所述预设RAW图像数据对应的所述第一标签信息,作为所述预设神经网络模型的输出数据;以及Acquiring the first label information corresponding to the preset RAW image data as output data of the preset neural network model; and
    根据所述输入数据和所述输出数据训练所述神经网络模型,以确定模型参数。The neural network model is trained based on the input data and the output data to determine model parameters.
  20. 一种电子设备,包括处理器和存储器,其中,所述存储器存储有计算机程序,所述处理器通过调用所述计算机程序,用于执行如权利要求1至4任一项所述的图像处理方法;An electronic device, comprising a processor and a memory, wherein the memory stores a computer program, the processor is used to execute the image processing method according to any one of claims 1 to 4 by calling the computer program ;
    所述处理器通过调用所述计算机程序,用于执行如权利要求5至7任一项所述的神经网络模型训练方法。The processor is configured to execute the neural network model training method according to any one of claims 5 to 7 by invoking the computer program.
PCT/CN2022/081257 2021-04-23 2022-03-16 Image processing method and apparatus, storage medium, device, and model training method WO2022222652A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110443987.4 2021-04-23
CN202110443987.4A CN115238884A (en) 2021-04-23 2021-04-23 Image processing method, image processing apparatus, storage medium, device, and model training method

Publications (1)

Publication Number Publication Date
WO2022222652A1 true WO2022222652A1 (en) 2022-10-27

Family

ID=83666577

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/081257 WO2022222652A1 (en) 2021-04-23 2022-03-16 Image processing method and apparatus, storage medium, device, and model training method

Country Status (2)

Country Link
CN (1) CN115238884A (en)
WO (1) WO2022222652A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109379572A (en) * 2018-12-04 2019-02-22 北京达佳互联信息技术有限公司 Image conversion method, device, electronic equipment and storage medium
US20200211191A1 (en) * 2017-01-27 2020-07-02 Sigtuple Technologies Private Limited Method and system for detecting disorders in retinal images
CN112150363A (en) * 2020-09-29 2020-12-29 中科方寸知微(南京)科技有限公司 Convolution neural network-based image night scene processing method, and computing module and readable storage medium for operating method
CN112613373A (en) * 2020-12-16 2021-04-06 北京迈格威科技有限公司 Image recognition method and device, electronic equipment and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200211191A1 (en) * 2017-01-27 2020-07-02 Sigtuple Technologies Private Limited Method and system for detecting disorders in retinal images
CN109379572A (en) * 2018-12-04 2019-02-22 北京达佳互联信息技术有限公司 Image conversion method, device, electronic equipment and storage medium
CN112150363A (en) * 2020-09-29 2020-12-29 中科方寸知微(南京)科技有限公司 Convolution neural network-based image night scene processing method, and computing module and readable storage medium for operating method
CN112613373A (en) * 2020-12-16 2021-04-06 北京迈格威科技有限公司 Image recognition method and device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN115238884A (en) 2022-10-25

Similar Documents

Publication Publication Date Title
US11373054B2 (en) Object recognition method and mobile terminal
CN108594997B (en) Gesture skeleton construction method, device, equipment and storage medium
WO2021104195A1 (en) Image display method and electronic device
WO2014003365A1 (en) Method and apparatus for processing multiple inputs
CN111476780A (en) Image detection method and device, electronic equipment and storage medium
CN107977652B (en) Method for extracting screen display content and mobile terminal
WO2020220999A1 (en) Screenshot method and terminal device
WO2021190428A1 (en) Image capturing method and electronic device
WO2021057735A1 (en) Image processing method and apparatus, and electronic device and medium
WO2021190387A1 (en) Detection result output method, electronic device, and medium
WO2021233176A1 (en) Ambient light detection method and electronic device
CN110796248A (en) Data enhancement method, device, equipment and storage medium
WO2022110687A1 (en) Image processing method and apparatus, electronic device, and readable storage medium
WO2021208890A1 (en) Screen capturing method and electronic device
WO2020134789A1 (en) Mobile terminal and method for controlling on and off of screen, and computer storage medium
CN108600544B (en) Single-hand control method and terminal
CN113032076B (en) Display method, display device, computer equipment and storage medium
WO2018080204A1 (en) Image processing apparatus, image processing method, and computer-readable recording medium
WO2022222652A1 (en) Image processing method and apparatus, storage medium, device, and model training method
WO2020102977A1 (en) Image processing method and related product
WO2023093390A1 (en) Layout method, readable medium and electronic device
WO2021071124A1 (en) Electronic device with improved visibility of user interface
CN111679737B (en) Hand segmentation method and electronic device
WO2021190351A1 (en) Image processing method and electronic device
WO2018153269A1 (en) Method and system for mobile terminal-based automatic determination of dynamic focal points in photos, and mobile terminal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22790761

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22790761

Country of ref document: EP

Kind code of ref document: A1