Method of image processing, computer system, electronic device, and program product
Patent Information
- Application Number
- CN202110441310.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-23
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2041-04-23
AI Technical Summary
在数据挖掘时,存储系统仅被视为数据容器,这阻止了存储系统深度参与AI工作流
[0009]根据本公开的第五方面,还提供了一种计算机程序产品,包括机器可执行指令,所述机器可执行指令在由设备执行时使所述设备执行如本公开的第一方面所述的方法。
Smart Images

Figure CN115331275B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of this disclosure relate to the field of computers, and more specifically, to image processing methods, computer systems, electronic devices, computer-readable storage media, and computer program products. Background Technology
[0002] Deep learning has revolutionized artificial intelligence (AI). It has solved many complex problems that have plagued the field of AI for years. Typically, deep neural network (DNN) models are trained on graphics processing units (GPUs) deployed on cloud servers, and then the trained DNN models can be used to support specific business applications, such as image recognition, speech processing, and text processing.
[0003] The development of deep learning algorithms has brought both opportunities and challenges to storage systems. Traditionally, storage systems have been used to store "data bytes" themselves, rather than the "data context," lacking a high-level understanding of the data. In data mining, storage systems are often treated merely as data containers, preventing their deep involvement in AI workflows. Therefore, a technology is needed to bridge the gap between storage systems and AI workflows. Summary of the Invention
[0004] This disclosure provides a lightweight AI solution implemented on a storage system to help generate AI applications.
[0005] According to a first aspect of this disclosure, an image processing method is provided, comprising: generating a feature extraction layer portion of an image classification model based on a deep neural network model; using the feature extraction layer portion to extract features from a set of images; training an output layer portion of the image classification model based on the features of training images in the set of images and the classification labels of the training images; and generating the image classification model by combining the feature extraction layer portion and the output layer portion.
[0006] According to a second aspect of this disclosure, a computer system is also provided, comprising: a feature extraction unit including at least a portion of a deep neural network model and configured to extract features from a set of images; and an image classification model generation unit configured to: train an output layer portion of an image classification model based on the features of training images in the set of images and the labels of the training images, and generate the image classification model by combining the at least a portion of the deep neural network model and the output layer portion of the trained image classification model.
[0007] According to a third aspect of this disclosure, an electronic device is also provided, comprising: at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the electronic device to perform the method according to a first aspect of this disclosure.
[0008] According to a fourth aspect of this disclosure, a computer-readable storage medium is also provided, including machine-executable instructions that, when executed by a device, cause the device to perform the method as described in the first aspect of this disclosure.
[0009] According to a fifth aspect of this disclosure, a computer program product is also provided, including machine-executable instructions that, when executed by a device, cause the device to perform the method as described in the first aspect of this disclosure.
[0010] In this way, the storage system is expanded to facilitate the generation of AI applications, help train image classification models faster, and the resulting image classification models can produce high accuracy on smaller training sets.
[0011] It should be understood that the summary 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
[0012] The above and other objects, features, and advantages of embodiments of the present disclosure will become more readily understood from the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of the present disclosure will be described by way of example and non-limitation, wherein:
[0013] Figure 1 This diagram illustrates a traditional framework for generating artificial intelligence applications using storage systems.
[0014] Figure 2 A schematic flowchart of an image processing method according to an embodiment of the present disclosure is shown;
[0015] Figure 3 A schematic diagram of a framework for generating artificial intelligence applications using a storage system according to embodiments of the present disclosure is shown;
[0016] Figure 4 The illustration shows a schematic diagram of generating a feature extraction layer from a deep neural network model according to an embodiment of the present disclosure;
[0017] Figure 5 A schematic block diagram of a computer system according to an embodiment of the present disclosure is shown; and
[0018] Figure 6 A schematic block diagram of an example device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation
[0019] The concept of this disclosure will now be described with reference to various exemplary embodiments shown in the accompanying drawings. It should be understood that these embodiments are described merely to enable those skilled in the art to better understand and further implement this disclosure, and are not intended to limit the scope of this disclosure in any way. It should be noted that similar or identical reference numerals may be used in the figures where feasible, and similar or identical reference numerals may denote similar or identical elements. Those skilled in the art will understand that alternative embodiments of the structures and / or methods described herein may be employed without departing from the principles and concept of this disclosure as described below.
[0020] In the context of this disclosure, the term "comprising" and its various variations may be understood as open-ended terms meaning "including but not limited to"; the term "based on" may be understood as "at least partially based on"; the term "one embodiment" may be understood as "at least one embodiment"; and the term "another embodiment" may be understood as "at least one other embodiment". Other terms that may appear but are not mentioned herein should not be interpreted or limited in a manner contrary to the concept on which the embodiments of this disclosure are based, unless expressly stated otherwise.
[0021] The basic principles and implementation of this disclosure are illustrated below with reference to the accompanying drawings. It should be understood that the exemplary embodiments given are merely intended to enable those skilled in the art to better understand and implement the embodiments of this disclosure, and are not intended to limit the scope of this disclosure in any way.
[0022] As mentioned above, traditionally, storage systems have only been used to store the "data bytes" themselves, not the "data context," lacking a high-level understanding of the data. With the increasing prevalence of AI applications, this has limited the development of storage systems. For example, to create specific AI tasks, such as facial recognition, large amounts of facial data stored in the storage system are used to train deep neural network models. These deep neural network models require a large amount of training data from the storage system, and significant computational resources and time are spent training them.
[0023] Figure 1A schematic diagram of a conventional framework 100 for generating artificial intelligence applications using a storage system is shown. Data in the storage system 110, after data preprocessing 112, is input into a deep neural network model (DNN) 122. The deep neural network model 122 is trained using parallel computing units, such as a graphics processing unit (GPU) 121, to generate the AI application 132. The AI application 132 can then be deployed to a server 130 in the cloud.
[0024] To generate a deep neural network model 122 for a specific task, a portion of data is selected from the storage system 110 and labeled manually or otherwise to form training data. The deep neural network model 122 iteratively adjusts its internal parameters using algorithms such as gradient descent, enabling the trained model to best fit the training data. Depending on the number of layers, nodes per layer, and connections between layers, the deep neural network model 122 may have millions or even hundreds of millions of parameters; therefore, training a deep neural network model from scratch for each specific task is very costly. Furthermore, it can be seen that the storage system 110 is only used as a data source in the process of generating the AI application 132, which limits the development of storage systems.
[0025] According to embodiments of this disclosure, a general-purpose deep neural network model can be trained on a large, comprehensive dataset, and then used as a feature extractor applicable to multiple specific tasks. This feature extractor can be deployed in a storage system to expand its capacity. The following example uses an image processing application. Figures 2 to 6 The technology provided in this disclosure is described.
[0026] Figure 2 A schematic flowchart of an image processing method 200 according to an embodiment of the present disclosure is shown. The image processing method 200 can be implemented in conjunction with a storage system storing various images for creating an image classification model for a specific task.
[0027] In box 210, a feature extraction layer portion of an image classification model is generated based on a deep neural network model. The image classification model can be used for specific tasks, such as image recognition within a certain range, like face recognition. According to embodiments of this disclosure, the deep neural network model can be a pre-trained ensemble deep neural network model. As an example only, the Inception-Resnet-V2 model can be trained on the CASIA-web-face dataset. The CASIA-web-face dataset is an approximately 4GB web face database containing face data applicable to face verification and recognition, including 494,000 images involving 10,500 individuals. The trained Inception-Resnet-V2 model has 55,873,736 model parameters and 572 layers. It should be understood that any other suitable deep neural network model can be used and trained on any ensemble database, and the image classification model is not limited to face recognition applications.
[0028] According to embodiments of this disclosure, a feature extractor can be separated from a pre-trained deep neural network model and incorporated into a storage system. References are made below. Figure 3 describe.
[0029] Figure 3 A schematic diagram of a framework 300 for generating artificial intelligence applications using a storage system according to an embodiment of the present disclosure is shown. As shown, the framework 300 generally includes a storage system 310, a deep neural network model 320, and a server 330 where the AI application is deployed. Compared to a conventional storage system 110, the storage system 310 also includes a portion of the deep neural network model, namely a feature extraction layer 314. The feature extraction layer 314 can be encapsulated as a separate module. From the perspective of the storage system 310, the encapsulated feature extraction layer 314 is regarded as a feature extractor or encoder 314 for extracting features from data such as images. Features can typically be vectors with several dimensions representing the context of the data, which are used in AI applications including deep neural network models to generate inferences about that data, such as face recognition.
[0030] In some embodiments, the deep neural network model 320 can be pre-trained from a comprehensive dataset 340, for example, the Inception-Resnet-V2 model trained on the CASIA-web-face dataset described above. In some application scenarios, it is necessary to classify some images in the storage device 311 of the storage system 310, and these images may not have been learned by any existing deep learning model. Therefore, it is necessary to generate corresponding image classification models for specific tasks. According to embodiments of this disclosure, a portion of the layers can be separated from the pre-trained deep neural network model 320 to be used as feature extraction layers for specific tasks, such as feature extraction layer 314. In some embodiments, the pre-trained deep neural network model 320 may have more classifications than the desired image classification model, thereby ensuring that its feature extraction layer 314 can extract richer context to guarantee the accuracy of the image classification model during inference.
[0031] Figure 4 A schematic diagram of generating a feature extraction layer from a deep neural network model according to an embodiment of the present disclosure is shown. Figure 4 The general structure of a deep neural network is illustrated only schematically; however, it should be understood that deep neural network models can have other structures. As shown, the deep neural network module 400 includes an input layer, one or more hidden layers, and an output layer. Each layer has a number of nodes, each node receiving the output of the node in the previous layer and producing the output to the node in the next layer. The output of each layer is considered a vector. Generally, the number of nodes in the input layer may correspond to the dimension of the vector input to the deep neural network model 400, and the number of nodes in the output layer may correspond to the dimension of the output vector, for example, the number of classifications for a specific task. The output vector of the output layer can be used, after normalization, to indicate the probability of the input vector's classification. According to embodiments of this disclosure, some or all of the layers preceding the output layer may be considered as a feature extraction layer 410. The output layer following the feature extraction layer produces a classification result based on the output vector of the feature extraction layer.
[0032] In some embodiments, a feature extraction layer 410 is generated based on a portion of a pre-trained deep neural network model and deployed in the storage system 310 as a feature extractor or encoder 314. In some embodiments, the output vector of the feature extractor 314 may be a 512-dimensional vector representing the input image. The feature extractor 314 can be used to process images in the storage device 311 of the storage system 310 to generate corresponding features.
[0033] Back Figure 2In box 220, the feature extraction layer is used to extract features from a set of images. In some embodiments, the storage system 310 may use the feature extractor 314 to extract features from the image data in the storage device 311 when new image data is received, in response to a request, or periodically. The feature extractor 314 generates features in different ways depending on the request type. For example, for a request for a single instance, the feature extractor 314 is invoked immediately to return the feature vector of the requested image; for requests for small batches of instances, the feature extractor 314 can be invoked via a streaming framework; for requests for large datasets, the feature extractor 314 can be invoked offline by a large-scale distributed system such as Hadoop / Spark. In other words, image features can be updated with different timeliness and efficiency.
[0034] Specifically, such as Figure 3 As shown, the raw images from storage device 311, after data preprocessing 312, are sent to feature extractor 314. Feature extraction layer 314, deployed in storage system 310, can generate features from these raw image data. In some embodiments, the features can be stored in storage device 311 of storage system 310. Thus, when training an image classification model for a specific task, the features of the training images can be directly accessed from storage device 311, skipping the original feature extraction operation.
[0035] It should be understood that since the parameters of the feature extraction layer are far more than those of the output layer, keeping the parameters of the feature extraction layer of the image classification model unchanged and training only the parameters of the output layer can greatly save computational resources.
[0036] Furthermore, extracting features from an image using the feature extractor 314 in the storage system 310 is a computationally resource-intensive part of the deep neural network model. In this case, it would be beneficial for the storage system 310 to include high-performance computing units, such as the parallel computing unit 313 of a GPU.
[0037] return Figure 2 In box 230, the output layer of the image classification model is trained based on the features and classification labels of the training images in a set of images. This output layer is then added to the feature extraction layer of a pre-trained deep neural network model to form the image classification model. The output layer can be a relatively simple model, such as SoftMax, Support Vector Machine, or Logistic Regression.
[0038] Then, the parameters of the output layer of the image classification model are adjusted based on the features and labels of the training images in the set of images. As described above, the features of the training images can be pre-extracted and stored in the storage device 311 of the storage system 310. In some embodiments, the features of the training images can be obtained by accessing the stored features of the training images. Alternatively, if the storage device 311 does not store the features of the training images, the features can be extracted in real time using a feature extraction layer.
[0039] The feature extraction layer of the image classification model can be obtained directly from the feature extractor 314 of the storage system 310, for example, by copying. In some embodiments, the parameters of the feature extraction layer of the image classification model can be kept unchanged during training, thereby improving the speed of training the image classification model. According to embodiments of this disclosure, the computational resources required to train the output layer 324 are far less than those required to train the entire image classification model. Therefore, even a general-purpose processor 324, such as a CPU, can be used to execute the training process, but a parallel processor such as a GPU can also be used.
[0040] In box 240, an image classification model is generated by combining the feature extraction layer and the output layer. After the output layer of the image classification model is trained, the feature extractor deployed in storage system 310 can be used as the feature extraction layer and combined with the output layer to form a complete image classification model, thus ending the training process. The image classification model is then deployed as an AI application on server 330 for classification inference.
[0041] In some embodiments, after the output layer 324 is trained, the image classification model 320 can be fine-tuned. Specifically, unlike training the parameters of the output layer 324 while keeping the parameters of the feature extraction layer unchanged, the parameters of the feature extraction layer and the output layer can be adjusted simultaneously during the fine-tuning process. In some embodiments, the image classification model can be fine-tuned using the original data of the training images and the classification labels of the training images. In this case, a parallel computing unit 313, such as a graphics processing unit (GPU), is introduced into the storage system 310 to perform training on the complete image classification model. This staged training approach, i.e., training the output layer 324 first and then adjusting the parameters of the feature extraction layer 314, is generally faster than directly training the complete image classification model 320 and can better fit the training data.
[0042] Based on the above description, the embodiments of this disclosure implement a lightweight AI solution on a storage system. The expanded storage system facilitates the generation of AI applications, helps train image classification models more quickly, and the resulting image classification models can produce high accuracy even on a small training set.
[0043] Figure 5 A schematic block diagram of a computer system 500 according to an embodiment of the present disclosure is shown. As shown, the computer system 500 includes a feature extraction unit 510, an image classification model generation unit 520, and an image feature storage unit 530.
[0044] Feature extraction unit 510 includes a portion of deep neural network model 320 for extracting features from a set of images. In some embodiments, feature extraction unit 510 may be based on deep neural network model 320, for example, by packaging a portion of pre-trained deep neural network model 320, such as feature extraction layer 314. Here, feature extraction layer 314 refers to the portion remaining after removing its output layer 324 from deep neural network model 320. Furthermore, deep neural network model 320 may be a pre-trained model trained on comprehensive dataset 340, such as the Inception-Resnet-V2 trained on the CASIA-web-face dataset mentioned above, but is not limited thereto. Feature extraction unit 510 may be included or deployed in storage system 310. Thus, feature extraction unit 510 can extract features from stored images by accessing storage device 311 of storage system 310. Alternatively, feature extraction unit 510 may also extract features from received images when storage system 310 receives external images.
[0045] The image classification model generation unit 520 is used to train the output layer portion 324 of an image classification model related to a specific task based on the features of the images extracted by the feature extraction unit 510 and the labels of the training images. In some embodiments, a portion of the images stored in the storage device 311 can be used to train the image classification model related to a specific task, and these images are labeled manually or otherwise. In this case, the features of these extracted training images and their labels can be used to train the output layer portion 324 of the image classification model 320. It should be understood that since the features of the images have already been extracted or generated, the feature extraction layer of the image classification model can be bypassed, and only the output layer 324 can be trained. In some embodiments, the output layer portion 324 has fewer nodes than the trained deep neural network model. In other words, the pre-trained deep neural network model 320 has more categories than the image classification model, therefore, its feature extraction layer can ensure the extraction of richer context to guarantee the accuracy of the image classification model during inference.
[0046] The image classification model generation unit 520 generates the image classification model based on at least a portion of a deep neural network model and the output layer portion of a trained image classification model. The feature extraction layer 324 constituting the feature extraction unit 510 is combined with the trained output layer 314 to form the trained image classification model. The resulting image classification model can be deployed to the server 330 as an AI application.
[0047] The computer system 500 also includes an image feature storage unit 530. The image feature storage unit 530 stores the features of the image extracted by the feature extraction unit 510. Therefore, the feature extraction unit 510 can operate offline. For example, when the storage system 310 is not busy, or in response to a request for a large dataset, the feature extraction unit 510 extracts and stores the image features offline for later direct access. Therefore, when an image classification model needs to be generated, the image classification model generation unit 520 obtains the required image features by accessing the image feature storage unit 530.
[0048] Optionally, after the output layer of the image classification model is trained, the image model generation unit 520 can further fine-tune the image classification model using the training images and their classification labels. At this point, a portion of the pre-trained deep neural network model contained in the feature extractor 314 can be copied from the feature extraction unit 510 and combined with the trained output layer portion 324, and then the combined image classification model can be trained. As mentioned above, this training process requires more computational resources; therefore, parallel computing units such as graphics processing units (GPUs) are deployed in the storage system 310. The image classification model generation unit 520 uses the GPU to adjust the parameters of the feature extraction layer portion 314 and the output layer portion 324 of the image classification model. Here, the extracted features from the training images are not used; instead, the raw data of the training images is used for training.
[0049] Figure 6 A schematic block diagram of an example device 600 that can be used to implement embodiments of the present disclosure is shown. For example, both the image processing method and the computer system according to embodiments of the present disclosure can be implemented by device 600. As shown, device 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) 602 or loaded from storage unit 608 into random access memory (RAM) 603. Various programs and data required for the operation of device 600 may also be stored in RAM 603. CPU 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0050] Multiple components in device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of monitors, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0051] The various processes and handling described above, such as method 200, can be executed by processing unit 601. For example, in some embodiments, method 200 can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by CPU 601, one or more actions of method 200 described above can be performed.
[0052] 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.
[0053] 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 thereof. 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 thereof. 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.
[0054] 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.
[0055] 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.
[0056] 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.
[0057] 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.
[0058] 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.
[0059] 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.
[0060] Various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they 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 improvements to the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. An image processing method, comprising: A first deep neural network model is trained by a system including a processor to perform image classification for a group of images, wherein the first deep neural network model includes a feature extraction layer portion and a first output layer portion, and wherein the feature extraction layer portion includes only an input layer and one or more hidden layers, without including any output layer of the first deep neural network model; The system extracts the feature extraction layer portion from the first deep neural network model; The system incorporates the feature extraction layer as an executable module into the system's storage device; The system uses the feature extraction layer portion of the storage device to extract corresponding features of an image stored in the storage device, including: In response to a new image instance being stored in the storage device, the feature extraction layer portion in the storage device is invoked to return a feature vector for the new image instance; In response to a request for a single image instance, the feature extraction layer portion in the storage device is immediately invoked to return the requested feature vector for the single image instance; In response to a request for a mini-batch of image instances, the feature extraction layer portion in the storage device is invoked via a streaming framework to return the requested feature vector for the mini-batch of image instances; and In response to a request for a large dataset of image instances, the feature extraction layer portion in the storage device is invoked offline via a large-scale distributed system to return the requested feature vector for the large dataset of image instances. The system stores the corresponding features of the image in the storage device; The system retrieves the corresponding features of the training images in the images from the storage device, wherein the training images are associated with a subgroup of the group of images for classification; The system trains a second output layer portion based on the corresponding features of the training images and according to the classification labels of the training images, for image classification of the subgroups of the group, wherein training the second output layer portion does not include training the feature extraction layer portion; and The system generates a second deep neural network model by combining the feature extraction layer portion and the second output layer portion for image classification of the subgroup of the group.
2. The method of claim 1, wherein the first deep neural network model is trained using a subset of the images.
3. The method according to claim 1, further comprising: The system receives new images; as well as The system uses the second deep neural network model to classify the new image.
4. The method according to claim 1, further comprising: The system receives additional training images; as well as The system uses the feature extraction layer to extract the corresponding features from the additional training images. The training of the second output layer includes further training the second output layer based on the corresponding features of the additional training images.
5. The method according to claim 1, further comprising: The system adjusts the feature extraction layer and the second output layer of the second deep neural network model based on the training images and the classification labels of the training images.
6. The method of claim 5, wherein adjusting the feature extraction layer portion and the output layer portion of the second deep neural network model comprises: The second deep neural network model is trained using the raw data of the training images and the classification labels.
7. An image processing system, comprising: At least one storage device; At least one processing unit; as well as At least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the at least one processing unit comprising: An image classification model generation unit is configured to: train a first deep neural network model for image classification of groups of images, wherein the first deep neural network model includes a feature extraction layer portion and a first output layer portion, and wherein the feature extraction layer portion includes an input layer and one or more hidden layers, but does not include any output layer of the first deep neural network model; and The feature extraction unit is configured as follows: Extract the feature extraction layer portion from the first deep neural network model; The feature extraction layer is incorporated as an executable module into at least one storage device of the system; The corresponding features of the image stored in the at least one storage device are extracted using the feature extraction layer portion of the at least one storage device in the following manner: In response to a new image instance being stored in the storage device, the feature extraction layer portion in the storage device is invoked to return a feature vector for the new image instance; In response to a request for a single image instance, the feature extraction layer portion in the storage device is immediately invoked to return the requested feature vector for the single image instance; In response to a request for a mini-batch of image instances, the feature extraction layer portion in the storage device is invoked via a streaming framework to return the requested feature vector for the mini-batch of image instances; and In response to a request for a large dataset of image instances, the feature extraction layer portion in the storage device is invoked offline via a large-scale distributed system to return the requested feature vector for the large dataset of image instances. The corresponding features of the image are stored in the at least one storage device; The image classification model generation unit is further configured to: Retrieve the corresponding features of the training images in the image from the at least one storage device, wherein the training images are associated with a subgroup of the group of images for classification; Based on the corresponding features of the training images and according to the classification labels of the training images, a second output layer is trained to classify the subgroups of the group of images, wherein training the second output layer does not include training the feature extraction layer; and A second deep neural network model is generated by combining the feature extraction layer portion and the second output layer portion for image classification of the subgroup of the group of images.
8. The system of claim 7, wherein the first deep neural network model is trained using a subset of the images.
9. The system according to claim 7, wherein the image classification model generation unit is further configured to: Receive new images; and The new image is classified using the second deep neural network model.
10. The system according to claim 7, wherein the image classification model generation unit is further configured to: Receive additional training images; and The feature extraction layer is used to extract the corresponding features from the additional training images; and The second output layer portion is further trained based on the corresponding features of the additional training images.
11. The system of claim 7, wherein the image classification model generation unit is further configured to further adjust the feature extraction layer portion and the second output layer portion of the second deep neural network model based on the training image and the classification label of the training image.
12. The system of claim 11, wherein the image classification model generation unit is further configured to train the second deep neural network model using the raw data of the training images and the classification labels.
13. The system of claim 11 or 12, wherein the image classification model generation unit is further configured to adjust the feature extraction layer portion and the output layer portion of the second deep neural network model by using at least one graphics processing unit.
14. An electronic device comprising: At least one processing unit; as well as At least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the electronic device to perform the method according to any one of claims 1 to 6.
15. A computer-readable storage medium comprising machine-executable instructions that, when executed by a device, cause the device to perform the method according to any one of claims 1 to 6.
16. A computer program product comprising machine-executable instructions that, when executed by a device, cause the device to perform the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Electronic apparatus and method of operating the same
CN110168530A