Model training method, image processing method, device, electronic equipment and medium
By utilizing the feature information of sample images to update the parameters of the prediction module during neural network model training, the problems of insufficient model understanding and slow convergence caused by information loss are solved, thereby improving the model training effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-30
- Publication Date
- 2026-03-24
AI Technical Summary
During the training of a neural network model, information loss leads to insufficient understanding of the sample images by the model, resulting in slow convergence and poor training performance.
The parameters of the prediction module are updated by using the first feature information of the sample image, and then the second feature information is input into the updated prediction module. The parameters of the model are adjusted based on the label of the sample image and the prediction result.
It reduces the adverse effects of information loss on model training, improves the model's understanding of sample images, accelerates model convergence, and improves training results.
Smart Images

Figure CN116579404B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and more particularly to the field of image processing technology, specifically to a model training method, image processing method, apparatus, system, electronic device, computer-readable storage medium, and computer program product. Background Technology
[0002] Artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It involves both hardware and software technologies. AI hardware technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing. AI software technologies mainly include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graph technologies.
[0003] The methods described in this section are not necessarily methods that had been previously conceived or adopted. Unless otherwise specified, no method described in this section should be assumed to be prior art simply because it is included in this section. Similarly, unless otherwise specified, the issues mentioned in this section should not be considered to be accepted in any prior art. Summary of the Invention
[0004] This disclosure provides a method for model training, an image processing method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product.
[0005] According to one aspect of this disclosure, a model training method is provided, wherein the model includes a feature extraction module and a prediction module, the method comprising: inputting a sample image into the feature extraction module to obtain first feature information and second feature information of the sample image; updating the parameters of the prediction module using the first feature information; inputting the second feature information into the updated prediction module to obtain a prediction result of the sample image; and adjusting the parameters of the model based on the label of the sample image and the prediction result.
[0006] According to one aspect of this disclosure, an image processing method is provided, comprising: inputting an image to be processed into a quality recognition model to obtain a quality recognition result of the image to be processed, wherein the quality recognition model is trained according to the above method.
[0007] According to one aspect of this disclosure, a model training apparatus is provided, wherein the model includes a feature extraction module and a prediction module, and the method includes: an input unit configured to input a sample image into the feature extraction module to obtain first feature information and second feature information of the sample image; an update unit configured to update the parameters of the prediction module using the first feature information; a prediction unit configured to input the second feature information into the updated prediction module to obtain a prediction result of the sample image; and an adjustment unit configured to adjust the parameters of the model based on the label of the sample image and the prediction result.
[0008] According to one aspect of this disclosure, an image processing system is provided, comprising: a quality recognition model configured to determine a quality recognition result of an image to be processed, wherein the quality recognition model is trained according to the training method described above.
[0009] According to one aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform any of the methods described above.
[0010] According to one aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause a computer to perform any of the methods described above.
[0011] According to one aspect of this disclosure, a computer program product is provided, including a computer program, wherein the computer program, when executed by a processor, implements any of the methods described above.
[0012] According to one or more embodiments of this disclosure, the adverse effects of information loss on model training can be reduced, the model's ability to understand sample images can be improved, and model convergence can be accelerated.
[0013] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0014] The accompanying drawings exemplify embodiments and form part of the specification, serving together with the textual description to explain exemplary implementations of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals refer to similar but not necessarily identical elements.
[0015] Figure 1A schematic diagram of an exemplary system in which the various methods described herein may be implemented according to embodiments of the present disclosure is shown;
[0016] Figure 2 A flowchart of a model training method according to an embodiment of the present disclosure is shown;
[0017] Figure 3 A schematic diagram of a model training method according to an embodiment of the present disclosure is shown;
[0018] Figure 4 A structural block diagram of a model training apparatus according to an embodiment of the present disclosure is shown; and
[0019] Figure 5 A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation
[0020] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0021] In this disclosure, unless otherwise stated, the use of terms such as "first," "second," etc., to describe various elements is not intended to limit the positional, temporal, or importance relationships of these elements; such terms are merely used to distinguish one element from another. In some examples, the first element and the second element may refer to the same instance of that element, while in other cases, based on the context, they may refer to different instances.
[0022] The terminology used in the description of the various examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context explicitly indicates otherwise, an element may be one or more unless the number of elements is specifically limited. Furthermore, the term "and / or" as used in this disclosure covers any one of the listed items and all possible combinations thereof.
[0023] When using neural network models for computation, information loss is inevitable. This is detrimental to model training. Information loss leads to insufficient understanding of sample images during training, resulting in slow convergence and poor training performance.
[0024] Based on this, this disclosure proposes a model training method. The method uses the first feature information of the sample image to update the parameters of the prediction module. Then, the second feature information of the sample image is input into the updated prediction module to obtain the prediction result of the sample image. Finally, the model parameters are adjusted based on the sample image's label and the prediction result. Thus, using the first feature information of the sample image to update the prediction module's parameters can reduce the adverse effects of information loss on model training, improve the model's understanding of sample images, accelerate model convergence, and improve the model's training effect.
[0025] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0026] Figure 1 A schematic diagram of an exemplary system 100 in which the various methods and apparatus described herein can be implemented according to embodiments of this disclosure is shown. Reference Figure 1 The system 100 includes one or more client devices 101, 102, 103, 104, 105 and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105 and 106 can be configured to execute one or more applications.
[0027] In embodiments of this disclosure, server 120 may run one or more services or software applications that enable the execution of methods for model training and image processing.
[0028] In some embodiments, server 120 may also provide other services or software applications that may include non-virtual and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, such as to users of client devices 101, 102, 103, 104, 105 and / or 106 under a Software as a Service (SaaS) model.
[0029] exist Figure 1 In the configuration shown, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or combinations thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 can sequentially interact with server 120 using one or more client applications to utilize the services provided by these components. It should be understood that various different system configurations are possible and may differ from system 100. Therefore, Figure 1 This is an example of a system used to implement the various methods described herein, and is not intended to be limiting.
[0030] Users can use client devices 101, 102, 103, 104, 105, and / or 106 to acquire, send, and receive processed images. The client devices can provide an interface that allows users to interact with them. The client devices can also output information to the user through this interface. Although... Figure 1 Only six client devices are described, but those skilled in the art will understand that this disclosure can support any number of client devices.
[0031] Client devices 101, 102, 103, 104, 105, and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptops), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors, or other sensing devices. These computer devices can run various types and versions of software applications and operating systems, such as Microsoft Windows, Apple iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as Google Chrome OS); or include various mobile operating systems, such as Microsoft Windows Mobile OS, iOS, Windows Phone, and Android. Portable handheld devices may include cellular phones, smartphones, tablets, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Gaming systems may include various handheld gaming devices, internet-enabled gaming devices, etc. Client devices are capable of executing various applications, such as various internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and can use various communication protocols.
[0032] Network 110 can be any type of network well known to those skilled in the art, and can use any of a variety of available protocols (including but not limited to TCP / IP, SNA, IPX, etc.) to support data communication. By way of example only, one or more networks 110 can be a local area network (LAN), an Ethernet-based network, a token ring network, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.
[0033] Server 120 may include one or more general-purpose computers, special-purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running a virtual operating system, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that can be virtualized to maintain virtual storage devices for servers). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.
[0034] The computing unit in server 120 can run one or more operating systems, including any of the aforementioned operating systems and any commercially available server operating system. Server 120 can also run any of a variety of additional server applications and / or middleware applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.
[0035] In some implementations, server 120 may include one or more applications to analyze and merge data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105 and / or 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105 and / or 106.
[0036] In some implementations, server 120 can be a server for a distributed system or a server integrated with blockchain. Server 120 can also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in the cloud computing service system, designed to address the shortcomings of traditional physical hosts and Virtual Private Server (VPS) services, such as high management difficulty and weak business scalability.
[0037] System 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. Databases 130 may reside in various locations. For example, a database used by server 120 may be local to server 120, or it may be located away from server 120 and may communicate with server 120 via a network-based or dedicated connection. Databases 130 may be of different types. In some embodiments, the database used by server 120 may be, for example, a relational database. One or more of these databases may store, update, and retrieve data from and from the databases in response to commands.
[0038] In some embodiments, one or more of the databases 130 may also be used by an application to store application data. The databases used by the application may be of different types, such as key-value stores, object stores, or regular stores supported by a file system.
[0039] Figure 1 The system 100 can be configured and operated in various ways to enable the application of the various methods and apparatus described in this disclosure.
[0040] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0041] Figure 2 A flowchart of a model training method according to an exemplary embodiment of the present disclosure is shown, wherein the model includes a feature extraction module and a prediction module. The method 200 includes: step S201, inputting a sample image into the feature extraction module to obtain first feature information and second feature information of the sample image; step S202, updating the parameters of the prediction module using the first feature information; step S203, inputting the second feature information into the updated prediction module to obtain a prediction result of the sample image; and step S204, adjusting the parameters of the model based on the label of the sample image and the prediction result.
[0042] Therefore, using the first feature information of the sample image to update the parameters of the prediction module can reduce the adverse effects of information loss on model training, improve the model's understanding of the sample image, accelerate model convergence, and improve the training effect of the model.
[0043] In step S201, the sample image has a corresponding label. According to some embodiments, the label may include at least one of the following: an image quality label; a weather label; and a lighting label.
[0044] In one implementation, the image quality label can be a score of image quality. By scoring elements such as brightness, contrast, color saturation, and sharpness of a sample image, a final image quality score can be obtained, which serves as the image quality label for that sample image.
[0045] In one implementation, the image quality label may also include an image blur level label, which may specifically include categories such as normal, slightly blurred, and blurred.
[0046] In one implementation, weather tags may include categories such as normal, rainy, foggy, and snowy.
[0047] In one implementation, the illumination label may include categories such as normal, dim, and extremely dark.
[0048] According to some embodiments, the feature extraction module may include multiple convolutional layers, wherein the second feature information is obtained by fusing the output data of at least two of the multiple convolutional layers.
[0049] Since the output data of the lower convolutional layers in multiple convolutional layers often have clearer contour and texture features, while the output data of the higher convolutional layers have richer semantic features, the second feature information obtained by fusing the output data of at least two convolutional layers has more comprehensive image information, which is beneficial for the model to perform inference on sample images.
[0050] According to some embodiments, at least two convolutional layers include a convolutional layer near the input of the feature extraction module and a convolutional layer near the output of the feature extraction module.
[0051] The convolutional layer closest to the input of the feature extraction module can be any one of the first three convolutional layers of the feature extraction module, and the convolutional layer closest to the output of the feature extraction module can be any one of the last three convolutional layers of the feature extraction module.
[0052] In one implementation, 1*1 convolutions can be used to extract output data in convolutional layers conv2_6, conv4_12 and conv5_6 respectively, and the output data extracted from the three convolutional layers can be concatenated with the output data of the last layer to form a 1*N dimensional vector as the second feature information.
[0053] According to some embodiments, the first feature information can be determined based on the output data of the last layer of the feature extraction module.
[0054] Specifically, the output data of the last layer of the feature extraction module can be processed by three 1*1 convolutions and used as the first feature information.
[0055] According to some embodiments, the feature extraction module can be a ResNeXt50 model.
[0056] Regarding step S202, according to some embodiments, the prediction module may include at least one fully connected layer, and wherein updating the parameters of the prediction module using the first feature information may include: mapping the first feature information to an additional parameter matrix corresponding to the dimension of the fully connected layer for each of the at least one fully connected layer; and updating the parameters of the fully connected layer using the additional parameter matrix.
[0057] Since each fully connected layer may have a different dimension, mapping the first feature information to an additional parameter matrix corresponding to the dimension of each fully connected layer makes it easier to superimpose the first feature information of the sample image with each fully connected layer.
[0058] In one implementation, for each of the at least one fully connected layers, the first feature information can be transformed by a 3*3 convolution corresponding to the fully connected layer to obtain an additional parameter matrix corresponding to the dimension of the fully connected layer.
[0059] According to some embodiments, updating the parameters of the fully connected layer using an additional parameter matrix may include updating the weights of the fully connected layer by using a weighted sum of the additional parameter matrix and the weight matrix of the fully connected layer. That is, the updated weight of each connection in the fully connected layer is the weighted sum of the connection's original weight and its corresponding value in the additional parameter matrix.
[0060] Therefore, information from the sample image can be incorporated into each connection in the fully connected layer, improving the fully connected layer's understanding of the sample image and accelerating model convergence during training.
[0061] According to some embodiments, the bias of the fully connected layer is updated using the result of global pooling of the additional parameter matrix.
[0062] Specifically, the global pooling result of the additional parameter matrix can be input into a fully connected layer, and the output value of the fully connected layer can be superimposed on the bias of the fully connected layer. That is, the updated bias of the fully connected layer is a weighted sum of the bias of the fully connected layer before the update and the output value.
[0063] In step S203, an updated prediction module is used to perform prediction of the second feature information of the sample image. The prediction result may include one or more of the following: predicted image quality, predicted weather classification, and predicted illumination classification.
[0064] Regarding step S204, in one embodiment, if the label of the sample image includes an image quality score as an image quality label, a first loss value can be calculated using Sigmoid based on the image quality label and the predicted image quality, thereby adjusting the parameters of the model.
[0065] In another implementation, if the labels of the sample images include either a weather label or a lighting label, a second loss value can be calculated based on either the weather label and the predicted weather classification, or the lighting label and the predicted lighting classification, in order to adjust the parameters of the model.
[0066] In another implementation, when the labels of the sample images include multiple of the above-mentioned image quality labels, weather labels, and illumination labels, the model parameters can be adjusted by calculating the loss value corresponding to each label separately and by weighting the loss values corresponding to each label.
[0067] Figure 3 A schematic diagram of a model training method according to an exemplary embodiment of the present disclosure is shown, such as... Figure 3 As shown, the model includes a feature extraction module 321 and a prediction module 322. The prediction module 322 includes four sequentially connected fully connected layers. Meanwhile, Figure 3 The training also includes an auxiliary module 330, which includes 3x3 convolutional blocks corresponding to each of the four fully connected layers in the prediction module 322.
[0068] Any one of images 311, 312, and 313 can be used as a sample image input to feature extraction module 321 to obtain first feature information for input to auxiliary module 330 and second feature information for input to prediction module 322. The first feature information is the result of processing the output data of the last layer in feature extraction module 321 through three 1*1 convolutions, and the second feature information is the result of concatenating the output data of three different convolutional layers in feature extraction module 321.
[0069] The first feature information is input into the auxiliary module 330. For each of the four fully connected layers in the prediction module 322, the first feature information is transformed using a 3*3 convolutional block corresponding to the fully connected layer, so as to map it into an additional parameter matrix corresponding to the dimension of the fully connected layer.
[0070] The weights of the fully connected layer are updated by using the weighted sum of the additional parameter matrix and the weight matrix of the fully connected layer. That is, the weight of each connection in the fully connected layer after the update is the weight of the connection before the update and the weighted sum of the corresponding value of the connection in the additional parameter matrix.
[0071] The bias of the fully connected layer is updated using the result of global pooling on the additional parameter matrix. Specifically, the result of global pooling of the additional parameter matrix is input into a fully connected layer, and the output value of the fully connected layer is obtained. The updated bias of the fully connected layer is a weighted sum of the original bias of the fully connected layer and the output value.
[0072] The second feature information is input into the updated prediction module 322 to obtain the prediction result for the sample image. Based on the label of the sample image and the prediction result, the parameters of the model are adjusted.
[0073] It is important to note that when adjusting the parameters in the feature extraction module 321 and the prediction module 322 of the model, the parameters in the auxiliary module 330 are also adjusted simultaneously. Specifically, the adjustment of the parameters in the prediction module 322 is based on the updated parameters of the prediction module 322.
[0074] According to embodiments of this disclosure, an image processing method is also provided, comprising: inputting an image to be processed into a quality recognition model to obtain a quality recognition result of the image to be processed, wherein the quality recognition model is trained according to any of the methods described above.
[0075] The quality recognition model trained using the above training method has a stronger understanding of the images to be processed, thus obtaining more accurate quality recognition results.
[0076] According to some embodiments, the quality identification result may include an image quality score and quality influencing factors. The method further includes: in response to an image quality score being less than a preset threshold, performing processing on the image to be processed based on the quality influencing factors. This allows for targeted processing of the image to be processed based on predicted quality influencing factors when the image quality is poor, thereby improving the processing effect.
[0077] According to some embodiments, quality-influencing factors may include at least one of weather and light.
[0078] For example, if the image quality score is less than a preset threshold and the quality-affecting factors include rain and extreme darkness, then targeted de-raining and brightness enhancement processes can be performed on the image to be processed.
[0079] Figure 4A model training apparatus 400 according to an exemplary embodiment of the present disclosure is shown, wherein the model includes a feature extraction module and a prediction module. The apparatus 400 includes: an input unit 401 configured to input a sample image into the feature extraction module to obtain first feature information and second feature information of the sample image; an update unit 402 configured to update the parameters of the prediction module using the first feature information; a prediction unit 403 configured to input the second feature information into the updated prediction module to obtain a prediction result of the sample image; and an adjustment unit 404 configured to adjust the parameters of the model based on the label of the sample image and the prediction result.
[0080] According to some embodiments, the prediction module includes at least one fully connected layer, and wherein the update unit includes: a mapping subunit configured to map first feature information to an additional parameter matrix corresponding to the dimension of the fully connected layer for each of the at least one fully connected layer; and an update subunit configured to update the parameters of the fully connected layer using the additional parameter matrix.
[0081] According to some embodiments, the updating subunit includes a subunit for updating the weights of the fully connected layer using a weighted sum of the additional parameter matrix and the weight matrix of the fully connected layer.
[0082] According to some embodiments, the feature extraction module includes multiple convolutional layers, wherein the second feature information is obtained by fusing the output data of at least two of the multiple convolutional layers.
[0083] According to some embodiments, at least two convolutional layers include a convolutional layer near the input of the feature extraction module and a convolutional layer near the output of the feature extraction module.
[0084] According to embodiments of this disclosure, an image processing system is also provided, including: a quality recognition model configured to determine a quality recognition result of an image to be processed, wherein the quality recognition model is trained according to any of the methods described above.
[0085] According to some embodiments, the quality identification result includes an image quality score and quality influencing factors. The system further includes an image processing model configured to perform processing on the image to be processed based on the quality influencing factors of the image to be processed in response to the image quality score being less than a preset threshold.
[0086] According to embodiments of this disclosure, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform any of the methods described above.
[0087] According to embodiments of this disclosure, a non-transitory computer-readable storage medium storing computer instructions is also provided, wherein the computer instructions are used to cause a computer to perform any of the methods described above.
[0088] According to embodiments of this disclosure, a computer program product is also provided, including a computer program, wherein the computer program, when executed by a processor, implements any of the methods described above.
[0089] refer to Figure 5 The present invention describes a structural block diagram of an electronic device 500 that can serve as a server or client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0090] like Figure 5 As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. The RAM 503 may also store various programs and data required for the operation of the electronic device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0091] Multiple components in electronic device 500 are connected to I / O interface 505, including: input unit 506, output unit 507, storage unit 508, and communication unit 509. Input unit 506 can be any type of device capable of inputting information to electronic device 500. Input unit 506 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device, and may include, but is not limited to, a mouse, keyboard, touchscreen, trackpad, trackball, joystick, microphone, and / or remote control. Output unit 507 can be any type of device capable of presenting information, and may include, but is not limited to, a monitor, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 508 may include, but is not limited to, disk and optical disk. Communication unit 509 allows electronic device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, 802.11 devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0092] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as model training methods or image processing methods. For example, in some embodiments, the model training method or image processing method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the model training method or image processing method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform a model training method or an image processing method by any other suitable means (e.g., by means of firmware).
[0093] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0094] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0095] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0096] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0097] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0098] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0099] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0100] While embodiments or examples of this disclosure have been described with reference to the accompanying drawings, it should be understood that the methods, systems, and devices described above are merely exemplary embodiments or examples, and the scope of the invention is not limited by these embodiments or examples, but only by the granted claims and their equivalents. Various elements in the embodiments or examples may be omitted or replaced by their equivalents. Furthermore, the steps may be performed in a different order than that described in this disclosure. Further, various elements in the embodiments or examples may be combined in various ways. Importantly, as the technology evolves, many elements described herein can be replaced by equivalents that appear after this disclosure.
Claims
1. A method for training a quality identification model, wherein, The model includes a feature extraction module and a prediction module, and the method includes: The sample image is input into the feature extraction module to obtain first feature information and second feature information of the sample image. The first feature information is determined based on the output data of the last layer of the feature extraction module, and the second feature information is determined by fusing the output data of at least two convolutional layers in the feature extraction module. The parameters of the prediction module are updated using the first feature information; The second feature information is input into the updated prediction module to obtain the prediction result of the sample image; and The parameters of the model are adjusted based on the labels of the sample images and the prediction results.
2. The method according to claim 1, wherein, The prediction module includes at least one fully connected layer, and wherein updating the parameters of the prediction module using the first feature information includes: For each of the at least one fully connected layer, the first feature information is mapped to an additional parameter matrix corresponding to the dimension of that fully connected layer; and The parameters of the fully connected layer are updated using the additional parameter matrix.
3. The method according to claim 2, wherein, Updating the parameters of the fully connected layer using the additional parameter matrix includes: The weights of the fully connected layer are updated by using the weighted sum of the additional parameter matrix and the weight matrix of the fully connected layer.
4. The method according to claim 2, wherein, Updating the parameters of the fully connected layer using the additional parameter matrix includes: The bias of the fully connected layer is updated using the result of global pooling on the additional parameter matrix.
5. The method according to claim 1, wherein, The at least two convolutional layers include one convolutional layer near the input of the feature extraction module and one convolutional layer near the output of the feature extraction module.
6. The method according to any one of claims 1 to 5, wherein, The label includes at least one of the following: Image quality labels; Weather tags; and Illumination label.
7. An image processing method, comprising: The image to be processed is input into a quality recognition model to obtain a quality recognition result for the image to be processed, wherein the quality recognition model is trained by the method according to any one of claims 1 to 6.
8. The method according to claim 7, wherein, The quality identification result includes image quality score and quality influencing factors, and the method further includes: In response to the image quality score being less than a preset threshold, processing is performed on the image to be processed based on the quality influencing factors of the image to be processed.
9. The method according to claim 8, wherein, The quality-influencing factors include at least one of weather and sunlight.
10. A quality identification model training device, wherein, The model includes a feature extraction module and a prediction module, and the device includes: An input unit is configured to input a sample image into the feature extraction module to obtain first feature information and second feature information of the sample image, wherein the first feature information is determined based on the output data of the last layer of the feature extraction module, and the second feature information is determined by fusing the output data of at least two of the multiple convolutional layers in the feature extraction module; An update unit is configured to update the parameters of the prediction module using the first feature information; A prediction unit is configured to input the second feature information into the updated prediction module to obtain a prediction result for the sample image; and An adjustment unit is configured to adjust the parameters of the model based on the labels of the sample images and the prediction results.
11. The apparatus according to claim 10, wherein, The prediction module includes at least one fully connected layer, and the update unit includes: A mapping subunit is configured to map the first feature information to an additional parameter matrix corresponding to the dimension of each of the at least one fully connected layer; and The update subunit is configured to update the parameters of the fully connected layer using the additional parameter matrix.
12. The apparatus according to claim 11, wherein, The update subunit includes: A sub-unit used to update the weights of the fully connected layer by using the weighted sum of the additional parameter matrix and the weight matrix of the fully connected layer.
13. The apparatus according to claim 10, wherein, The at least two convolutional layers include one convolutional layer near the input of the feature extraction module and one convolutional layer near the output of the feature extraction module.
14. An image processing system, comprising: A quality recognition model is configured to determine the quality recognition result of an image to be processed, wherein the quality recognition model is trained by the method according to any one of claims 1 to 6.
15. The system according to claim 14, wherein, The quality identification results include image quality scores and quality influencing factors, and the system further includes: An image processing model is configured to perform processing on the image to be processed based on the quality influencing factors of the image to be processed in response to the image quality score being less than a preset threshold.
16. An electronic device comprising: At least one processor; as well as A memory that is communicatively connected to the at least one processor; in The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.
17. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-9.
18. A computer program product comprising a computer program, wherein, When the computer program is executed by a processor, it implements the method of any one of claims 1-9.
Citation Information
Patent Citations
Image quality evaluation method suitable for small sample data
CN110070541A
Classification model training method and device, image classification method and device, equipment and medium
CN113902010A