Method, device and computer program product for processing an image
Patent Information
- Application Number
- CN202210874440.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-22
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2042-07-22
AI Technical Summary
In data-intensive applications, especially edge servers, storage space is limited and image data management is inefficient, leading to resource waste and excessively long training time for models. Furthermore, newly added images may be invalid or add noise.
By generating synthetic images, the original sample image set is processed using data distillation algorithms or capsule network models to determine the quality of the target image, and the decision to retain or discard the image is made based on the quality assessment, thereby optimizing the storage and management of image data.
It improves the effective utilization of image data, reduces resource usage, shortens training time, reduces the impact of noise, and improves the accuracy of model training.
Smart Images

Figure CN117472266B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this disclosure generally relate to the field of image processing, and more particularly to methods, apparatus and computer program products for processing images. Background Technology
[0002] In recent years, with the development of computer and network technologies, people often implement some computing tasks on edge devices or cloud servers to provide services to users more quickly. Storage capacity is a key factor in evaluating the performance of edge or cloud servers. However, in most cases, especially for edge servers, storage space is limited. In this situation, data management, especially the management of image data used to train models, is particularly important. For example, data-intensive applications such as autonomous driving require the processing of large amounts of image data, and the storage and management of image data also determine the performance level of these applications. However, there are still many problems to be solved in the management of image data. Summary of the Invention
[0003] Embodiments of this disclosure provide a method, apparatus, and computer program product for processing images.
[0004] According to a first aspect of this disclosure, a method for processing an image is provided. The method includes determining a set of synthetic images, wherein the synthetic images in the set are synthesized from images of the same type from multiple images. The method also includes determining the image quality of an acquired target image based on the set of synthetic images. The method further includes processing the acquired target image based on the image quality.
[0005] According to a second aspect of this disclosure, an electronic device is provided. The electronic device includes at least one processor; and a memory coupled to the at least one processor and having instructions stored thereon, the instructions causing the device to perform actions when executed by the at least one processor, the actions including: determining a set of composite images, wherein the composite images in the set of composite images are synthesized from images of the same type from a plurality of images; determining an image quality of an acquired target image based on the set of composite images; and processing the acquired target image based on the image quality.
[0006] According to a third aspect of this disclosure, a computer program product is provided, which is tangibly stored on a non-volatile computer-readable medium and includes machine-executable instructions that, when executed, cause a machine to perform the steps of the method in the first aspect of this disclosure. Attached Figure Description
[0007] The above and other objects, features and advantages of this disclosure will become more apparent from the accompanying drawings, in which like reference numerals generally denote like parts.
[0008] Figure 1 The illustration shows a schematic diagram of an example environment in which the devices and / or methods of the embodiments of this disclosure may be implemented;
[0009] Figure 2 The illustration shows a schematic diagram of an image processing procedure according to an embodiment of the present disclosure;
[0010] Figure 3 An example of image processing according to an embodiment of the present disclosure is illustrated;
[0011] Figure 4 A flowchart illustrating a method for processing an image according to an embodiment of the present disclosure is shown;
[0012] Figure 5 The illustration shows a schematic diagram of an example of a composite image according to an embodiment of the present disclosure;
[0013] Figure 6 The illustration shows a schematic diagram of an example of determining a label for a sample image according to an embodiment of the present disclosure;
[0014] Figure 7 A schematic block diagram of an example device suitable for implementing embodiments of the present disclosure is shown.
[0015] In the various figures, the same or corresponding reference numerals indicate the same or corresponding parts. Detailed Implementation
[0016] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0017] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0018] As mentioned above, the sample image set is quite large when training various machine learning models using sample images. Despite this large size, new sample images need to be continuously added to ensure the accuracy of the trained model. However, as the number of images increases, the sample image set becomes increasingly large, leading to a prolonged training process. Furthermore, newly added sample images may already exist in the sample image set, and using these images to train the machine learning model does not significantly improve the model but instead wastes considerable computational resources. In addition, adding some images to the sample image set can increase noise during machine learning model training, thus hindering model training.
[0019] To address at least the aforementioned and other potential problems, embodiments of this disclosure propose a method for processing images. In this method, a computing device determines a set of composite images, where the composite images are synthesized from multiple images of the same type. The computing device then uses the composite images to determine the image quality of an acquired target image. Next, the computing device manages the acquired target image based on the image quality. This method improves the storage and management of image data, increases the effective utilization of data, and reduces resource usage.
[0020] The embodiments of this disclosure will now be described in further detail with reference to the accompanying drawings, wherein... Figure 1 The examples illustrate the devices and / or methods of embodiments of this disclosure and may be implemented in an example environment.
[0021] In environment 100, storage pool 102 stores a set of raw sample images 104 for training models. The raw sample image set 104 can be used to train various suitable machine models, such as machine learning models for image classification or object recognition. Storage pool 102 also has a ranked image pool 106, which ranks the received sample images according to image quality after the raw sample image set 104, and then stores them according to the ranking.
[0022] If target image 110 is received, its quality needs to be evaluated. Based on the quality evaluation result, a decision is made whether to retain target image 110. If target image 110 is retained, it is either placed in the ranked image pool 106 or classified as a discarded sample 108. If target image 110 is not retained, it is either discarded in the discarded sample 108 or stored in some external storage device. The original sample image set 104 in the storage pool and the samples in the ranked image pool are used for online model training 112.
[0023] above Figure 1The following describes an example environment in which the devices and / or methods of embodiments of this disclosure may be implemented. Figure 2 Further description of the image processing process, in which Figure 2 The illustration shows a schematic diagram of a process for processing an image according to an embodiment of the present disclosure.
[0024] like Figure 2 As shown, computing device 204 is used to manage a set of sample images for training a machine learning model. For example... Figure 1 The sample image set in storage pool 102 includes the original sample image set and the sample images in the ranked storage pool.
[0025] Examples of computing devices 204 include, but are not limited to, personal computers, server computers, handheld or laptop devices, mobile devices (such as mobile phones, personal digital assistants (PDAs), media players, etc.), multiprocessor systems, consumer electronics, minicomputers, mainframe computers, and distributed computing environments that include any of the above systems or devices.
[0026] Computing device 204 receives a set of composite images 202. The composite images in this set are, for example, composites of... Figure 1 The images are synthesized from images of the same type in the original sample image set in storage pool 102. For example, in the original sample image set used to train a machine model that distinguishes digits 1-9, images classified as different digits can be synthesized into a single synthetic image. For instance, a synthetic image can be generated using a subset of images classified as digit 1, and another synthetic image can be generated using images classified as digit 2. The above examples are merely illustrative of the present invention and not intended to limit its specific application. A set of synthetic images can also be obtained by processing the original sample image set used for other classification models, such as processing the original image set used for training different animal classifications.
[0027] Figure 2 The illustration shows a computing device 204 receiving a set of composite images 202 generated by another computing device based on an original sample image set; this is merely an example and not a specific limitation of the present disclosure. The computing device 204 may also process the original sample image set to generate the composite image 202.
[0028] In some embodiments, computing device 204 or other computing device employs a data distillation algorithm to process the original sample image set to obtain a set of synthetic images. The computing device may perform data distillation on the original sample image set to obtain a set of synthetic images, each synthetic image corresponding to a category to be classified. The set of synthetic images contains information about images that can be classified into that category. In some embodiments, the computing device employs a capsule network model to process the original sample image set to utilize corresponding capsules to obtain a corresponding set of synthetic images. Each synthetic image is a visual representation of the information within a capsule.
[0029] After obtaining the combined image, the computing device 204 uses the combined image 202 to determine whether the acquired target image 206 can be added to the sample image set. The computing device 204 compares the acquired target image 206 with the combined image 202 to determine the image quality 210 of the target image 206 relative to the set of combined images 202. Then, based on the image quality 210, the computing device 204 determines whether to retain or discard the target image.
[0030] This method improves the storage and management of image data, increases the effective utilization of data, and reduces resource consumption.
[0031] above Figure 2 A schematic diagram illustrating a process for processing an image according to embodiments of the present disclosure is described below. Figure 3 Examples of image processing according to embodiments of the present disclosure are described.
[0032] like Figure 3 As shown, the original sample image set 302 includes various images that can be used to train the machine model. In one example, the machine model to be trained is a classification model. In another example, the model to be trained is an object recognition model. The above examples are merely for describing this disclosure and are not intended to specifically limit this disclosure.
[0033] Next, the computing device receives the target image 306 to be added to the sample image set. A distillation operation is performed on the original sample image set to obtain a set of composite images 304. Then, the quality determination module 308 within the computing device compares the target image 306 with the set of composite images 304 to determine the quality of the target image. If the target image is classified as high quality 310, the sample image is retained. If the target image is classified as low quality 312, the target image is discarded.
[0034] The above combination Figure 3 An example process for processing images according to embodiments of the present disclosure is described below. Figure 4 A flowchart describing a method for processing an image according to embodiments of the present disclosure is provided. This method can be... Figure 2 Executed at computing device 204 or other computing device.
[0035] At box 402, a set of synthesized images is defined, wherein the synthesized images in the set are synthesized from multiple images of the same type. For example, computing device 204 is used to acquire the synthesized images, which are generated from multiple images used for training a machine model. These multiple images are either an original set of sample images or a subset of the original set of sample images.
[0036] In some embodiments, computing device 204 acquires a set of synthesized images from other computing devices. In some embodiments, computing device 204 needs to acquire multiple images first, and then perform data distillation on the multiple images to obtain a set of synthesized images. This method allows for the rapid and timely acquisition of synthesized images. In some embodiments, when performing data distillation on multiple images, the computing device needs to first acquire a capsule network model. Then, the capsule network model is applied to the multiple images to obtain a set of synthesized images. After training the capsule network model by inputting multiple images, the synthesized images can be generated from the capsule information in the capsule network model. This method allows for the rapid and accurate acquisition of synthesized images related to multiple images.
[0037] At box 404, the image quality of the acquired target image is determined based on a set of synthesized images. The computing device 204 processes the set of synthesized images and the target image to obtain the image quality of the target image, which is then used to determine how to process the target image.
[0038] In some embodiments, the computing device first determines the similarity between the acquired target image and each synthetic image in a set of synthetic images. In one example, the similarity between the target image i and a synthetic image j in a set of synthetic images is calculated using the following formula (1):
[0039] sim<i,j>=∑ I∈i,J∈j p I logp J (1)
[0040] Where P I P is the pixel value of pixel I in Figure i. J Let sim<i,j> be the pixel value of pixel J in image j. The similarity between the two images is determined using all pixel values of images i and j. In another example, the similarity sim<i,j> can also be the cosine similarity between the two images. The above examples are merely for describing this disclosure and are not intended to limit the specific scope of this disclosure. Those skilled in the art can use any suitable method to obtain the similarity.
[0041] Next, the computing device performs an additive operation on a set of similarities between the target image and a set of synthesized images. Then, the computing device determines the result of this operation as the image quality of the target image relative to the set of synthesized images. For example, the computing device determines the weights between the target image i and the synthesized image j using the following equation (2):
[0042] w i,j =sim<i,j> (2)
[0043] The target image i can then be determined relative to a set of synthesized images P using the following equation (3). set mass fraction
[0044]
[0045] The quality score obtained by the above formula can be used to measure the quality of the target image. In another example, the quality of the target image can also be represented by different quality levels. The above examples are merely for describing this disclosure and are not intended to limit the specific scope of this disclosure. Those skilled in the art can use any suitable method to determine the image quality of the target image relative to a set of synthesized images.
[0046] At box 406, the acquired target image is processed based on image quality. After obtaining the image quality of the target image, the computing device processes the target image according to the image quality.
[0047] In some embodiments, image quality is represented as a quality level. When processing an acquired target image, the computing device compares the quality level to a threshold level. If the quality level is determined to exceed the threshold level, the computing device retains the acquired target image and stores it in a storage pool as a sample that can be used to train a machine learning model. If the quality level is determined to be lower than or equal to the threshold level, the acquired target image is discarded. This method allows useful images to be added to the sample image set, reduces the number of useless sample images, and lowers resource usage.
[0048] In some embodiments, when providing sample images for model training, the computing device further processes the retained images. For example, the computing device determines the ranking of the acquired target images based on quality levels. This process ranks the acquired images to be retained. If data for training the model needs to be selected, the top-ranked images can be selected from the ranked images. For example, the image ranking is compared with a threshold ranking. If it is determined that the ranking is higher than the threshold ranking, the image corresponding to that ranking is determined to be available for online training of the machine learning model. For example, a training sample image set D is selected from the original sample image set and the ranked image pool. S ={x s ∈S, y u}, S∈XR , where y u X represents the original sample image set. R S represents a new set of sample images obtained by utilizing synthetic images, where S is the set of images obtained by X. R The set of images formed in x s The set S contains images, for example, a pool of top-ranked images selected from a ranked image pool. Alternatively or additionally, the acquired target images are used on a computing device to train a machine model online to reduce the loss value of the machine model. In this way, by utilizing the top-ranked images in the training model, the loss of the machine model is reduced and the accuracy is improved.
[0049] For example, the online learning dataset is D S ={x s , y}, which is used to train the machine model, where x s Let S be the set of images, for example, the top-ranked sample images selected, and y be the original set of sample images, such that the following loss is minimized:
[0050]
[0051] Where min represents minimizing, w represents the parameters of the trained model, and p newset For x s A new image set is formed from the sample images, where i represents P. newset One of the images, L i Let S be the loss value obtained from image i during model training. i Let i be the quality score of image i.
[0052] In some embodiments, when saving images, the computing device also stores the acquired target images and their corresponding quality levels according to ranking. This storage method ensures that the stored data is ordered, facilitating retrieval and searching.
[0053] This method improves the storage and management of image data, increases the effective utilization of data, and reduces resource consumption.
[0054] The above describes the use of a capsule network model to obtain a set of synthetic images. The following describes the training of the capsule network model. The capsule network model can be used to process the original sample image set to obtain a set of synthetic images. When using the capsule network model, a corresponding loss function can be set for training. The mutual information term shown in equation (5) is set in the loss function of the capsule network model to ensure that the synthetic image includes as much metadata as possible from the image samples:
[0055]
[0056] Where X is the original sample image set, Z is the synthetic image set, z is the synthetic image in the synthetic image set, and x is the sample image in the original sample image set. The feature distribution of the original sample image set and p(z|x) represents the probability that a synthetic image z is generated based on a sample image x. A good synthetic image z∈Z should satisfy p(z|x)=max p(z|x) I(X, Z), where max refers to taking the maximum value.
[0057] In some embodiments, computing device 110 uses a capsule network model to process the original sample image set or a subset thereof, such that the number of identical features included in the synthetic images corresponding to different classifications is below a predetermined threshold. In such embodiments, in order to enable the classification capsules or synthetic images to include relatively independent features, i.e., to include as few common features as possible between classification capsules, training can be performed using an orthogonal loss term set in the loss function as shown in equation (6):
[0058]
[0059] in<i,j> Let be the cosine similarity between samples i and j in the synthetic image set Z.
[0060] In some embodiments, the capsule network model can be trained using the loss function represented by the following equation (7):
[0061] L = L or (Z)-I(Z,Z) (7)
[0062] Where L or (Z) is obtained from formula (6), and I(X,Z) is obtained from formula (5).
[0063] In this way, it is possible to ensure that the synthesized image includes as much metadata as possible from the image samples, while also ensuring that the synthesized images include as few common features as possible.
[0064] Using the above method, after training a capsule neural network on a classification task using the original sample image set, the capsules in the training network are extracted, and these capsules can be visualized as synthetic images. For example, Figure 5Example 500 of synthesized images according to embodiments of the present disclosure is shown. Images 502, 504, 506, and 508 are visualizations of capsules extracted from a capsule neural network. In embodiments of the present disclosure, a corresponding soft label may also be provided for each synthesized image in a set of synthesized images. The soft label represents the probability that the synthesized image belongs to a plurality of sample images used to train the capsule network model. For example, the soft label under image 502 is [0,0.82,0,0,0,0,0,0.03,0.11,0,0.04], which represents the probability that the synthesized image is the original sample digit images 1-9. The process of determining the soft label will be described below in conjunction with... Figure 6 Let me describe it in detail.
[0065] Figure 6 The illustration shows an example of determining a label for a sample image according to an embodiment of the present disclosure. Figure 6 As shown, the original sample image training set includes N image samples. After training, classification capsules are extracted from the trained capsule network model to form a synthetic image set, and the feature matrix 604 of the synthetic image set is obtained simultaneously. The number of synthetic images in the synthetic image set is d, and each synthetic image is an m-dimensional feature vector. Therefore, the feature matrix 604 of the synthetic image set is d×m dimensional, where d and m are natural numbers greater than zero. Then, the feature matrix 604 of the synthetic image set is multiplied by an N×d correlation matrix 602 to obtain the image feature matrix 606 of the original sample image set, and the image feature matrix 606 is N×m. Each element in the correlation matrix 602 corresponds to the correlation between the synthetic image and the original sample images in the original sample image set.
[0066] To calculate the relevance matrix 602, it is initialized, for example, as an N×d identity matrix. Then, the feature matrix 604 of the synthesized image set is obtained. The original sample image set is then trained using a classification model, resulting in an N×m dimensional image feature matrix 606. The relevance matrix 602 is then derived from the image feature matrix 606 and the feature matrix 604 of the synthesized image set. The columns of the relevance matrix 602 are the relevance vectors 608 for the synthesized images. The relevance vectors 608 indicate the relevance of a synthesized image to each sample image, thus obtaining a soft label for each synthesized image.
[0067] Figure 7 A schematic block diagram of an example device 700 that can be used to implement embodiments of the present disclosure is shown. Figure 2The computing device 204 can be implemented using device 700. As shown, device 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes based on computer program instructions stored in read-only memory (ROM) 702 or loaded from storage unit 708 into random access memory (RAM) 703. RAM 703 can also store various programs and data required for the operation of device 700. CPU 701, ROM 702, and RAM 703 are interconnected via bus 704. Input / output (I / O) interface 705 is also connected to bus 704.
[0068] Multiple components in device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of monitors, speakers, etc.; storage page 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0069] The various processes and handling described above, such as method 400, can be executed by processing unit 701. For example, in some embodiments, method 400 can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by CPU 701, one or more actions of method 400 described above can be performed.
[0070] This disclosure can be a method, apparatus, system, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this disclosure.
[0071] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0072] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0073] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0074] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0075] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0076] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0077] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0078] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or technical improvements to the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for processing an image, comprising: A set of synthetic images is determined, wherein the synthetic images in the set of synthetic images are synthesized from images of the same type from multiple images, the set of synthetic images includes at least a first synthetic image generated from a first subset of the multiple images and a second synthetic image generated from a second subset of the multiple images that is different from the first synthetic image, each image in the first subset having a first classification, each image in the second subset having a second classification that is different from the first classification, wherein the first subset and the second subset of the multiple images are part of a sample image set; Based on the set of synthesized images, the image quality of the acquired target image is determined in order to control the addition of the acquired target image to the sample image set. The image quality is determined at least in part based on a similarity metric, which is calculated using the pixel values of the acquired target image and the pixel values of the corresponding synthesized images in the synthesized images. Processing the acquired target image based on the image quality, wherein processing the acquired target image based on the image quality further includes: controlling the inclusion of the acquired target image into the sample image set at least in part based on the image quality to provide an updated sample image set; as well as At least one machine learning model is trained using the updated sample image set.
2. The method of claim 1, wherein determining the set of synthesized images comprises: Acquire the multiple images; as well as Data distillation is performed on multiple images to obtain the set of synthetic images.
3. The method of claim 2, wherein data distillation of the plurality of images comprises: Obtain the capsule network model; as well as The set of synthesized images is obtained by applying the capsule network model to the multiple images.
4. The method of claim 1, wherein determining the image quality comprises: Determine the similarity between the acquired target image and each of the synthesized images in the set of synthesized images; Perform an addition operation on a set of similarities between the target image and the set of synthesized images; as well as The result of the operation is determined as the image quality of the target image relative to the set of synthesized images.
5. The method of claim 1, wherein the image quality is represented as a quality level; wherein processing the acquired target image includes: The quality level is compared with the threshold level; as well as If the quality level is determined to exceed the threshold level, the acquired target image is retained.
6. The method according to claim 5, wherein processing the acquired target image further comprises: If the quality level is determined to be lower than or equal to the threshold level, the acquired target image is discarded.
7. The method according to claim 5, further comprising: Based on the quality level, the ranking of the acquired target image is determined; Compare the ranking with the threshold ranking; as well as If the ranking is determined to be above a threshold ranking, then the acquired target image is determined to be usable for training the at least one machine learning model.
8. The method according to claim 7, further comprising: The acquired target image is used to train the at least one machine learning model online to reduce the loss value of the at least one machine learning model.
9. The method according to claim 7, further comprising: Based on the ranking, the acquired target image and its corresponding quality level are stored.
10. An electronic device, comprising: At least one processor; as well as A memory, coupled to the at least one processor and having instructions stored thereon, the instructions causing the device to perform actions when executed by the at least one processor, the actions including: A set of synthetic images is determined, wherein the synthetic images in the set of synthetic images are synthesized from images of the same type from multiple images, the set of synthetic images includes at least a first synthetic image generated from a first subset of the multiple images and a second synthetic image generated from a second subset of the multiple images that is different from the first synthetic image, each image in the first subset having a first classification, each image in the second subset having a second classification that is different from the first classification, wherein the first subset and the second subset of the multiple images are part of a sample image set; Based on the set of synthesized images, the image quality of the acquired target image is determined in order to control the addition of the acquired target image to the sample image set. The image quality is determined at least in part based on a similarity metric, which is calculated using the pixel values of the acquired target image and the pixel values of the corresponding synthesized images in the synthesized images. Processing the acquired target image based on the image quality, wherein processing the acquired target image based on the image quality further includes: controlling the inclusion of the acquired target image into the sample image set at least in part based on the image quality to provide an updated sample image set; and At least one machine learning model is trained using the updated sample image set.
11. The electronic device of claim 10, wherein determining the set of composite images comprises: Acquire the multiple images; as well as Data distillation is performed on multiple images to obtain the set of synthetic images.
12. The electronic device of claim 11, wherein data distillation of the plurality of images comprises: Obtain the capsule network model; as well as The set of synthesized images is obtained by applying the capsule network model to the multiple images.
13. The electronic device of claim 10, wherein determining the image quality comprises: Determine the similarity between the acquired target image and each of the synthesized images in the set of synthesized images; Perform an addition operation on a set of similarities between the target image and the set of synthesized images; as well as The result of the operation is determined as the image quality of the target image relative to the set of synthesized images.
14. The electronic device of claim 10, wherein the image quality is represented as a quality level; wherein processing the acquired target image includes: The quality level is compared with the threshold level; as well as If the quality level is determined to exceed the threshold level, the acquired target image is retained.
15. The electronic device of claim 14, wherein processing the acquired target image further comprises: If the quality level is determined to be lower than or equal to the threshold level, the acquired target image is discarded.
16. The electronic device according to claim 14, wherein the action further includes: Based on the quality level, the ranking of the acquired target image is determined; Compare the ranking with the threshold ranking; as well as If the ranking is determined to be above a threshold ranking, then the acquired target image is determined to be usable for training the at least one machine learning model.
17. The electronic device according to claim 16, further comprising: The acquired target image is used to train the at least one machine learning model online to reduce the loss value of the at least one machine learning model.
18. The electronic device according to claim 16, further comprising: Based on the ranking, the acquired target image and its corresponding quality level are stored.
19. A computer program product tangibly stored on a non-volatile computer-readable medium and comprising machine-executable instructions that, when executed, cause a machine to perform the steps of the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Artificial Intelligence-Based Sequencing
US20200302224A1
Image processing apparatus, image processing method, and storage medium
US20210398259A1
Generating stylized images in real time on mobile devices
US20220124257A1
