Image processing device, method, medium and system
By collecting and expanding sample images through a method based on image feature similarity, the robustness and accuracy of the image classification model are improved, the problem of dependence on manual annotation in the existing technology is solved, and efficient sample image collection and model training are achieved.
Patent Information
- Application Number
- CN201911136231.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-19
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2039-11-19
AI Technical Summary
In the existing technology, the sample image collection of image classification models relies on manual annotation, resulting in high labor and time costs, and it is difficult to effectively improve the robustness and accuracy of the feature extraction model.
By using the feature extraction model building module, similarity calculation module and sample image selection module, based on the similarity calculation of image features, a third group of images is selected and collected to expand the feature extraction model and improve the robustness and accuracy of the model. and reduce the cost of sample collection.
It significantly improves the robustness and accuracy of the feature extraction model, improves the efficiency of sample image collection, reduces the collection cost of negative and positive sample images, and enhances the robustness and accuracy of the target category classification model.
Smart Images

Figure CN112906724B
Abstract
Description
Technical Field
[0001] One or more embodiments of the present application generally relate to the field of artificial intelligence, and specifically relate to an image processing device, method, medium and system based on artificial intelligence. Background Art
[0002] In recent years, deep learning technology has been widely used in the field of computer vision, especially in the field of image classification. A trained image classification model can assign predefined labels to input images. Among them, the more representative image classification model is the ImageNet classification model trained based on the ImageNet dataset, which can classify images in 1,000 categories.
[0003] The sample images used to train classification models are usually manually annotated images, where images belonging to the target category are called positive sample images, and images not belonging to the target category are called negative sample images. However, in the prior art, the collection of sample images mostly relies on manual annotation, which has high manpower and time costs. Summary of the invention
[0004] The embodiments of the present application provide an image processing device, method, medium and system. The present application is introduced from multiple aspects below, and the implementation methods and beneficial effects of the following multiple aspects can be referenced to each other.
[0005] In a first aspect, an embodiment of the present application provides an image processing device, which may include a feature extraction model building module, which can be used to obtain a feature extraction model using a first group of images; a feature extraction module, which can be used to extract features of a second group of images using the feature extraction model; a similarity calculation module, which can be used to obtain the similarity between the features of the first group of images and the features of the second group of images; and a sample image selection module, which can be used to select a third group of images from the second group of images, wherein the similarity between the features of the third group of images and the features of the first group of images is within a first predetermined range; wherein the feature extraction model building module can also be used to train the feature extraction model based on the third group of images.
[0006] According to an embodiment of the present application, using the collected third group of images, such as sample images, to retrain the feature extraction model can further improve the robustness and accuracy of the feature extraction model, and can also further improve the accuracy of the selected third group of images, thereby improving the efficiency of sample collection.
[0007] In some embodiments, the first set of images may be included in the second set of images. For example, the sample seed images may be derived from unlabeled images.
[0008] In some embodiments, since the third group of images is collected based on similarities between features of the images, the number of features of the third group of images may be greater than the number of features of the first group of images.
[0009] According to an embodiment of the present application, the third group of images can expand the first group of images in terms of the number of images and the number of features. Therefore, using such a third group of images to retrain the feature extraction model can significantly improve the robustness and accuracy of the feature extraction model.
[0010] In some embodiments, the feature extraction module may also be used to extract features of the first set of images using a feature extraction model, for example, when the first set of images is not derived from the second set of images.
[0011] In some embodiments, the similarity calculation module is also used to obtain the similarity between the features of the first group of images and the features of the second group of images, which may include: for each layer of the feature extraction model, calculating the similarity between the feature vector of the features of the first group of images and the feature vector of the features of the second group of images.
[0012] In some embodiments, the similarity calculation module calculates the similarity between the feature vectors of the features of the first group of images and the feature vectors of the features of the second group of images, which may include: calculating the similarity between the feature vectors of the features of the first group of images and the feature vectors of the features of the second group of images by cosine distance and / or EMD distance (Earth Mover's Distance).
[0013] In some embodiments, the first predetermined range may be [0.9, 1], in which case the first group of images may be included in the second group of images.
[0014] In some embodiments, the first group of images and the third group of images include negative sample images, which are images that do not belong to the target category.
[0015] The negative sample images collected according to the embodiments of the present application can improve the robustness and accuracy of the target category classification model.
[0016] In some embodiments, the first group of images and the third group of images include positive sample images, which are images belonging to the target category.
[0017] In some embodiments, the feature extraction model building module uses the first group of images to obtain the feature extraction model, which may include: calculating the similarity between the first group of images and the ImageNet training image set; when the similarity between the first group of images and the ImageNet training image set is within a second predetermined range, using the ImageNet training image set to obtain the feature extraction model; when the similarity between the first group of images and the ImageNet training image set is not within the second predetermined range, using the first group of images to obtain the feature extraction model.
[0018] According to an embodiment of the present application, when the similarity between the first group of images and the ImageNet training image set is high, a feature extraction model can be directly obtained based on the ImageNet model trained by the ImageNet training image set, thereby reducing the complexity of establishing the feature extraction model.
[0019] In a second aspect, the present application provides an image processing method, which may include: obtaining a feature extraction model using a first group of images; extracting features of a second group of images using the feature extraction model; obtaining the similarity between the features of the first group of images and the features of the second group of images, and selecting a third group of images from the second group of images, wherein the similarity between the features of the third group of images and the features of the first group of images is within a first predetermined range; and training the feature extraction model based on the third group of images.
[0020] According to an embodiment of the present application, using the collected third group of images, such as sample images, to retrain the feature extraction model can further improve the robustness and accuracy of the feature extraction model, and can also further improve the accuracy of the selected third group of images, thereby improving the efficiency of sample collection.
[0021] In some embodiments, the first set of images may be included in the second set of images. For example, the sample seed images may be derived from unlabeled images.
[0022] In some embodiments, since the third group of images is collected based on similarities between features of the images, the number of features of the third group of images may be greater than the number of features of the first group of images.
[0023] According to an embodiment of the present application, the third group of images can expand the first group of images in terms of the number of images and the number of features. Therefore, using such a third group of images to retrain the feature extraction model can significantly improve the robustness and accuracy of the feature extraction model.
[0024] In some embodiments, the method further comprises extracting features of the first set of images using a feature extraction model, for example, when the first set of images is not derived from the second set of images.
[0025] In some embodiments, the following is repeated until a predetermined number of times: extracting features of a first group of images and features of a second group of images using a feature extraction model; obtaining the similarity between the features of the first group of images and the features of the second group of images, and selecting a third group of images from the second group of images, wherein the similarity between the features of the third group of images and the features of the first group of images is within a predetermined range; and training the feature extraction model based on the third group of images.
[0026] According to an embodiment of the present application, iteratively collecting the third group of images and retraining the feature extraction model using the third group of images can greatly improve the robustness and accuracy of the feature extraction model.
[0027] In some embodiments, obtaining the similarity between features of the first group of images and features of the second group of images may include: for each layer of the feature extraction model, calculating the similarity between feature vectors of features of the first group of images and feature vectors of features of the second group of images.
[0028] In some embodiments, calculating the similarity between the feature vectors of the features of the first group of images and the feature vectors of the features of the second group of images may include: calculating the similarity between the feature vectors of the features of the first group of images and the feature vectors of the features of the second group of images by cosine distance and / or EMD distance.
[0029] In some embodiments, the first predetermined range may be [0.9, 1], in which case the first group of images may be included in the second group of images.
[0030] In some embodiments, the first group of images and the third group of images may include negative sample images, where the negative sample images are images that do not belong to the target category.
[0031] The negative sample images collected according to the embodiments of the present application can improve the robustness and accuracy of the target category classification model.
[0032] In some embodiments, the first group of images and the third group of images may include positive sample images, which are images belonging to the target category.
[0033] In some embodiments, obtaining a feature extraction model using the first group of images may include: calculating the similarity between the first group of images and the ImageNet training image set; obtaining the feature extraction model using the ImageNet training image set when the similarity between the first group of images and the ImageNet training image set is within a second predetermined range; and obtaining the feature extraction model using the first group of images when the similarity between the first group of images and the ImageNet training image set is not within the second predetermined range.
[0034] According to an embodiment of the present application, when the similarity between the first group of images and the ImageNet training image set is high, a feature extraction model can be directly obtained based on the ImageNet model trained by the ImageNet training image set, thereby reducing the complexity of establishing the feature extraction model.
[0035] In a third aspect, an embodiment of the present application also provides an image processing method, which includes: using a first group of images to obtain a feature extraction model, wherein the first group of images includes negative sample images, which are images that do not belong to the target category; and using the feature extraction model to extract features of the second group of images.
[0036] According to an embodiment of the present application, features of a second group of images (e.g., unlabeled images) can be extracted by a feature extraction model based on negative sample images, so as to collect images with features similar to those of the negative sample images in the second group of images. Compared with the manual collection of negative sample images in the prior art, the efficiency of collecting negative sample images can be improved, while the cost of collecting negative sample images can also be reduced.
[0037] In some embodiments, the method also includes: extracting features of the first group of images using a feature extraction model; obtaining the similarity between the features of the first group of images and the features of the second group of images, and selecting a third group of images from the second group of images, wherein the similarity between the features of the third group of images and the features of the first group of images is within a first predetermined range; and training the feature extraction model based on the third group of images.
[0038] According to an embodiment of the present application, using the collected third group of images, such as negative sample images, to retrain the feature extraction model can further improve the robustness and accuracy of the feature extraction model, and can also further improve the accuracy of the selected third group of images, thereby improving the efficiency of sample collection.
[0039] Furthermore, the negative sample images collected according to the embodiments of the present application can improve the robustness and accuracy of the target category classification model.
[0040] In a fourth aspect, an embodiment of the present application further provides a system, which includes: a processor; a memory, in which instructions are stored, and when the instructions are executed by the processor, the processor executes any one of the above methods.
[0041] In a fifth aspect, an embodiment of the present application further provides a machine-readable medium, in which instructions are stored. When the instructions are executed by a machine, the machine executes any one of the above methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 An example of an application scenario of sample image collection according to an embodiment of the present application is shown;
[0043] Figure 2 A schematic diagram of the structure of a sample image collection device according to an embodiment of the present application is shown;
[0044] Figures 3A-3C Schematic diagrams of an unlabeled image, a sample seed image, and a sample image according to an embodiment of the present application are respectively shown;
[0045] Figure 4 A schematic diagram of the structure of a convolutional neural network according to an embodiment of the present application is shown;
[0046] Figure 5 A schematic diagram of a process of collecting negative sample images according to an embodiment of the present application is shown;
[0047] Figure 6 A schematic diagram of the process of collecting positive sample images according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0048] The present application is further described below in conjunction with specific embodiments and drawings. It is understood that the illustrative embodiments of the present application include but are not limited to image devices, methods, media, and systems, and the specific embodiments described herein are only for the purpose of explaining the present application, rather than limiting the present application. In addition, for ease of description, only some, but not all, structures or processes related to the present application are shown in the drawings.
[0049] The following specific embodiments illustrate the implementation of the present application, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Although the description of the present application will be introduced in conjunction with the preferred embodiment, this does not mean that the features of this invention are limited to this implementation. On the contrary, the purpose of introducing the invention in conjunction with the implementation is to cover other options or modifications that may extend based on the claims of the present application. In order to provide a deep understanding of the present application, the following description will include many specific details. The present application can also be implemented without using these details. In addition, in order to avoid confusion or blurring the focus of the present application, some specific details will be omitted in the description. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0050] Furthermore, various operations will be described as multiple discrete operations in a manner that is most helpful for understanding the illustrative embodiments; however, the order of description should not be construed as implying that these operations are necessarily order dependent. In particular, these operations do not need to be performed in the order presented.
[0051] Unless the context dictates otherwise, the terms "comprising," "having," and "including" are synonymous. The phrase "A / B" means "A or B." The phrase "A and / or B" means "(A and B) or (A or B)."
[0052] As used herein, the term "module" or "unit" may refer to, be or include: an application specific integrated circuit (ASIC), an electronic circuit, a (shared, dedicated or group) processor and / or memory that executes one or more software or firmware programs, a combinational logic circuit and / or other suitable components that provide the described functionality.
[0053] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or by other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information through the Internet via electrical, optical, acoustic, or other forms of propagation signals (e.g., carrier waves, infrared signals, digital signals, etc.). Therefore, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.
[0054] In the accompanying drawings, some structural or method features are shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. In some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a specific figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
[0055] It should be understood that although the terms "first", "second", etc. may be used here to describe various units or data, these units or data should not be limited by these terms. These terms are used only to distinguish one feature from another. For example, without departing from the scope of the exemplary embodiment, a first feature may be referred to as a second feature, and similarly, a second feature may be referred to as a first feature.
[0056] It should be noted that in this specification, similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0057] The embodiments of the present application can be used in, but not limited to, the fields of computer vision and artificial intelligence.
[0058] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0059] Figure 1 An example of an application scenario for sample image collection according to an embodiment of the present application, i.e., a block diagram of a sample image collection system 100 is shown. The system 100 may be, but is not limited to, a portable or mobile device, a mobile phone, a tablet computer, a television, a personal digital assistant, a laptop, a desktop, a handheld PC, a server, a network device, a graphics device, a video game device, a set-top box, a cellular phone, a portable media player, a handheld device, a wearable device (e.g., display glasses or goggles, a head-mounted display, a watch, a head-mounted device, an armband, jewelry, etc.), a virtual reality and / or augmented reality device, an Internet of Things device, an industrial control device, an in-vehicle infotainment device, a streaming client device, an e-book, a reading device, a POS machine, and other electronic devices. In general, a plurality of devices and electronic devices that can contain the processor and / or other execution logic disclosed in the present application are generally suitable. As Figure 1 As shown, the system 100 may include one or more processors 110, coprocessors 120, controller hubs 130, memories 140, and input / output (I / O) devices 150, wherein the processors 110, coprocessors 120, memories 140, and I / O devices 150 are coupled to the controller hub 130. In some embodiments, the controller hub 803 includes, but is not limited to, a graphics memory controller hub (GMCH) (not shown) and an input / output hub (IOH) (not shown), wherein the GMCH includes a memory and a graphics controller and is coupled to the IOH. Alternatively, one or both of the memory 140 and the GMCH may be integrated into the processor 110, the memory 140 and the coprocessor 120 are directly coupled to the processor 110, and the controller hub 130 and the IOH are in a single chip.
[0060] In some embodiments, the processor 110 may include a dedicated processor, a microprocessor, a digital signal processor, etc., and / or any combination thereof. In some embodiments, the processor 110 may be a single-core processor, a multi-core processor, etc., and / or any combination thereof.
[0061] In some embodiments, processor 110 executes instructions that control general types of data processing operations. Coprocessor instructions may be embedded in these instructions. Processor 110 recognizes these coprocessor instructions as being of a type that should be executed by an attached coprocessor 120. Accordingly, processor 110 issues these coprocessor instructions (or control signals representing coprocessor instructions) to coprocessor 120 on a coprocessor bus or other interconnect. Coprocessor 120 accepts and executes the received coprocessor instructions. The optional nature of coprocessor 120 is indicated by dashed lines in FIG. Figure 1 middle.
[0062] In some embodiments, coprocessor 120 is a special purpose processor such as, for example, a high throughput MIC processor, a network or communication processor, a compression engine, a graphics processor, a GPGPU, or an embedded processor, among others.
[0063] In some embodiments, the controller hub 130 may include an integrated graphics accelerator. For at least one embodiment, the controller hub 130 communicates with the processor 110 via a multi-drop bus such as a front-side bus (FSB), a point-to-point interface such as a QuickPath Interconnect (QPI), or a similar connection 160.
[0064] The memory 140 may include an operating system (OS) 143, image processing instructions 142, and an image set 141. According to some embodiments of the present application, the image set 141 may include a plurality of images from which sample images are to be collected, for example Figure 2 The unlabeled image 10 in the image set 141 may also include images used as a sample image collection benchmark, such as Figure 2 The image set 141 may also include other types of images. According to some embodiments of the present application, the image processing instruction 142 may be executed by the processor 110 and / or the coprocessor 120 to execute the sample image collection method for the image set 141. The operating system 143 is used to support the execution of the image processing instruction 142. The operating system 143 may include but is not limited to LINUX, Android, Microsoft Windows, iOS, Mac OS, Hong Kong, etc. wait.
[0065] The memory 140 may include one or more tangible, non-transitory computer-readable media. The memory 140 may include, but is not limited to, a non-transitory tangible arrangement of items manufactured or formed by a machine or device, including storage media such as a hard disk or any other type of disk, including a floppy disk, an optical disk, a compact disk read-only memory (CD-ROM), a compact disk rewritable (CD-RW), and a magneto-optical disk; semiconductor devices such as read-only memory (ROM), random access memory (RAM) such as dynamic random access memory (DRAM) and static random access memory (SRAM), erasable programmable read-only memory (EPROM), flash memory, electrically erasable programmable read-only memory (EEPROM); phase change memory (PCM); magnetic or optical cards; or any other type of medium suitable for storing electronic instructions.
[0066] It should be noted that Figure 1 The architecture of the sample image collection system 100 shown may have other variations, for example, but not limited to, the functions of the processor 110 and / or the coprocessor 120 may also be implemented by an application-specific integrated circuit (ASIC), an electronic circuit, a field-programmable gate array (FPGA), a combinational logic circuit and / or other suitable components that provide the described functions.
[0067] Figure 2 The schematic diagram of the structure of the sample image collection device 200 according to the embodiment of the present application is shown. The sample image collection device 200 is used to collect images similar to the sample seed image 20 from the unlabeled images 10 as sample images 30 according to the sample seed image 20. The unlabeled images 10 are a collection of multiple images including multiple categories but not yet assigned category labels. Figure 3A An example of an unlabeled image 10 is shown, Figure 3A As shown, the unlabeled images 10 may include images of categories such as cats, dogs, birds, bridges, etc., and Figure 3A Each image in has not yet been assigned a category label. It should be noted that Figure 3A This is only an example of the unlabeled image 10, and the unlabeled image 10 may include images of other categories. In addition, according to some embodiments of the present application, the unlabeled image may be an image from a camera device, an image processing device, or an image collected from the Internet, and the source of the unlabeled image is not limited.
[0068] The sample seed image 20 is a collection of multiple images of annotated types, such as negative sample seed images that are different from the target category or positive sample seed images that are consistent with the target category. Since the number of images of the sample seed image 20 is limited, it is referred to as a seed image here. According to some embodiments of the present application, in the case where the sample seed image 20 includes a negative sample seed image, the sample seed image 20 can be obtained by classifying the unlabeled image 10 using a target category classification model to obtain a target category image, and selecting from the target category images images that are incorrectly classified by the target category classification model and do not belong to the target category. In the case where the sample seed image 20 includes a positive sample seed image, the sample seed image 20 can be obtained by a known target category sample image, for example, a target category sample image used to train a target category classification model. According to other embodiments of the present application, the sample seed image 20 may be obtained through other sources, for example, the sample seed image 20 may include an image selected from the ImageNet image collection, or an image assigned a category label by other means, wherein, in some cases, ImageNet is a large visual database used for visual object recognition software research, which is like a network with multiple nodes, each node is equivalent to a subcategory, and a node contains at least 500 corresponding objects for training images. It is actually a huge image library available for image / visual training. Figure 3B An example of a sample seed image 20 is shown, Figure 3B As shown, the sample seed image 20 is derived from the unlabeled image 10, which may include images of cats and dogs, and Figure 3B Each image in has been assigned a corresponding category label. It should be noted that Figure 3B This is only an example of the sample seed image 20. The sample seed image 20 may be obtained from other sources and may also include images of other categories. In addition, according to some embodiments of the present application, the sample seed image 20 may be a small number of images.
[0069] like Figure 3B As shown, according to a specific embodiment, the sample seed image 20 may be a negative sample seed image 21 or a positive sample seed image 22. With respect to the target category classification model to be trained, the image belonging to the target category is called the positive sample seed image 22, and the image not belonging to the target category is called the negative sample seed image 21. Figure 3B In , if the target category classification model is used to identify dog images, then the positive sample seed image 22 may include dog images, and the negative sample seed image 21 may include cat images. It should be noted that Figure 3BThis is only one example of the negative sample seed image 21 and the positive sample seed image 22 , and the negative sample seed image 21 and the positive sample seed image 22 may include images of other categories.
[0070] Figure 3C An example of a sample image 30 is shown, Figure 3C As shown, the sample images 30 include images of cats and dogs to which category labels have been assigned. Figure 3A In the unlabeled image 10, Figure 3B The sample seed images of cats and dogs are similar to 20 images. It should be noted that Figure 3C This is only one example of the sample image 30 , and the sample image 30 may include images of other categories.
[0071] According to some embodiments of the present application, Figure 3C As shown, the sample image 30 may include a negative sample image 31 and a positive sample image 32. If the sample seed image 20 is a positive sample seed image 22, then the final sample image 30 will be a positive sample image 32 belonging to the target category of the target category classification model. If the sample seed image 20 is a negative sample seed image 21, then the final sample image 30 will be a negative sample image 31 that does not belong to the target category of the target category classification model. For example, Figure 3C In the example, if the target category classification model is used to identify dog images, then the positive sample image 32 is an image belonging to the dog class, and the negative sample image 31 is an image belonging to the cat class.
[0072] Back to Figure 2 ,like Figure 2 As shown, the sample image collection device 200 includes a feature extraction model building module 210, a feature extraction module 220, a similarity calculation module 230, and a sample image selection module 240. One or more modules of the sample image collection device 200 may be composed of an application-specific integrated circuit (ASIC), an electronic circuit, a (shared, dedicated or group) processor and / or memory that executes one or more software or firmware programs, a combinational logic circuit, and / or other suitable components that provide the described functions.
[0073] The feature extraction model building module 210 is used to build a feature extraction model, which can extract features of the input image. The feature extraction model can be obtained, for example, but not limited to, based on a convolutional neural network, a deep belief network, or other types of neural networks with a feature extraction layer.
[0074] Figure 4 A structural diagram of a convolutional neural network is shown, Figure 4As shown, the convolutional neural network may include an input layer 410, a convolutional layer 420, a pooling layer 430, a fully connected layer 440 and a classification layer 450, wherein the input layer 410 may perform preprocessing such as de-averaging and normalization on the input image and other data, and output the result to the convolutional layer 420; the convolutional layer 420 may perform feature extraction on the output data of the input layer, and output the result to the pooling layer 430; the pooling layer 430 may perform feature selection and information filtering on the output data of the convolutional layer, and output the result to the next convolutional layer 420, and the last pooling layer 430 outputs the result to the fully connected layer 440; the fully connected layer 440 may integrate all features in the output data of the pooling layer 430, and output the result to the next fully connected layer 440 or the classification layer 450; the classification layer 450 classifies the input image according to the output data of the fully connected layer 440, and outputs data such as the classification result, such as the probability that the input image belongs to each target category. In the case where the feature extraction model is obtained based on a convolutional neural network, the feature extraction model may be composed of one or more layers of the convolutional neural network, for example, the feature extraction model may be composed of the convolutional layer 420 of the convolutional neural network, or may be composed of the convolutional layer 420 and the fully connected layer 440 of the convolutional neural network, or may be composed of the fully connected layer 440 of the convolutional neural network. It should be noted that the feature extraction model may be obtained based on other types of neural networks having feature extraction layers according to similar principles.
[0075] According to some embodiments of the present application, the feature extraction model establishing module 210 can establish a feature extraction model based on the sample seed image 20. For example, the feature extraction model establishing module 210 can establish a positive sample feature extraction model based on the positive sample seed image 22, or can establish a negative sample feature extraction model based on the negative sample seed image 21.
[0076] The feature extraction module 220 is used to input the image into the feature extraction model established by the feature extraction model establishment module 210 to obtain the features of the input image, for example, the feature vectors of the input image at each layer of the feature extraction model. In the case where the sample seed image 20 is derived from the unlabeled image 10, the input image of the feature extraction model can be the unlabeled image 10. In the case where the sample seed image 20 is not derived from the unlabeled image 10, the input image of the feature extraction model can be the unlabeled image 10 and the sample seed image 20.
[0077] The similarity calculation module 230 is used to obtain the similarity between the features of the unlabeled image 10 and the features of the sample seed image 20. According to some embodiments of the present application, the similarity between the features of the unlabeled image 10 and the features of the sample seed image 20 refers to the similarity between the unlabeled image 10 and the sample seed image 20 corresponding to the category.
[0078] According to some embodiments of the present application, the similarity calculation module 230 can calculate the similarity between the feature vector of the unlabeled image 10 and the feature vector of the sample seed image 20 at each layer of the feature extraction model. According to some embodiments of the present application, the similarity calculation module 230 can characterize the similarity between the feature vector of the unlabeled image 10 and the feature vector of the sample seed image 20 by calculating the distance between the feature vector of the unlabeled image 10 and the feature vector of the sample seed image 20 at each layer of the feature extraction model. The distance includes, but is not limited to, cosine distance, EMD distance (Earth Mover's Distance), Euclidean distance, Manhattan distance, distance learned by metric learning, or other distance. The calculation method of the cosine distance is illustrated here, and other algorithms are not repeated. The cosine distance characterizes the similarity between two vectors by calculating the cosine value of the angle between the inner product space of the two vectors, which can be expressed by the following formula 1:
[0079] sim layerk = cosine(fv ki ,fv kj ) Formula 1
[0080] Among them, i and j represent two different images; k represents the kth layer of the feature extraction model; fv ki represents the feature vector of image i at the kth layer; fv kj represents the feature vector of image j at the kth layer; sim layerk Represents the similarity between the feature vectors of the two images on the kth layer.
[0081] According to some embodiments of the present application, the similarity calculation module 230 may calculate the similarity between the features of the unlabeled image 10 and the features of the sample seed image 20 based on the similarity between the feature vector of the unlabeled image 10 and the feature vector of the sample seed image 20 at each layer of the feature extraction model, for example, by a linear regression algorithm or other algorithms. The linear regression algorithm may be expressed by the following formula 2:
[0082]
[0083] Wherein, m represents the number of layers contained in the feature extraction model, and m is a positive integer; k represents the kth layer of the feature extraction model, and k = 1, ..., m; sim layerk is the similarity between the feature vectors of two images at the kth layer, calculated, for example, by Formula 1; k For sim layerkCorresponding weights; similarity indicates the similarity between the two images; it belongs to the interval [0, 1], the larger the value, the more similar it is, and the similarity of the same image is 1. The sample image selection module 240 is used to select sample images 30 from the unlabeled images 10. According to some embodiments of the present application, for each category of the sample seed image 20, the sample image selection module 240 selects images whose similarity with the features of one or more sample seed images 20 in each category from the unlabeled image 10 is within a predetermined range as sample images 30 of each category. According to some embodiments of the present application, the sample image 30 selected by the sample image selection module 240 may include the sample seed image 20, or may not include the sample seed image 20. According to some embodiments of the present application, the predetermined range may be, but is not limited to, [0.9, 1] or [0.9, 1).
[0084] According to some embodiments of the present application, for a category of sample seed images 20, the similarity calculation module 230 and the sample image selection module 240 can traverse all unlabeled images 10 to select sample images 30 belonging to the category, or can also traverse part of the unlabeled images 10 to select sample images 30 belonging to the category, for example, when the number of sample images 30 has met the requirements, or when some unlabeled images 10 have been selected as sample images 30 of other categories.
[0085] like Figure 2 As shown, according to some embodiments of the present application, the sample image 30 selected by the sample image selection module 240 can further optimize the feature extraction model established by the feature extraction model establishment module 210, and then the optimized feature extraction model can also be used to obtain the sample image 30. The iterative optimization process can be performed, for example, but not limited to, 3 times, so that the accuracy of sample image collection can be further improved. In addition, as Figure 2 As shown, after the iterative optimization process is completed, the sample image 30 can be output for training the target category classification model, or for other applications that require a large number of rich labeled images.
[0086] In the following, the functions of the various components of the sample image collection device 200 will be further introduced through the collection of negative sample images 31 and the collection of positive sample images 32 .
[0087] 1. Collection of negative sample images 31
[0088] The feature extraction model building module 210 can build a negative sample feature extraction model according to the negative sample seed image 21. According to some embodiments of the present application, the negative sample seed image 21 can be obtained by:
[0089] 1) Use a set of labeled positive sample images to train the target category classification model, for example, Figure 4 Convolutional neural networks in .
[0090] According to some embodiments of the present application, the labeled positive sample image set may include images selected from the ImageNet image set, or may include positive sample images 32 collected through some embodiments of the present application, or may also be images manually selected and labeled from unlabeled images 10, and the source of the labeled positive sample image set is not specifically limited. According to some embodiments of the present application, the labeled positive sample images may include images of one or more categories, such as but not limited to images of dogs.
[0091] According to some embodiments of the present application, a back propagation algorithm (BP), Newton gradient descent algorithm or other algorithms can be used to train the target category classification model, wherein in the back propagation algorithm, the input information is input into the neural network model, if the expected output value is not obtained in the output layer, the objective function is determined based on the error between the output value and the expected value, and the parameters of each layer of the neural network are corrected in turn according to the objective function, and in the Newton gradient descent algorithm, the gradient descent method is used to iterate step by step to finally obtain the parameter values of each layer of the neural network that make the objective function have the minimum value. However, since the target category classification model is not trained using negative sample images, the robustness and accuracy of the target category classification model at this time need to be improved.
[0092] 2) Use the target category classification model to classify a large number of unlabeled images10.
[0093] According to some embodiments of the present application, the probability that each unlabeled image 10 belongs to each target category can be output, or the maximum probability among the probabilities that each unlabeled image 10 belongs to each target category and the target category corresponding to the maximum probability can be output.
[0094] 3) For each target category, an image whose probability of belonging to the target category is within a threshold range can be selected from the unlabeled images 10.
[0095] According to some embodiments of the present application, the threshold interval may be a probability interval where the target category classification model is prone to misclassification (i.e., a certain unlabeled image 10 does not actually belong to a certain target category, but the probability output by the target classification model that the unlabeled image 10 belongs to the target category is greater than a predetermined value, such as 0.8 or other predetermined values), such as a probability interval [0.8, 0.9], or other probability intervals. For example, in the case where the target category is dog, the threshold interval may be [0.8, 0.9]. Figure 3AFrom the unlabeled images 10 shown in FIG. 1 , images whose probability of belonging to the dog class is in the interval [0.8, 0.9] are selected.
[0096] 4) Manually select images that do not belong to the target category from the selected unlabeled images 10. For example, when the target category is dog, images that do not belong to the dog category, such as cat images, can be selected from the selected unlabeled images 10 whose probability of belonging to the dog category is in the interval [0.8, 0.9]. These images can be assigned category labels manually, by clustering algorithms or other methods and can be used as negative sample seed images 21, for example Figure 3B The negative sample seed image 21 including the image of the cat class is shown in FIG. Since the negative sample seed image 21 is substantially similar to the positive sample image, the negative sample seed image 21 determined according to the embodiment of the present application can more effectively optimize the target image training model.
[0097] According to other embodiments of the present application, a small number of images may be directly selected and annotated from the unannotated images 10 manually as negative sample seed images 21, or the negative sample seed images 21 may be obtained from other sources or in other ways.
[0098] In order to establish a negative sample feature extraction model, the feature extraction model building module 210 can obtain the similarity between the set of negative sample seed images 21 and the ImageNet training image set. According to some embodiments of the present application, for each category of the negative sample seed image 21, the feature extraction model building module 210 can select a negative sample seed image 21 from the category, select an ImageNet image from the images of the category in the ImageNet training image set, use a feature extraction algorithm (for example, LBP (Local Binary Pattern), Haar algorithm, etc.) to obtain the feature vectors of the two images, calculate the distance between the feature vectors of the two images, for example, cosine distance, EMD distance, Euclidean distance, distance learned by metric learning, or other distances, to obtain the similarity between the feature vectors of the two images, which can characterize the similarity between the two images, and can also characterize the similarity between the negative sample seed image 21 of the category and the image of the category in the ImageNet training image set. According to other embodiments of the present application, for each category of the negative sample seed image 21, the feature extraction model building module 210 can calculate the similarity between multiple negative sample seed images 21 in the category and multiple images in the category of the ImageNet training image set, and use the average of the calculated similarities as the similarity between the negative sample seed image 21 of the category and the image of the category of the ImageNet training image set. Finally, the feature extraction model building module 210 characterizes the similarity between the set of negative sample seed images 21 and the ImageNet training image set based on the average, maximum, minimum or other statistical values of the similarities calculated for each category of the negative sample seed image 21.
[0099] The feature extraction model building module 210 is also used to determine whether the similarity between the set of negative sample seed images 21 and the ImageNet training image set is within a predetermined range, for example, [0.9, 1] or other ranges. In the case where the similarity between the set of negative sample seed images 21 and the ImageNet training image set is within a predetermined range, the feature extraction model building module 210 can obtain a negative sample feature extraction model based on the ImageNet model trained by the ImageNet training image set to reduce the complexity of establishing the negative sample feature extraction model. According to some embodiments of the present application, when the ImageNet model is Figure 4In the case of the convolutional neural network shown, the ImageNet model may include P convolutional layers 420 and Q fully connected layers 440 (where P and Q are positive integers), and the feature extraction model building module 210 may select M (M is a positive integer) layers from the ImageNet model to form a negative sample feature extraction model. For the input image of the ImageNet model, the output vectors on these M layers will be used as feature vectors on the M layers of the negative sample feature extraction model. According to some embodiments of the present application, these M layers may all be convolutional layers 420, or may include convolutional layers 420 and fully connected layers 440, or may all be fully connected layers 440.
[0100] When the similarity between the set of negative sample seed images 21 and the ImageNet training image set is not within a predetermined range, the feature extraction model building module 210 can use the set of negative sample seed images 21, for example, based on the back propagation algorithm, Newton gradient descent algorithm or other algorithms, to train a new neural network, such as a convolutional neural network, and then obtain a negative sample feature extraction model based on the above principles.
[0101] The feature extraction module 220 inputs the image to be feature extracted (e.g., the unlabeled image 10, or the unlabeled image 10 and the negative sample seed image 21) into the negative sample feature extraction model to obtain the feature vectors on the M layers of the negative sample feature extraction model. Figure 3B The negative sample seed image 21 shown in FIG. 2 includes an image of a cat. The feature vectors on the M layers of the negative sample feature extraction model can be associated with features such as the eyes, nose, and ears of a cat.
[0102] For a category of negative sample seed images 21 and an unlabeled image 10, the similarity calculation module 230 can respectively calculate the similarity between the features of the unlabeled image 10 and the features of at least one negative sample seed image 21 in the category. Specifically, for each of the M layers of the negative sample feature extraction model, the similarity calculation module 230 can calculate the distance between the feature vectors of an unlabeled image 10 and a negative sample seed image 21 on the layer, for example, cosine distance, EMD distance, Euclidean distance, distance learned by metric learning, or other distances, to characterize the similarity between the features of the two images on the layer; then, a linear regression algorithm or a logistic regression algorithm is used to calculate the similarity between the features of the two images based on the similarity between the features of the two images on each layer.
[0103] For a category of negative sample seed images 21 and an unlabeled image 10, the sample image selection module 240 can determine whether the mean, maximum value, minimum value or other statistical value of the similarity between the features of the unlabeled image 10 and the features of at least one negative sample seed image 21 in the category is within a predetermined range. If so, the sample image selection module 240 selects the unlabeled image 10 as the negative sample image 31 of the category. According to some embodiments of the present application, the negative sample image 31 selected by the sample image selection module 240 may include or may not include the negative sample seed image 21. According to some embodiments of the present application, the predetermined range may be, but is not limited to, [0.9, 1] or [0.9, 1). It should be noted that the predetermined range may be the same as or different from the predetermined range for determining the similarity between the set of negative sample seed images 21 and the ImageNet training image set.
[0104] For example, for Figure 3B The negative sample seed image 21 including the image of the cat class shown in FIG. 2 can be selected from the sample image selection module 240 Figure 3A The unlabeled images 10 shown in FIG. 1 are selected to select cat images with features similar to the eyes, nose, ears, color, etc. of the cat in the negative sample seed image 21. Therefore, according to the embodiment of the present application, the negative sample seed image 21 can be expanded in two dimensions, namely, the number of images and the number of image features, and the negative sample images 31 can be collected based on the similarity between the features of the images, which can greatly improve the accuracy.
[0105] It should be noted that, when calculating the similarity between the negative sample seed image 21 and the ImageNet training image, in addition to the feature extraction algorithm, the negative sample seed image 21 and the ImageNet training image can also be first input into a pre-trained convolutional neural network (a convolutional neural network trained with a large number of categories of large-scale images, for example, a convolutional neural network trained with Google's JFT Dataset) in a manner similar to calculating the similarity between the negative sample seed image 21 and the unlabeled image, and the output vectors of one or more specified layers (for example, convolutional layers and / or fully connected layers) in the convolutional neural network are used as feature vectors of the negative sample seed image 21 and the ImageNet training image, and then the similarity between the feature vectors of the negative sample seed image 21 and the ImageNet training image is calculated at the specified layers to obtain the similarity between the feature vectors of the negative sample seed image 21 and the ImageNet training image.
[0106] According to some embodiments of the present application, the feature extraction model building module 210 can use the negative sample images 31 collected by the sample image selection module 240 to retrain the negative sample feature extraction model. According to some embodiments of the present application, the feature extraction model building module 210 can train the convolutional neural network by, for example, a back propagation algorithm, a Newton gradient descent algorithm or other algorithms, and then obtain the negative sample feature extraction model based on the above principles. Since the negative sample image 31 expands the number of features and the number of images of the negative sample seed image 21, the robustness and accuracy of the negative sample feature extraction model retrained by the negative sample image 31 will be higher. Similarly, the features of the unlabeled image 10 and the negative sample seed image 21 are extracted by the retrained negative sample feature extraction model, and the accuracy of the negative sample image 31 selected from the unlabeled image 10 by the similarity calculation module 230 and the sample image selection module 240 will be further improved. According to an embodiment of the present application, the negative sample image 31 is collected by the sample image collection device 200, and the negative sample feature extraction model is optimized using the negative sample image 31. This process can be repeated a predetermined number of times, for example, but not limited to, 3 times.
[0107] According to an embodiment of the present application, the negative sample images 31 selected from the unlabeled images 10 according to the negative sample seed images 21 may be labeled with category labels corresponding to the categories of the negative sample seed images 21 .
[0108] According to some other embodiments of the present application, the negative sample feature extraction model that has been iteratively trained has good robustness and accuracy, so the image similar to the negative sample seed image 21 can also be selected by the classification probability of the classification model. Specifically, the feature extraction module 220 can input the unlabeled image 10 into the negative sample feature extraction model to obtain the features of the unlabeled image 10, and the similarity calculation module 230 can use a classification model, such as an SVM classification model, a Tensorflow classification model, or other classification models, based on the features of the unlabeled image 10 and the features of the negative sample seed image 21, to obtain the probability that each unlabeled image 10 belongs to each category of the negative sample seed image 21, or obtain the maximum probability of each unlabeled image 10 belonging to each category of the negative sample seed image 21, and the category of the negative sample seed image 21 corresponding to the maximum probability, and then for each category of the negative sample seed image 21, the sample image selection module 240 can sort the unlabeled images 10 according to the probability of belonging to the category, and select the images in the top N positions of the probability sorting as the negative sample images 31 of the category, where N is a positive integer.
[0109] According to some embodiments of the present application, the collected negative sample images 31 can be used to optimize the training target category classification model, or can be used together with the negative sample seed images 21 to train a new image classification model, for example, Figure 4 The convolutional neural network shown in , or for other applications that require a large number of richly labeled images.
[0110] In an embodiment of the present application, a large number of negative sample images 31 can be collected from a large number of unlabeled images 10 based on a small number of negative sample seed images 21, which greatly improves the efficiency of collecting negative sample images 31 and reduces the cost of collecting negative sample images 31.
[0111] Furthermore, based on the similarity between the features of the images, images similar to the negative sample seed image 21 are collected from the unlabeled images as negative sample images 31. Compared with directly using a convolutional neural network trained based on a small number of negative sample seed images 21 to classify the unlabeled images 10, the accuracy of the collection can be greatly improved, thereby improving the efficiency of negative sample collection.
[0112] Furthermore, retraining the negative sample feature extraction model using negative sample images 31 whose number of images and features is greater than that of the negative sample seed image 21 can further improve the robustness and accuracy of the negative sample feature extraction model, and can also further improve the accuracy of the selected negative sample images 31, thereby improving the negative sample collection efficiency.
[0113] 2. Collection of 32 positive sample images
[0114] The feature extraction model building module 210 can build a positive sample feature extraction model based on the positive sample seed image 22. According to some embodiments of the present application, the positive sample seed image 22 can be a labeled image, which can be an image selected from the ImageNet image collection, or a small number of images selected and labeled manually from the unlabeled image 10 or other image sources. The source of the positive sample seed image 22 is not specifically limited here. According to some embodiments of the present application, the positive sample seed image 22 may include one or more categories of images, such as Figure 3B As shown, the positive sample seed image 22 may include an image of a dog.
[0115] In order to establish a positive sample feature extraction model, the feature extraction model establishment module 210 can use the positive sample seed image 22 to train the neural network, for example, based on the back propagation algorithm, the Newton gradient descent algorithm or other algorithms to train, and then obtain the positive sample feature extraction model based on the trained neural network. Figure 4In the case of the convolutional neural network shown in FIG. 1 , the acquisition of the positive sample feature extraction model can refer to the corresponding description of the negative sample feature extraction model above, which will not be repeated here. The feature extraction module 220 inputs the image to be feature extracted (for example, the unlabeled image 10, or the unlabeled image 10 and the positive sample seed image 22) into the positive sample feature extraction model to obtain the feature vectors output by the M layers of the positive sample feature extraction model. For example, for Figure 3B The positive sample seed image 22 shown in FIG. 1 includes an image of a dog. The feature vectors output by the M layers of the positive sample feature extraction model can be associated with the dog's eyes, nose, ears, color features, etc.
[0116] For a category of a positive sample seed image 22 and an unlabeled image 10, the similarity calculation module 230 can respectively calculate the similarity between the features of the unlabeled image 10 and the features of at least one positive sample seed image 22 in the category. Specifically, reference can be made to the corresponding description of the negative sample seed image 21 above, which will not be repeated here.
[0117] For a category of positive sample seed images 22 and an unlabeled image 10, the sample image selection module 240 can determine whether the mean, maximum value, minimum value or other statistical value of the similarity between the features of the unlabeled image 10 and the features of at least one positive sample seed image 22 in the category is within a predetermined range. If so, the sample image selection module 240 selects the unlabeled image 10 as the positive sample image 32 of the category. According to some embodiments of the present application, the above-mentioned predetermined range can be, for example, but not limited to, [0.9, 1] or [0.9, 1).
[0118] For example, for Figure 3B The sample image selection module 240 can select the positive sample seed image 22 including the dog image. Figure 3A The unlabeled images 10 in the image are selected to select dog images with similar features such as eyes, nose, ears, and color to the dog in the positive sample seed image 22. Therefore, according to the embodiment of the present application, the positive sample seed image 22 can be expanded in two dimensions, namely, the number of images and the number of image features, and the positive sample images 32 can be collected based on the similarity between the features of the images, which can greatly improve the accuracy.
[0119] Optionally, the feature extraction model building module 210 can use the positive sample images 32 collected by the sample image selection module 240 to retrain the positive sample feature extraction model. For details, please refer to the corresponding description of the negative sample image 31 above, which will not be repeated here. Since the positive sample image 32 expands the number of features and the number of images of the positive sample seed image 22, the robustness and accuracy of the positive sample feature extraction model retrained with the positive sample image 32 will be higher. Similarly, the features of the unlabeled image 10 and the positive sample seed image 22 are extracted by the retrained positive sample feature extraction model, and the accuracy of the positive sample image 32 selected from the unlabeled image 10 by the similarity calculation module 230 and the sample image selection module 240 will be further improved. According to an embodiment of the present application, the positive sample image 32 is collected by the sample image collection device 200, and the positive sample feature extraction model is retrained using the positive sample image 32. This process can be repeated a predetermined number of times, for example, but not limited to, 3 times.
[0120] According to an embodiment of the present application, the positive sample image 32 selected from the unlabeled image 10 according to the positive sample seed image 22 may be labeled with category labels corresponding to the categories of the positive sample seed image 22 .
[0121] According to some other embodiments of the present application, the positive sample feature extraction model that has been iteratively trained already has good robustness and accuracy, so it is also possible to select images similar to the positive sample seed image 22 through the classification probability of the classification model. Specifically, the corresponding description of the negative sample image 31 can be referred to above, and no further description is given here. According to some embodiments of the present application, the collected positive sample images 32 can be used to optimize the training target category classification model, or can be used together with the positive sample seed image 22 to train a new image classification model, for example, Figure 4 The convolutional neural network model shown in , or for other applications that require a large number of richly labeled images.
[0122] In an embodiment of the present application, a large number of positive sample images 32 can be collected from a large number of unlabeled images 10 based on a small number of positive sample seed images 22, which greatly improves the efficiency of collecting positive sample images 32 and reduces the cost of collecting positive sample images 32.
[0123] Furthermore, based on the similarity between the features of the images, images similar to the positive sample seed image 22 are collected from the unlabeled images as positive sample images 32. Compared with directly using a convolutional neural network trained based on a small number of positive sample seed images 22 to classify the unlabeled images, the accuracy of the collection can be greatly improved, thereby improving the efficiency of positive sample collection.
[0124] Furthermore, retraining the positive sample feature extraction model using positive sample images 32 whose number of images and features is greater than the positive sample seed image 22 can further improve the robustness and accuracy of the positive sample feature extraction model, and can also further improve the accuracy of the selected positive sample images 32, thereby improving the efficiency of positive sample collection.
[0125] Figure 5 is a schematic flow chart showing a method 500 for collecting negative sample images 31 according to an embodiment of the present application, Figure 2 Different components of the sample image collection device 200 in can implement different blocks or other parts of the method 300. For the content not described in the above device embodiment, please refer to the following method embodiment. Similarly, for the content not described in the method embodiment, please refer to the above device embodiment. In block 502, the target category classification model is trained using a set of labeled positive sample images. According to some embodiments of the present application, the set of labeled positive sample images may include images selected from the ImageNet image set, and may also include positive sample images 32 collected through some embodiments of the present application, or may also be images manually selected and labeled from unlabeled images 10. The source of the set of labeled positive sample images is not specifically limited here. According to some embodiments of the present application, the labeled positive sample images may include images of one or more categories, such as but not limited to images of dogs.
[0126] According to some embodiments of the present application, a back propagation algorithm, a Newton gradient descent algorithm or other algorithms may be used to train a target category classification model, for example, Figure 4 However, since no negative sample images are used to train the target category classification model, the robustness and accuracy of the target category classification model at this time need to be improved.
[0127] In block 504, the target category classification model is used to classify the unlabeled image 10. According to some embodiments of the present application, the probability that each unlabeled image 10 belongs to each target category can be output, or the maximum probability among the probabilities that each unlabeled image 10 belongs to each target category and the target category corresponding to the maximum probability can be output.
[0128] In block 506 , for each target category, images whose probability of belonging to the target category is within a threshold range may be selected from the unlabeled images 10 .
[0129] According to some embodiments of the present application, the threshold interval may be a probability interval where the target category classification model is prone to classification errors (i.e., a certain unlabeled image 10 does not actually belong to a certain target category, but the probability output by the target classification model that the unlabeled image 10 belongs to the target category is greater than a predetermined value, such as 0.8 or other predetermined values), such as a probability interval [0.8, 0.9], or other probability intervals. For example, in the case where the target category is dog, the threshold interval may be [0.8, 0.9]. Figure 3A From the unlabeled images 10 shown in FIG. 1 , images whose probability of belonging to the dog class is in the interval [0.8, 0.9] are selected.
[0130] In block 508, a negative sample seed image 21 is determined from the selected unlabeled images. According to some embodiments of the present application, images that do not belong to the target category can be manually selected from the selected unlabeled images 10. For example, when the target category is dog, images that do not belong to the dog category, such as cat images, can be selected from the images in the unlabeled images 10 whose probability of belonging to the dog category is in the interval [0.8, 0.9]. After these images are assigned category labels manually, by clustering algorithms or other methods, they can be used as negative sample seed images 21, such as Figure 3B The negative sample seed image 21 including the image of the cat class is shown in FIG. Since the negative sample seed image 21 is substantially similar to the positive sample image, the negative sample seed image 21 determined according to the embodiment of the present application can more effectively optimize the target image training model.
[0131] It should be noted that, although through blocks 502 to 508, images that are incorrectly classified by the target category classification model are selected from the unlabeled images 10 classified by the target category classification model as negative sample seed images 21, a small number of images can also be directly selected and labeled from the unlabeled images 10 manually as negative sample seed images 21, or the negative sample seed images 21 can be obtained through other sources and other methods.
[0132] In block 510 , the similarity between the set of negative sample seed images 21 and the ImageNet training image set is obtained through the feature extraction model building module 210 .
[0133] According to some embodiments of the present application, for each category of the negative sample seed image 21, the feature extraction model building module 210 can select a negative sample seed image 21 from the category, select an ImageNet image from the images of the category in the ImageNet training image set, and use a feature extraction algorithm (for example, LBP (Local Binary Pattern), Haar algorithm, etc.) to obtain the feature vectors of the two images, and calculate the distance between the feature vectors of the two images, for example, cosine distance, EMD distance, Euclidean distance, distance learned through metric learning, or other distances, to obtain the similarity between the feature vectors of the two images, which can characterize the similarity between the two images, and can also characterize the similarity between the negative sample seed image 21 of the category and the image of the category in the ImageNet training image set. According to other embodiments of the present application, for each category of the negative sample seed image 21, the feature extraction model building module 210 can calculate the similarity between multiple negative sample seed images 21 in the category and multiple images in the category of the ImageNet training image set, and use the average of the calculated similarities as the similarity between the negative sample seed image 21 of the category and the image of the category of the ImageNet training image set. Finally, the feature extraction model building module 210 characterizes the similarity between the set of negative sample seed images 21 and the ImageNet training image set based on the average, maximum, minimum or other statistical values of the similarities calculated for each category of the negative sample seed image 21.
[0134] In block 512, the feature extraction model building module 210 determines whether the similarity between the set of negative sample seed images 21 and the ImageNet training image set is within a predetermined range, for example, [0.9, 1] or other ranges. If yes, block 314 is executed, and if no, block 316 is executed.
[0135] In block 514, the feature extraction model building module 210 obtains a negative sample feature extraction model based on the ImageNet model trained by the ImageNet training image set to reduce the complexity of establishing the negative sample feature extraction model. According to some embodiments of the present application, when the ImageNet model is Figure 4In the case of the convolutional neural network shown, the ImageNet model may include P convolutional layers 420 and Q fully connected layers 440 (where P and Q are positive integers), and the feature extraction model building module 210 may select M (M is a positive integer) layers from the ImageNet model to form a negative sample feature extraction model. For the input image of the ImageNet model, the output vectors on these M layers will be used as feature vectors on the M layers of the negative sample feature extraction model. According to some embodiments of the present application, these M layers may all be convolutional layers 420, or may include convolutional layers 420 and fully connected layers 440, or may all be fully connected layers 440.
[0136] In block 516, a new neural network, such as a convolutional neural network, is trained by using a set of negative sample seed images 21 through a feature extraction model building module 21, for example, based on a back-propagation algorithm, a Newton gradient descent algorithm or other algorithms, and then a negative sample feature extraction model is obtained based on the above principles.
[0137] In block 518, the unlabeled image 10 and the negative sample seed image 21 are input into the negative sample feature extraction model through the feature extraction module 220 to obtain the features of the unlabeled image 10 and the negative sample seed image 21. According to other embodiments of the present application, in the case where the negative sample seed image 21 is derived from the unlabeled image 10, the unlabeled image 10 can be input into the negative sample feature extraction model to obtain the features of the unlabeled image 10 (including the negative sample seed image 21).
[0138] According to some embodiments of the present application, the features of the unlabeled image 10 and the features of the negative sample seed image 21 may be feature vectors on M layers of the negative sample feature extraction model. Figure 3B The negative sample seed image 21 shown in FIG. 2 includes an image of a cat. The feature vectors on the M layers of the negative sample feature extraction model can be associated with features such as the eyes, nose, and ears of a cat.
[0139] In block 520 , the similarity between the features of the unlabeled image 10 and the features of the negative sample seed image 21 is obtained through the similarity calculation module 230 , and the image similar to the negative sample seed image 21 is selected from the unlabeled image 10 as the negative sample image 31 through the sample image selection module 240 .
[0140] According to some embodiments of the present application, the similarity between the features of the unlabeled image 10 and the features of the negative sample seed image 21 refers to the similarity between the unlabeled image 10 and the negative sample seed image 21 of the corresponding category. According to some embodiments of the present application, the similarity calculation module 230 can characterize the similarity between the two by calculating the distance between the feature vector of the unlabeled image 10 and the feature vector of the sample seed image 20 at each layer of the negative sample feature extraction model. The distance is, for example but not limited to, cosine distance, EMD distance, Euclidean distance, Manhattan distance, distance learned by metric learning, or other distances.
[0141] According to some embodiments of the present application, the similarity calculation module 230 can calculate the similarity between the features of the unlabeled image 10 and the features of the sample seed image 20 based on the similarity between the feature vector of the unlabeled image 10 and the feature vector of the sample seed image 20 at each layer of the negative sample feature extraction model, for example, by a linear regression algorithm, a logistic regression algorithm or other algorithms. According to some embodiments of the present application, the similarity can be represented by a numerical value between [0, 1], and the larger the numerical value, the greater the similarity.
[0142] According to some embodiments of the present application, for each category of the negative sample seed image 21, the sample image selection module 240 can select images whose similarity with the features of one or more negative sample seed images 21 in each category is within a predetermined range from the unlabeled image 10 as the negative sample images 31 of each category. According to some embodiments of the present application, the negative sample images 31 selected by the sample image selection module 240 may include or may not include the negative sample seed image 21. According to some embodiments of the present application, the predetermined range may be, but is not limited to, [0.9, 1] or [0.9, 1). It should be noted that the predetermined range may be the same as or different from the predetermined range for determining the similarity between the set of negative sample seed images 21 and the ImageNet training image set.
[0143] According to some embodiments of the present application, for a category of negative sample seed images 21, all unlabeled images 10 can be traversed to select negative sample images 31 belonging to the category, or some unlabeled images 10 can be traversed to select negative sample images 31 belonging to the category, for example, when the number of negative sample images 31 has met the requirement, or when some unlabeled images 10 have been selected as negative sample images 31 of other categories.
[0144] According to an embodiment of the present application, for a category of a negative sample seed image 21 and an unlabeled image 10, the similarity calculation module 230 can respectively calculate the similarity between the features of the unlabeled image 10 and the features of at least one negative sample seed image 21 in the category. Specifically, for each of the M layers of the negative sample feature extraction model, the similarity calculation module 230 can calculate the distance between the feature vectors of an unlabeled image 10 and a negative sample seed image 21 on the layer, for example, cosine distance, EMD distance, Euclidean distance, distance learned by metric learning, or other distance, to characterize the similarity between the features of the two images on the layer; then, a linear regression algorithm or a logistic regression algorithm is used to calculate the similarity between the features of the two images based on the similarity between the features of the two images on each layer.
[0145] According to an embodiment of the present application, for a category of negative sample seed images 21 and an unlabeled image 10, the sample image selection module 240 can determine whether the mean, maximum value, minimum value or other statistical value of the similarity between the features of the unlabeled image 10 and the features of at least one negative sample seed image 21 in the category is within a predetermined range. If so, the sample image selection module 240 selects the unlabeled image 10 as the negative sample image 31 of the category. According to some embodiments of the present application, the above-mentioned predetermined range can be, for example, but not limited to [0.9, 1] or [0.9, 1).
[0146] For example, for Figure 3B The negative sample seed image 21 including the image of the cat class shown in FIG. 2 can be selected from the sample image selection module 240 Figure 3A The unlabeled images 10 shown in FIG. 1 are selected to include images of cats having features similar to those of the cat in the negative sample seed image 21, such as eyes, nose, ears, and color. Therefore, according to an embodiment of the present application, the negative sample seed image 21 can be expanded in two dimensions, namely, the number of images and the number of image features, and the negative sample images 31 can be collected based on the similarity between the features of the images, which can greatly improve the accuracy.
[0147] It should be noted that, when calculating the similarity between the negative sample seed image 21 and the ImageNet training image, in addition to the feature extraction algorithm, the negative sample seed image 21 and the ImageNet training image can also be first input into a pre-trained convolutional neural network (a convolutional neural network trained with a large number of categories of large-scale images, for example, a convolutional neural network trained with Google's JFT Dataset) in a manner similar to calculating the similarity between the negative sample seed image 21 and the unlabeled image, and the output vectors of one or more specified layers (for example, convolutional layers and / or fully connected layers) in the convolutional neural network are used as feature vectors of the negative sample seed image 21 and the ImageNet training image, and then the similarity between the feature vectors of the negative sample seed image 21 and the ImageNet training image is calculated at the specified layers to obtain the similarity between the feature vectors of the negative sample seed image 21 and the ImageNet training image.
[0148] In block 522, it is determined whether to retrain the negative sample feature extraction model. If so, block 524 is executed. If not, the process ends.
[0149] In block 524, the collected negative sample images 31 are used to retrain the negative sample feature extraction model. According to some embodiments of the present application, the feature extraction model building module 210 can be used to train the convolutional neural network using, for example, a back propagation algorithm, a Newton gradient descent algorithm, or other algorithms, and then obtain the negative sample feature extraction model based on the above principles. Since the negative sample images 31 expand the number of images and the number of features of the negative sample seed image 21, the robustness and accuracy of the negative sample feature extraction model retrained with the negative sample images 31 will be higher.
[0150] After block 524 is executed, the process returns to block 518. The features of the unlabeled image 10 and the negative sample seed image 21 are extracted by the retrained negative sample feature extraction model, and the accuracy of the negative sample image 31 selected from the unlabeled image 10 by the similarity calculation module 230 and the sample image selection module 240 is further improved.
[0151] According to some embodiments of the present application, the iterative process from block 518 to block 524 may be repeated a predetermined number of times, for example, but not limited to 3 times.
[0152] According to some embodiments of the present application, the negative sample images 31 selected from the unlabeled images 10 according to the negative sample seed images 21 may be labeled with category labels corresponding to the categories of the negative sample seed images 21 .
[0153] According to some other embodiments of the present application, the negative sample feature extraction model that has been iteratively trained has good robustness and accuracy, so the image similar to the negative sample seed image 21 can also be selected by the classification probability of the classification model. Specifically, the unlabeled image 10 can be input into the negative sample feature extraction model through the feature extraction module 220 to obtain the features of the unlabeled image 10, and the similarity calculation module 230 uses a classification model, such as an SVM classification model, a Tensorflow classification model, or other classification models, based on the features of the unlabeled image 10 and the features of the negative sample seed image 21, to obtain the probability that each unlabeled image 10 belongs to each category of the negative sample seed image 21, or obtain the maximum probability of each unlabeled image 10 belonging to each category of the negative sample seed image 21, and the category of the negative sample seed image 21 corresponding to the maximum probability, and then for each category of the negative sample seed image 21, the sample image selection module 240 sorts the unlabeled images 10 according to the probability of belonging to the category, and selects the images in the top N positions of the probability sorting as the negative sample images 31 of the category, where N is a positive integer.
[0154] According to some embodiments of the present application, the collected negative sample images 31 can be used to optimize the training target category classification model, or can be used together with the negative sample seed images 21 to train a new image classification model, for example, Figure 4 The convolutional neural network shown in , or for other applications that require a large number of richly labeled images.
[0155] In an embodiment of the present application, a large number of negative sample images 31 can be collected from a large number of unlabeled images 10 based on a small number of negative sample seed images 21, which greatly improves the efficiency of collecting negative sample images 31 and reduces the cost of collecting negative sample images 31.
[0156] Furthermore, based on the similarity between the features of the images, images similar to the negative sample seed image 21 are collected from the unlabeled images as negative sample images 31. Compared with directly using the neural network obtained based on the negative sample seed image 21 to classify the unlabeled images, the accuracy of the collection can be greatly improved, thereby improving the efficiency of negative sample image collection.
[0157] Furthermore, retraining the negative sample feature extraction model using negative sample images 31 whose number of images and features is greater than that of the negative sample seed image 21 can further improve the robustness and accuracy of the negative sample feature extraction model, and can also further improve the accuracy of the selected negative sample images 31, thereby improving the efficiency of negative sample image collection.
[0158] Figure 6is a flow chart showing a method 600 for collecting positive sample images 32 according to an embodiment of the present application, Figure 2 Different components of the sample image collection device in the embodiment may implement different blocks or other parts of the method 600. For contents not described in the above device embodiment, reference may be made to the following method embodiment. Similarly, for contents not described in the method embodiment, reference may be made to the above device embodiment.
[0159] In block 602 , the feature extraction model building module 210 is used to train a neural network using the positive sample seed image 22 , and a positive sample feature extraction model is obtained based on the neural network.
[0160] According to some embodiments of the present application, the positive sample seed image 22 may be an annotated image, which may be an image selected from the ImageNet image collection, or a small number of images selected and annotated manually from the unannotated image 10 or other image sources. The source of the positive sample seed image 22 is not specifically limited. According to some embodiments of the present application, the positive sample seed image 22 may include one or more categories of images, such as Figure 3B As shown in , the positive sample seed image 22 may include an image of a dog.
[0161] According to some embodiments of the present application, a neural network may be trained based on a back propagation algorithm, a Newton gradient descent algorithm, or other algorithms, such as, but not limited to, a convolutional neural network. Figure 4 In the case of the convolutional neural network shown, the acquisition of the positive sample feature extraction model can refer to the corresponding description of the negative sample feature extraction model above, which will not be repeated here.
[0162] In block 604, the unlabeled image 10 and the positive sample seed image 22 are input into the positive sample feature extraction model through the feature extraction module 220 to obtain the features of the unlabeled image 10 and the positive sample seed image 22. According to some embodiments of the present application, in the case where the positive sample seed image 22 is derived from the unlabeled image 10, the unlabeled image 10 can be input into the positive sample feature extraction model through the feature extraction module 220 to obtain the features of the unlabeled image 10 (including the positive sample seed image 22).
[0163] According to some embodiments of the present application, the features of the unlabeled image 10 and the features of the positive sample seed image 22 may be feature vectors on M layers of the positive sample feature extraction model. Figure 3B The positive sample seed image 22 shown in FIG. 2 includes an image of a dog. The feature vectors on the M layers of the positive sample feature extraction model can be associated with features such as the dog's eyes, nose, and ears.
[0164] In block 606 , the similarity between the features of the unlabeled image 10 and the features of the positive sample seed image 22 is obtained through the similarity calculation module 230 , and the positive sample images 32 similar to the positive sample seed image 22 are collected from the unlabeled image 10 through the sample image selection module 240 .
[0165] According to some embodiments of the present application, the similarity between the features of the unlabeled image 10 and the features of the positive sample seed image 22 refers to the similarity between the unlabeled image 10 and the positive sample seed image 22 corresponding to the category. According to some embodiments of the present application, the similarity calculation module 230 can characterize the similarity between the two by calculating the distance between the feature vector of the unlabeled image 10 and the feature vector of the sample seed image 20 at each layer of the positive sample feature extraction model. The distance is, for example but not limited to, cosine distance, EMD distance, Euclidean distance, Manhattan distance, distance learned by metric learning, or other distances.
[0166] According to some embodiments of the present application, the similarity calculation module 230 can calculate the similarity between the features of the unlabeled image 10 and the features of the sample seed image 20 based on the similarity between the feature vector of the unlabeled image 10 and the feature vector of the sample seed image 20 at each layer of the positive sample feature extraction model, for example, by a linear regression algorithm, a logistic regression algorithm or other algorithms. According to some embodiments of the present application, the similarity can be represented by a numerical value between [0, 1], and the larger the numerical value, the greater the similarity.
[0167] According to some embodiments of the present application, for each category of the positive sample seed image 22, the sample image selection module 240 can select images whose similarity with the features of one or more positive sample seed images 22 in each category is within a predetermined range from the unlabeled image 10 as the positive sample images 32 of each category. According to some embodiments of the present application, the positive sample images 32 selected by the sample image selection module 240 may include or may not include the positive sample seed image 22. According to some embodiments of the present application, the predetermined range may be, but is not limited to, [0.9, 1] or [0.9, 1).
[0168] According to some embodiments of the present application, for a category of the positive sample seed image 22, all the unlabeled images 10 can be traversed to select the positive sample images 32 belonging to the category, or some of the unlabeled images 10 can be traversed to select the positive sample images 32 belonging to the category, for example, when the number of positive sample images 32 has met the requirement, or when some of the unlabeled images 10 have been selected as positive sample images 32 of other categories.
[0169] According to an embodiment of the present application, for a category of a positive sample seed image 22 and an unlabeled image 10, the similarity calculation module 230 can respectively calculate the similarity between the features of the unlabeled image 10 and the features of at least one positive sample seed image 22 in the category. Specifically, the above-mentioned corresponding description of the negative sample seed image 21 can be referred to, and no further description is given here. According to an embodiment of the present application, for a category of a positive sample seed image 22 and an unlabeled image 10, the sample image selection module 240 can determine whether the mean, maximum value, minimum value or other statistical value of the similarity between the features of the unlabeled image 10 and the features of at least one positive sample seed image 22 in the category is within a predetermined range. If so, the sample image selection module 240 selects the unlabeled image 10 as the positive sample image 32 of the category. According to some embodiments of the present application, the above-mentioned predetermined range can be, for example, but not limited to, [0.9, 1] or [0.9, 1).
[0170] For example, for Figure 3B The sample image selection module 240 can select the positive sample seed image 22 including the dog image. Figure 3A The unlabeled images 10 in the image are selected to select dog images with similar features such as eyes, nose, ears, and color to the dog in the positive sample seed image 22. Therefore, according to the embodiment of the present application, the positive sample seed image 22 can be expanded in two dimensions, namely, the number of images and the number of image features, and the positive sample images 32 can be collected based on the similarity between the features of the images, which can greatly improve the accuracy.
[0171] In block 608, it is determined whether to continue to retrain the positive sample feature extraction model. If so, block 610 is executed, and if not, the process ends.
[0172] In block 610, the collected positive sample images 32 are used to retrain the positive sample feature extraction model. For details, please refer to the corresponding description of the negative sample images 31 above, which will not be repeated here. Since the positive sample images 32 expand the number of images and the number of features of the positive sample seed image 22, the robustness and accuracy of the positive sample feature extraction model retrained with the positive sample images 32 will be higher.
[0173] After block 610 is executed, the process returns to block 604. The features of the unlabeled image 10 and the positive sample seed image 22 are extracted by the retrained positive sample feature extraction model, and the accuracy of the positive sample image 32 selected from the unlabeled image 10 by the similarity calculation module 230 and the sample image selection module 240 is further improved.
[0174] According to some embodiments of the present application, the iterative process from block 604 to block 610 may be repeated a predetermined number of times, for example, but not limited to 3 times.
[0175] According to some embodiments of the present application, the positive sample images 32 selected from the unlabeled images 10 according to the positive sample seed images 22 may be labeled with category labels corresponding to the categories of the positive sample seed images 22 .
[0176] According to other embodiments of the present application, the positive sample feature extraction model that has undergone iterative training already has good robustness and accuracy, and therefore, an image similar to the positive sample seed image 22 can also be selected through the classification probability of the classification model. Specifically, reference can be made to the corresponding description of the negative sample image 31 above, which will not be repeated here.
[0177] According to some embodiments of the present application, the collected positive sample images 32 can be used to optimize the training target category classification model, or can be used together with the positive sample seed images 22 to train a new image classification model, for example, Figure 4 The convolutional neural network model shown in , or for other applications that require a large number of richly labeled images.
[0178] In an embodiment of the present application, a large number of positive sample images 32 can be collected from a large number of unlabeled images 10 based on a small number of positive sample seed images 22, which greatly improves the efficiency of collecting positive sample images 32 and reduces the cost of collecting positive sample images 32.
[0179] Furthermore, based on the similarity between the features of the images, images similar to the positive sample seed image 22 are collected from the unlabeled images as positive sample images 32. Compared with directly using the neural network trained based on the positive sample seed image 22 to classify the unlabeled images, the accuracy of the collection can be greatly improved, thereby improving the efficiency of the positive sample image collection.
[0180] Furthermore, retraining the positive sample feature extraction model using positive sample images 32 whose number of images and features is greater than the positive sample seed image 22 can further improve the robustness and accuracy of the positive sample feature extraction model, and can also further improve the accuracy of the selected positive sample images 32, thereby improving the efficiency of positive sample image collection.
[0181] The various embodiments of the mechanisms disclosed herein may be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application may be implemented as a computer program or program code executed on a programmable system, the programmable system comprising at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.
[0182] Program code can be applied to input instructions to perform the functions described herein and generate output information. The output information can be applied to one or more output devices in a known manner. For purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
[0183] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described herein is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
[0184] One or more aspects of at least some embodiments may be implemented by representative instructions stored on a machine-readable medium, which represent various logic within a processor, and which, when read by a machine, cause the machine to fabricate logic for performing the techniques described herein. These representations, known as "IP cores," may be stored on a tangible, machine-readable medium and supplied to multiple customers or manufacturing facilities to load into a fabrication machine that actually manufactures the logic or processor.
[0185] Such machine-readable storage media may include, but are not limited to, a non-transitory tangible arrangement of articles manufactured or formed by a machine or apparatus, including storage media such as: a hard disk, any other type of disk, including a floppy disk, an optical disk, a compact disk-read only memory (CD-ROM), a compact disk-rewritable (CD-RW), and a magneto-optical disk; semiconductor devices, such as read-only memory (ROM), random access memory (RAM) such as dynamic random access memory (DRAM) and static random access memory (SRAM), erasable programmable read-only memory (EPROM), flash memory, electrically erasable programmable read-only memory (EEPROM); phase change memory (PCM); a magnetic card or an optical card; or any other type of medium suitable for storing electronic instructions.
[0186] Therefore, the embodiments of the present application also include non-transitory tangible machine-readable media containing instructions or containing design data, such as hardware description language (HDL), which defines the structures, circuits, devices, processors and / or system features described herein. These embodiments are also referred to as program products.
Claims
1. An image processing device, characterized in that: include: A feature extraction model building module is used to obtain a feature extraction model using the first set of images; A feature extraction module, used to extract features of the second group of images using the feature extraction model; a similarity calculation module, used for obtaining similarities between features of the first group of images and the features of the second group of images; and a sample image selection module, configured to select a third group of images from the second group of images, wherein the similarity between the features of the third group of images and the features of the first group of images is within a first predetermined range; Wherein, the feature extraction model building module is also used to train the feature extraction model based on the third group of images.
2. The image processing device according to claim 1, wherein: The first set of images is contained in the second set of images.
3. The image processing device according to claim 2, wherein: The number of the features of the third set of images is greater than the number of the features of the first set of images.
4. The image processing device according to claim 1, wherein: The feature extraction module is also used to extract the features of the first group of images using the feature extraction model.
5. The image processing device according to claim 1, wherein: The similarity calculation module is used to obtain the similarity between the features of the first group of images and the features of the second group of images, including: For each layer of the feature extraction model, the similarity between the feature vectors of the features of the first set of images and the feature vectors of the features of the second set of images is calculated.
6. The image processing device according to claim 5, characterized in that: The similarity calculation module calculates the similarity between the feature vector of the feature of the first group of images and the feature vector of the feature of the second group of images, including: The similarity between the feature vectors of the features of the first set of images and the feature vectors of the features of the second set of images is calculated by cosine distance and / or EMD moving average distance.
7. The image processing device according to claim 1, wherein: The first predetermined range is [0.9, 1].
8. The image processing device according to any one of claims 1 to 7, characterized in that: The first group of images and the third group of images include negative sample images, where the negative sample images are images that do not belong to the target category.
9. The image processing device according to any one of claims 1 to 7, characterized in that: The first group of images and the third group of images include positive sample images, which are images belonging to a target category.
10. The device according to claim 8, characterized in that The feature extraction model building module uses the first group of images to obtain a feature extraction model, including: Calculating the similarity between the first set of images and the ImageNet training image set; When the similarity between the first group of images and the ImageNet training image set is within a second predetermined range, obtaining the feature extraction model using the ImageNet training image set; When the similarity between the first group of images and the ImageNet training image set is not within the second predetermined range, the feature extraction model is acquired using the first group of images.
11. An image processing method, characterized in that: include: Using the first set of images, obtaining a feature extraction model; Using the feature extraction model, extracting features of the second group of images; Obtaining similarities between features of the first group of images and the features of the second group of images, and selecting a third group of images from the second group of images, wherein the similarities between features of the third group of images and the features of the first group of images are within a first predetermined range; and Based on the third group of images, the feature extraction model is trained.
12. The image processing method according to claim 11, characterized in that: The first set of images is contained in the second set of images.
13. The image processing method according to claim 12, characterized in that: The number of the features of the third set of images is greater than the number of the features of the first set of images.
14. The image processing method according to claim 11, characterized in that: It also includes extracting the features of the first group of images using the feature extraction model.
15. The image processing method according to claim 14, characterized in that: Repeat the following up to a predetermined number of times: Using the feature extraction model, extracting the features of the first group of images and the features of the second group of images; Obtaining similarities between the features of the first group of images and the features of the second group of images, and selecting the third group of images from the second group of images, wherein the similarities between the features of the third group of images and the features of the first group of images are within a predetermined range; and The feature extraction model is trained based on the third group of images.
16. The image processing method according to claim 11, characterized in that: The obtaining similarities between the features of the first group of images and the features of the second group of images includes: For each layer of the feature extraction model, the similarity between the feature vectors of the features of the first set of images and the feature vectors of the features of the second set of images is calculated.
17. The image processing method according to claim 16, characterized in that: The calculating the similarity between the feature vector of the feature of the first group of images and the feature vector of the feature of the second group of images comprises: The similarity between the feature vectors of the features of the first set of images and the feature vectors of the features of the second set of images is calculated by cosine distance and / or EMD moving average distance.
18. The image processing method according to claim 11, characterized in that: The first predetermined range is [0.9, 1].
19. The image processing method according to any one of claims 11 to 18, characterized in that: The first group of images and the third group of images include negative sample images, where the negative sample images are images that do not belong to the target category.
20. The image processing method according to any one of claims 11 to 18, characterized in that: The first group of images and the third group of images include positive sample images, which are images belonging to a target category.
21. The image processing method according to claim 19, characterized in that: The method of obtaining a feature extraction model by using the first set of images further includes: Calculating the similarity between the first set of images and the ImageNet training image set; When the similarity between the first group of images and the ImageNet training image set is within a second predetermined range, obtaining the feature extraction model using the ImageNet training image set; When the similarity between the first group of images and the ImageNet training image set is not within a second predetermined range, the feature extraction model is acquired using the first group of images.
22. An image processing method, characterized in that: include: Using a first group of images, obtaining a feature extraction model, wherein the first group of images includes negative sample images, and the negative sample images are images that do not belong to the target category; Using the feature extraction model, extracting features of the second group of images; Wherein, the method further comprises: extracting features of the first group of images using the feature extraction model; Obtaining similarities between the features of the first group of images and the features of the second group of images, and selecting a third group of images from the second group of images, wherein the similarities between the features of the third group of images and the features of the first group of images are within a first predetermined range; and The feature extraction model is trained based on the third group of images.
23. A system, characterized in that: include: processor; A memory, wherein instructions are stored in the memory, and when the instructions are executed by the processor, the processor executes the method according to any one of claims 11 to 22.
24. A machine-readable medium, characterized in that The machine-readable medium stores instructions, and when the instructions are executed by a machine, the machine performs the method according to any one of claims 11 to 22.
