CN114972883A - Target detection sample generation method based on artificial intelligence and related equipment - Google Patents

Target detection sample generation method based on artificial intelligence and related equipment Download PDF

Info

Publication number
CN114972883A
CN114972883A CN202210690639.1A CN202210690639A CN114972883A CN 114972883 A CN114972883 A CN 114972883A CN 202210690639 A CN202210690639 A CN 202210690639A CN 114972883 A CN114972883 A CN 114972883A
Authority
CN
China
Prior art keywords
target
image
images
image set
sample
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210690639.1A
Other languages
Chinese (zh)
Inventor
严正
刘鹏
刘玉宇
肖京
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202210690639.1A priority Critical patent/CN114972883A/en
Publication of CN114972883A publication Critical patent/CN114972883A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Landscapes

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

Abstract

The application provides a target detection sample generation method and device based on artificial intelligence, an electronic device and a storage medium, wherein the target detection sample generation method based on artificial intelligence comprises the following steps: acquiring a sample image to obtain an optimized sample image set; classifying the optimized sample image set to obtain a classified image set; respectively calculating the image similarity between a target image in the target classified image set and other images to obtain a target similar image set; carrying out weighted summation on all images in the target similar image set to obtain a target balanced image; combining the target equilibrium images to generate a sample training set, and acquiring a trained target detection model based on the sample training set; and carrying out target detection based on the trained target detection model to obtain a target detection result. According to the method and the device, a large number of sample images can be generated through a small number of labeled samples, so that the accuracy of detecting the new type of targets is improved.

Description

Target detection sample generation method based on artificial intelligence and related equipment
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a method and an apparatus for generating a target detection sample based on artificial intelligence, an electronic device, and a storage medium.
Background
The target detection task is always the leading research hotspot in the field of computer vision and is also the basis of a plurality of top-level vision tasks. Its primary purpose is to identify and label target objects in an image or video content with boxes.
The current target detection method based on deep learning generally needs a large amount of manually labeled data for training, and after model training is completed, the model can be deployed in actual detection application. However, the trained model can only be used for detection of class targets present in the training data, and cannot adaptively detect new class targets that have not been seen in the training phase. Therefore, how to learn the characteristics of a new category by using only a small number of labeled samples, so as to have the capability of detecting a new category target, and improve the accuracy of target detection is an urgent technical problem to be solved.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a method, an apparatus, an electronic device and a storage medium for generating a target detection sample based on artificial intelligence, so as to solve the technical problem of how to improve the accuracy of a target detection result. The related equipment comprises an artificial intelligence-based target detection sample optimizing device, electronic equipment and a storage medium.
The application provides a target detection sample generation method based on artificial intelligence, which comprises the following steps:
acquiring sample images, and preprocessing all the sample images to obtain an optimized sample image set;
labeling all images in the optimized sample image set, and classifying all the labeled images to obtain a classified image set of multiple categories;
respectively calculating image similarity between a target image in a target classified image set and other images in the target classified image set to obtain a target similar image set of the target image, wherein the target classified image set is any one of the classified image sets of all categories, and the target image is any one of the target classified image sets of the corresponding categories;
performing weighted summation on all images in the target similar image set to obtain a target balanced image, wherein the target balanced image corresponds to the target similar image set one by one;
combining the target equilibrium images of each target similar image set of each category to generate a sample training set, and training a preset target detection model based on the sample training set to obtain a trained target detection model;
and carrying out target detection based on the trained target detection model to obtain a target detection result.
In some embodiments, the acquiring the sample images and preprocessing all the sample images to obtain an optimized sample image set includes:
collecting sample images, and converting all the sample images into gray level images to obtain a gray level image set;
and performing mean filtering on all the gray level images in the gray level image set to obtain an optimized sample image set.
In some embodiments, the labeling all the images in the optimized sample image set, and classifying all the labeled images to obtain a classified image set of multiple categories includes:
performing framing on all images in the optimized sample image set according to a preset mode to obtain target frame images, and labeling different label values for the target frame images of different types;
and classifying all the target frame images according to the category of the label value to obtain a plurality of categories of classified image sets, wherein each classified image set comprises a plurality of target frame images of the same label value category.
In some embodiments, the separately calculating image similarities between the target image in the target classified image set and other images in the target classified image set to obtain a target similar image set of the target image, where the target classified image set is any one of the classified image sets of all categories, and the target image is any one of the target classified image sets of the corresponding category, includes:
respectively calculating image similarity between a target image in a target classified image set and other images in the target classified image set;
calculating an image similarity threshold of the target image based on all image similarities corresponding to the target image, and screening images in the target classification image set based on the image similarity threshold to obtain a target similar image set, wherein the target similar image set corresponds to the target image one by one;
and traversing all the images in the classified image sets of all the classes and all the images in the classified image set of each class to obtain a target similar image set of each image in the classified image set of each class.
In some embodiments, the calculating an image similarity threshold based on all image similarities corresponding to the target image, and screening images in the target classified image set based on the image similarity threshold to obtain a target similar image set includes:
calculating all image similarities corresponding to the target image according to a maximum inter-class variance method to obtain an image similarity threshold;
and reserving all image similarities which are larger than the image similarity threshold value and correspond to the target image, and taking all images corresponding to the reserved image similarities as a target similar image set of the target image.
In some embodiments, the performing a weighted summation on all images in the target similar image set to obtain a target equalized image, where the target equalized image is in one-to-one correspondence with the target similar image set, includes:
taking the image similarity of each image in the target similar image set and the target image as the similarity weight corresponding to each image in the target similar image set;
normalizing the similarity weight corresponding to each image in the target similar image set to obtain a normalized similarity weight corresponding to each image;
and carrying out weighted summation on each image in the target similar image set and the normalized similarity weight corresponding to each image to obtain a target balanced image of the target similar image set.
In some embodiments, the combining the target balanced images of the respective target similar image sets of each category to generate a sample training set, and training a preset target detection model based on the sample training set to obtain a trained target detection model includes:
combining all target equilibrium images in the target classification image set to obtain a target sample training set;
traversing all classes of classified image sets, and taking all obtained target sample sets as sample training sets;
and training a preset target detection model based on the sample training set to obtain a trained target detection model.
The embodiment of the present application further provides an artificial intelligence-based target detection sample generation device, where the device includes:
the acquisition unit is used for acquiring sample images and preprocessing all the sample images to obtain an optimized sample image set;
the classification unit is used for labeling all the images in the optimized sample image set and classifying all the labeled images to obtain a classified image set of multiple categories;
the calculation unit is used for respectively calculating the image similarity between a target image in a target classified image set and other images in the target classified image set to obtain a target similar image set of the target image, wherein the target classified image set is any one of the classified image sets of all categories, and the target image is any one of the target classified image sets of the corresponding categories;
the obtaining unit is used for carrying out weighted summation on all images in the target similar image set to obtain a target balanced image, and the target balanced image corresponds to the target similar image set one by one;
the combination unit is used for combining the target equilibrium images of the target similar image sets of each category to generate a sample training set, and training a preset target detection model based on the sample training set to obtain a trained target detection model;
and the detection unit is used for carrying out target detection based on the trained target detection model to obtain a target detection result.
An embodiment of the present application further provides an electronic device, where the electronic device includes:
a memory storing at least one instruction;
and the processor executes the instructions stored in the memory to realize the artificial intelligence-based target detection sample generation method.
The embodiment of the present application further provides a computer-readable storage medium, where at least one instruction is stored, and the at least one instruction is executed by a processor in an electronic device to implement the artificial intelligence based target detection sample generation method.
According to the method and the device, the collected sample images are labeled and then classified to obtain the classified image set, the similarity calculation is carried out on all the images in the classified image set of each category, the images are superposed on the basis of the similarity to obtain the target balance image and then combined, so that a large number of training images are generated according to a small number of training samples, and the accuracy of the target detection model for detecting the new category target is improved.
Drawings
Fig. 1 is a flow chart of a preferred embodiment of a target detection sample generation method based on artificial intelligence according to the present application.
FIG. 2 is a functional block diagram of a preferred embodiment of an artificial intelligence based target detection sample generation apparatus according to the present application.
Fig. 3 is a schematic structural diagram of an electronic device according to a preferred embodiment of the artificial intelligence-based target detection sample generation method according to the present application.
Fig. 4 is a schematic flow chart diagram illustrating a preferred embodiment of an artificial intelligence target detection sample generation method according to the present application.
Detailed Description
For a clearer understanding of the objects, features and advantages of the present application, reference is made to the following detailed description of the present application along with the accompanying drawings and specific examples. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict. In the following description, numerous specific details are set forth to provide a thorough understanding of the present application, and the described embodiments are merely a subset of the embodiments of the present application and are not intended to be a complete embodiment.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to implicitly indicate the number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The embodiment of the present Application provides a target detection sample generation method based on artificial intelligence, which can be applied to one or more electronic devices, where an electronic device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and hardware of the electronic device includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The electronic device may be any electronic product capable of performing human-computer interaction with a client, for example, a Personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), a game machine, an Internet Protocol Television (IPTV), an intelligent wearable device, and the like.
The electronic device may also include a network device and/or a client device. The network device includes, but is not limited to, a single network server, a server group consisting of a plurality of network servers, or a Cloud Computing (Cloud Computing) based Cloud consisting of a large number of hosts or network servers.
The Network where the electronic device is located includes, but is not limited to, the internet, a wide area Network, a metropolitan area Network, a local area Network, a Virtual Private Network (VPN), and the like.
Fig. 1 is a flowchart illustrating a target detection sample generation method based on artificial intelligence according to a preferred embodiment of the present invention. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs. On the basis, please refer to fig. 4 together with a schematic flow chart and structure diagram of a preferred embodiment of the method for generating an artificial intelligence target detection sample according to the present application.
And S10, acquiring sample images, and preprocessing all the sample images to obtain an optimized sample image set.
In an optional embodiment, the acquiring sample images and preprocessing all the sample images to obtain an optimized sample image set includes:
s101, collecting sample images, and converting all the sample images into gray level images to obtain a gray level image set.
And S102, performing mean filtering on all gray level images in the gray level image set to obtain an optimized sample image set.
In this alternative embodiment, an RGB camera may be used to capture the sample images and convert all of the captured sample images into grayscale images. Wherein, the pixel gray scale value interval of the sample image in the gray scale image is [0,255], and in the scheme, all the sample images converted into the gray scale images are used as a gray scale image set.
In this optional embodiment, since a large amount of noise exists in the acquired sample image, all the grayscale images in the grayscale image set may be processed by the mean filtering algorithm, so as to reduce interference of noise and improve the quality of the grayscale image, and the grayscale image set after the mean filtering processing is used as the optimized sample image set. The mean filtering algorithm replaces the pixel value of the current pixel point with the mean value of the pixel values in the range of N multiplied by N pixel points around the current pixel point, and the mean filtering of the whole gray image can be completed by traversing each pixel point in the gray image by using the method. For example, if the pixel value of the pixel point a is 100, and the corresponding 9 pixel values in the range of 3 × 3 pixel points of the pixel point a are 100, 200, 300, 200, 100, 300, 100, 200, and 300, respectively, after the mean filtering, the pixel value of the pixel point a is 100+200+300+200+100+ 200+300/9 is 200.
Therefore, the collected sample image can be smoothed, noise interference in the sample image is reduced, and the accuracy of a subsequent target detection process is improved.
And S11, labeling all the images in the optimized sample image set, and classifying all the labeled images to obtain a classified image set of multiple categories.
In an optional embodiment, the labeling all the images in the optimized sample image set, and classifying all the labeled images to obtain a classified image set of multiple categories includes:
and S111, performing framing selection on all images in the optimized sample image set according to a preset mode to obtain target frame images, and labeling different label values for the target frame images of different types.
S112, classifying all the target frame images according to the types of the label values to obtain classified image sets of multiple types, wherein each classified image set comprises multiple target frame images of the same label value type.
In this optional embodiment, all the images in the optimized sample image set may be previously subjected to frame selection and labeling in a manual labeling manner to obtain a target frame, where different types of feature images appearing in the images may be sequentially labeled with different label values in a sequence from a small natural number to a large natural number, and each type of feature image corresponds to one label value. For example, if there are three types of feature images of a car, a bicycle, and a person in one image, three target frame images are obtained by respectively performing frame selection on the car, the bicycle, and the person, and the label values corresponding to pixels in the three target frame images are 1,2, and 3 in sequence.
In this alternative embodiment, all the obtained target frame images may be classified according to the category of the label value to obtain a plurality of categories of classified image sets, that is, the target frame images included in each category of the classified image sets have the same label value.
Therefore, all the target frame images can be classified through the label values, the subsequent process is facilitated to be carried out only by aiming at the target frame images of the same category, and therefore the calculation efficiency is improved.
S12, respectively calculating image similarity between a target image in a target classified image set and other images in the target classified image set to obtain a target similar image set of the target image, wherein the target classified image set is any one of the classified image sets of all categories, and the target image is any one of the target classified image sets of the corresponding categories.
In an optional embodiment, the separately calculating image similarities between the target image in the target classified image set and other images in the target classified image set to obtain a target similar image set of the target image, where the target classified image set is any one of the classified image sets of all categories, and the target image is any one of the target classified image sets of corresponding categories, includes:
s121, respectively calculating image similarity between the target image in the target classified image set and other images in the target classified image set.
And S122, calculating an image similarity threshold of the target image based on all image similarities corresponding to the target image, and screening the images in the target classification image set based on the image similarity threshold to obtain a target similar image set, wherein the target similar image set corresponds to the target image one by one.
And S123, traversing all the classified image sets of all the classes and all the images in the classified image set of each class to obtain a target similar image set of each image in the classified image set of each class.
In this alternative embodiment, image similarities between the target image in the target classified image set and other images in the target classified image set may be calculated separately according to a normalized cross-correlation matching algorithm. The normalized cross-correlation matching algorithm uses a target image as a template, traverses each pixel of each image in the target classified image set, and compares whether each pixel is similar to the template, so that the image similarity between the target image and each other image in the target classified image set is obtained, wherein the value range is [0,1], and the closer to 1, the higher the similarity is.
In this alternative embodiment, the image similarity threshold between the target image and each of the other images in the target classified image set may be calculated by the maximum inter-class variance method. The maximum inter-class variance method is an algorithm for adaptively determining a binarization segmentation threshold, and can divide all image similarities related to a target image into two classes in a traversal mode, calculate an inter-class variance between the image similarities of the two divided classes, and select a corresponding threshold of the two classes as the image similarity threshold when the inter-class variance is maximum.
In this optional embodiment, all image similarities larger than the image similarity threshold corresponding to the target image are retained, and all images corresponding to the retained image similarities are used as a target similar image set of the target image. Since the target image is any one of the target classified image sets of the corresponding classes, the target similar image set of each image in the classified image set of each class can be obtained by traversing all the images in the classified image set of each class, that is, each image in the classified image set of each class corresponds to one target similar image set.
Therefore, the related images with higher similarity with each image in the classified image sets of each category can be calculated and obtained as the corresponding target similar image sets, so that the corresponding target images can be conveniently processed in the subsequent process according to the target similar image sets, and more stable target images can be obtained.
And S13, performing weighted summation on all images in the target similar image set to obtain a target balanced image, wherein the target balanced image is in one-to-one correspondence with the target similar image set.
In an optional embodiment, the performing a weighted summation on all the images in the target similar image set to obtain a target equalized image, where the target equalized image is in one-to-one correspondence with the target similar image set, includes:
s131, taking the image similarity between each image in the target similar image set and the target image as the similarity weight corresponding to each image in the target similar image set.
And S132, normalizing the similarity weight corresponding to each image in the target similar image set to obtain the normalized similarity weight corresponding to each image.
And S133, carrying out weighted summation on each image in the target similar image set and the normalized similarity weight corresponding to each image to obtain a target balanced image of the target similar image set.
In this optional embodiment, the image similarity between each image in the target similar image set and the target image is used as the similarity weight corresponding to each image in the target similar image set, and the similarity weights may be normalized by a normalization index function Softmax to obtain a normalized similarity weight. Wherein the normalized exponential function Softmax can normalize a plurality of values to the (0,1) interval.
Illustratively, there are 3 images a, b, and c in the target similar image set T corresponding to the target image G, the image similarities between the target image G and the images a, b, and c are 0.6, 0.4, and 0.8, respectively, and the similarity weights between the target image G and the images a, b, and c are also 0.6, 0.4, and 0.5, respectively. Images a, b, c obtained after normalization by Softmax of 0.6, 0.4, 0.5 were normalized to 0.4, 0.27, 0.33, respectively.
In this optional embodiment, weighted summation may be performed on each image in the target similar image set and the normalized similarity weight corresponding to each image to obtain a target balanced image corresponding to each image. The specific process is that weighted summation is carried out on pixel points of different images with the same coordinate according to corresponding pixel point gray value and normalized similarity weight.
Illustratively, 3 images a, b and c in the target similar image set T corresponding to the target image G have corresponding normalized weights of 0.4, 0.27 and 0.33, respectively, and the image a has two pixel points in common, corresponding coordinates are (1,2), (2 and 2), and corresponding gray values of the pixel points are 50 and 60; the image b has three pixel points in common, the corresponding coordinates are (1,2), (2,2), (3,2), and the gray values of the corresponding pixel points are 30, 80 and 100; the image c has 3 pixel points in total, the corresponding coordinates are (1,2), (5,2), (8,3), and the gray values of the corresponding pixel points are 40, 60, 20; the finally obtained target equilibrium image has 5 pixels (1,2), (2,2), (3,2), (5,2) and (8,3) with different coordinate positions, the gray value of the pixel corresponding to the coordinate (1,2) in the equilibrium image is 0.4 × 50+0.27 × 30+0.33 × 40 ═ 41, and the gray values of the pixels corresponding to the coordinates (2,2), (3,2), (5,2) and (8,3) are 46, 27, 20 and 7 respectively.
The relationship between the classification image set, the target similarity image set and the target equalization image can be referred to fig. 4.
In this way, similarity calculation can be performed on all images in the classified image set of each category, and a target balanced image with partial features of the images of the target similar image set can be generated by superposing the obtained image similarities, so that a large number of images integrating the features of the sample images can be conveniently generated in the subsequent process to train a target detection model.
And S14, combining the target equilibrium images of the target similar image sets of each category to generate a sample training set, and training a preset target detection model based on the sample training set to obtain a trained target detection model.
In an optional embodiment, the combining the target balanced images of the respective target similar image sets of each category to generate a sample training set, and training a preset target detection model based on the sample training set to obtain a trained target detection model includes:
and S141, combining all target equilibrium images in the target classification image set to obtain a target sample training set.
And S142, traversing the classified image sets of all the categories, and taking all the obtained target sample sets as sample training sets.
And S143, training a preset target detection model based on the sample training set to obtain a trained target detection model.
In this alternative embodiment, each target similar image set of each category corresponds to one target balanced image, that is, each image in the classified image set of each category corresponds to one target balanced image, so that the classified image set of each category includes a large number of target balanced images of the same category, and the large number of target balanced images of the same category may constitute the target balanced image set of the category. In the scheme, target equilibrium graphs are obtained by using the same category at each timeAnd randomly selecting two target balanced images in the image set to combine and superpose to generate a new sample training image, and taking all the obtained sample training images as a target sample training set corresponding to the category. The method comprises the following steps of setting N images in a classification image set of any category, randomly selecting two target equilibrium images from a target equilibrium image set of the category each time for combination and superposition, and finally generating new sample training images, wherein the number M of the new sample training images is as follows:
Figure BDA0003699479000000111
for example, assuming that the classified image set with the category of car includes 100 images, the number M of new sample training images that can be generated is 100 × 99 ÷ 2 ═ 4950, i.e., the target sample training set with the category of car includes 4950 sample training images.
In this alternative embodiment, the target balanced image sets of all the categories may be traversed, all the obtained target sample sets are used as sample training sets, and then a target detection model preset in the obtained sample training sets is used for training to obtain a trained target detection model.
In this optional embodiment, the preset target detection model may be an R-CNN model, which is called Region CNN, that is, a regional convolutional neural network. The main idea of target detection is to generate a candidate region, which may have a target, and then determine whether the region has a detection target by means of CNN, classifier, etc. and classify the region. The target identification of the R-CNN is mainly divided into four steps: generating about 1000-2000 candidate regions in each image of a valid sample training set for identification; and then extracting the feature vector of each candidate region by using a convolutional neural network, classifying each candidate region according to the feature vector, and finally adjusting the detection frame by using a frame Regression Box Regression to output the target frame of each feature image, thereby completing target detection.
In this optional embodiment, images in the sample training set may be sequentially input into a preset target detection model according to the label value category for training, a mean square error between a target frame output by each target detection model and a corresponding label value calculated by a mean square error loss function is used as a total loss in each training process, the training process of target detection is optimized by continuously reducing the total loss in each training process, and the training is finished until the final total loss is 0, so as to obtain a trained target detection model.
Therefore, a large number of different training images can be generated according to a small number of training samples, and the accuracy and the wide applicability of the target detection model for detecting the new class of targets are improved.
And S15, carrying out target detection based on the trained target detection model to obtain a target detection result.
In this alternative embodiment, a trained target detection model may be used to perform target detection on a sample image acquired in real time to obtain a target detection result.
Therefore, the sample image can be rapidly detected through the trained target detection model, and the efficiency of obtaining the target detection result is effectively improved.
Referring to fig. 2, fig. 2 is a functional block diagram of a preferred embodiment of the target detection sample generation apparatus based on artificial intelligence according to the present application. The target detection sample generation device 11 based on artificial intelligence comprises an acquisition unit 110, a classification unit 111, a calculation unit 112, an obtaining unit 113, a combination unit 114 and a detection unit 115. A module/unit as referred to herein is a series of computer readable instruction segments capable of being executed by the processor 13 and performing a fixed function, and is stored in the memory 12. In the present embodiment, the functions of the modules/units will be described in detail in the following embodiments.
In an alternative embodiment, the acquisition unit 110 is configured to acquire sample images, and preprocess all the sample images to obtain an optimized sample image set.
In an optional embodiment, the acquiring sample images and preprocessing all the sample images to obtain an optimized sample image set includes:
collecting sample images, and converting all the sample images into gray level images to obtain a gray level image set;
and performing mean filtering on all the gray level images in the gray level image set to obtain an optimized sample image set.
In this alternative embodiment, an RGB camera may be used to capture the sample images and convert all of the captured sample images into grayscale images. Wherein, the pixel gray scale value interval of the sample image in the gray scale image is [0,255], and in the scheme, all the sample images converted into the gray scale images are used as a gray scale image set.
In this optional embodiment, since a large amount of noise exists in the acquired sample image, all the grayscale images in the grayscale image set may be processed by the mean filtering algorithm, so as to reduce interference of noise and improve the quality of the grayscale image, and the grayscale image set after the mean filtering processing is used as the optimized sample image set. The mean filtering algorithm replaces the pixel value of the current pixel point with the mean value of the pixel values in the range of N multiplied by N pixel points around the current pixel point, and the mean filtering of the whole gray image can be completed by traversing each pixel point in the gray image by using the method. For example, if the pixel value of the pixel point a is 100, and the corresponding 9 pixel values in the range of 3 × 3 pixel points of the pixel point a are 100, 200, 300, 200, 100, 300, 100, 200, and 300, respectively, after the mean filtering, the pixel value of the pixel point a is 100+200+300+200+100+ 200+300/9 is 200.
In an optional embodiment, the classifying unit 111 is configured to label all images in the optimized sample image set, and classify all labeled images to obtain a classified image set of multiple categories.
In an optional embodiment, the labeling all the images in the optimized sample image set, and classifying all the labeled images to obtain a classified image set of multiple categories includes:
performing framing on all images in the optimized sample image set according to a preset mode to obtain target frame images, and labeling different label values for the target frame images of different types;
and classifying all the target frame images according to the category of the label value to obtain a plurality of categories of classified image sets, wherein each classified image set comprises a plurality of target frame images of the same label value category.
In this optional embodiment, all the images in the optimized sample image set may be previously subjected to frame selection and labeling in a manual labeling manner to obtain a target frame, where different types of feature images appearing in the images may be sequentially labeled as different label values according to a sequence of natural numbers from small to large, and each type of feature image corresponds to one label value. For example, if there are three types of feature images of a car, a bicycle, and a person in one image, three target frame images are obtained by respectively performing frame selection on the car, the bicycle, and the person, and the label values corresponding to pixels in the three target frame images are 1,2, and 3 in sequence.
In this alternative embodiment, all the obtained target frame images may be classified according to the category of the label value to obtain a plurality of categories of classified image sets, that is, the target frame images included in each category of the classified image sets have the same label value.
In an alternative embodiment, the calculating unit 112 is configured to calculate image similarities between a target image in a target classified image set and other images in the target classified image set respectively to obtain a target similar image set of the target image, where the target classified image set is any one of the classified image sets of all categories, and the target image is any one of the target classified image sets of the corresponding category.
In an optional embodiment, the separately calculating image similarities between the target image in the target classified image set and other images in the target classified image set to obtain a target similar image set of the target image, where the target classified image set is any one of the classified image sets of all categories, and the target image is any one of the target classified image sets of corresponding categories, includes:
respectively calculating image similarity between a target image in a target classified image set and other images in the target classified image set;
calculating an image similarity threshold of the target image based on all image similarities corresponding to the target image, and screening images in the target classification image set based on the image similarity threshold to obtain a target similar image set, wherein the target similar image set corresponds to the target image one by one;
and traversing all the images in the classified image sets of all the classes and all the images in the classified image set of each class to obtain a target similar image set of each image in the classified image set of each class.
In this alternative embodiment, image similarities between the target image in the target classified image set and other images in the target classified image set may be calculated separately according to a normalized cross-correlation matching algorithm. The normalized cross-correlation matching algorithm uses a target image as a template, traverses each pixel of each image in the target classified image set, and compares whether each pixel is similar to the template, so that the image similarity between the target image and each other image in the target classified image set is obtained, wherein the value range is [0,1], and the closer to 1, the higher the similarity is.
In this alternative embodiment, the image similarity threshold between the target image and each of the other images in the target classified image set may be calculated by the maximum inter-class variance method. The maximum inter-class variance method is an algorithm for adaptively determining a binarization segmentation threshold, and can divide all image similarities related to a target image into two classes in a traversal mode, calculate an inter-class variance between the image similarities of the two divided classes, and select a corresponding threshold of the two classes as the image similarity threshold when the inter-class variance is maximum.
In this optional embodiment, all image similarities larger than the image similarity threshold corresponding to the target image are retained, and all images corresponding to the retained image similarities are used as a target similar image set of the target image. Since the target image is any one of the target classified image sets of the corresponding classes, the target similar image set of each image in the classified image set of each class can be obtained by traversing all the images in the classified image set of each class, that is, each image in the classified image set of each class corresponds to one target similar image set.
In an alternative embodiment, the obtaining unit 113 is configured to perform weighted summation on all images in the target similar image set to obtain a target equilibrium image, where the target equilibrium image is in one-to-one correspondence with the target similar image set.
In an optional embodiment, the performing a weighted summation on all the images in the target similar image set to obtain a target equalized image, where the target equalized image is in one-to-one correspondence with the target similar image set, includes:
taking the image similarity of each image in the target similar image set and the target image as the similarity weight corresponding to each image in the target similar image set;
normalizing the similarity weight corresponding to each image in the target similar image set to obtain a normalized similarity weight corresponding to each image;
and carrying out weighted summation on each image in the target similar image set and the normalized similarity weight corresponding to each image to obtain a target balanced image of the target similar image set.
In this optional embodiment, the image similarity between each image in the target similar image set and the target image is used as the similarity weight corresponding to each image in the target similar image set, and the similarity weights may be normalized by a normalization index function Softmax to obtain a normalized similarity weight. Wherein the normalized exponential function Softmax can normalize a plurality of values to the (0,1) interval.
Illustratively, there are 3 images a, b, and c in the target similar image set T corresponding to the target image G, the image similarities between the target image G and the images a, b, and c are 0.6, 0.4, and 0.8, respectively, and the similarity weights between the target image G and the images a, b, and c are also 0.6, 0.4, and 0.5, respectively. The images a, b, c obtained after normalization by Softmax to 0.6, 0.4, 0.5 have normalized weights of 0.4, 0.27, 0.33, respectively.
In this optional embodiment, weighted summation may be performed on each image in the target similar image set and the normalized similarity weight corresponding to each image to obtain a target balanced image corresponding to each image. The specific process is that weighted summation is carried out on pixel points of different images with the same coordinate according to corresponding pixel point gray value and normalized similarity weight.
Illustratively, 3 images a, b and c in the target similar image set T corresponding to the target image G have corresponding normalized weights of 0.4, 0.27 and 0.33, respectively, and the image a has two pixel points in common, corresponding coordinates are (1,2), (2 and 2), and corresponding gray values of the pixel points are 50 and 60; the image b has three pixel points in common, the corresponding coordinates are (1,2), (2,2), (3,2), and the gray values of the corresponding pixel points are 30, 80 and 100; the image c has 3 pixel points in total, the corresponding coordinates are (1,2), (5,2), (8,3), and the gray values of the corresponding pixel points are 40, 60, 20; the finally obtained target equilibrium image has 5 pixels (1,2), (2,2), (3,2), (5,2) and (8,3) with different coordinate positions, the gray value of the pixel corresponding to the coordinate (1,2) in the equilibrium image is 0.4 × 50+0.27 × 30+0.33 × 40 ═ 41, and the gray values of the pixels corresponding to the coordinates (2,2), (3,2), (5,2) and (8,3) are 46, 27, 20 and 7 respectively.
The relationship between the classification image set, the target similarity image set and the target equalization image can be referred to fig. 4.
In an alternative embodiment, the combining unit 114 is configured to combine the target balanced images of the target similar image sets of each category to generate a sample training set, and train a preset target detection model based on the sample training set to obtain a trained target detection model.
In an optional embodiment, the combining the target balanced images of the respective target similar image sets of each category to generate a sample training set, and training a preset target detection model based on the sample training set to obtain a trained target detection model includes:
combining all target equilibrium images in the target classification image set to obtain a target sample training set;
traversing all classes of classified image sets, and taking all obtained target sample sets as sample training sets;
and training a preset target detection model based on the sample training set to obtain a trained target detection model.
In this alternative embodiment, each target similar image set of each category corresponds to one target balanced image, that is, each image in the classified image set of each category corresponds to one target balanced image, so that the classified image set of each category includes a large number of target balanced images of the same category, and the large number of target balanced images of the same category may constitute the target balanced image set of the category. In the scheme, two target equilibrium images are randomly selected from a target equilibrium image set of the same category each time to be combined and superposed to generate a new sample training image, and all the obtained sample training images are used as a target sample training set corresponding to the category. The method comprises the following steps of setting N images in a classification image set of any category, randomly selecting two target equilibrium images from a target equilibrium image set of the category each time for combination and superposition, and finally generating new sample training images, wherein the number M of the new sample training images is as follows:
Figure BDA0003699479000000171
for example, assuming that the classified image set with the category of car includes 100 images, the number M of new sample training images that can be generated is 100 × 99 ÷ 2 ═ 4950, i.e., the target sample training set with the category of car includes 4950 sample training images.
In this alternative embodiment, the target balanced image sets of all the categories may be traversed, all the obtained target sample sets are used as sample training sets, and then a target detection model preset in the obtained sample training sets is used for training to obtain a trained target detection model.
In this optional embodiment, the preset target detection model may be an R-CNN model, which is called Region CNN, that is, a regional convolutional neural network. The main idea of target detection is to generate a candidate region, which may have a target, and then determine whether the region has a detection target by means of CNN, classifier, etc. and classify the region. The target identification of the R-CNN is mainly divided into four steps: generating about 1000-2000 candidate regions in each image of a valid sample training set for identification; and then extracting the feature vector of each candidate region by using a convolutional neural network, classifying each candidate region according to the feature vector, and finally adjusting the detection frame by using a frame Regression Box Regression to output the target frame of each feature image, thereby completing target detection.
In this optional embodiment, images in the sample training set may be sequentially input into a preset target detection model according to the label value category for training, a mean square error between a target frame output by each target detection model and a corresponding label value calculated by a mean square error loss function is used as a total loss in each training process, the training process of target detection is optimized by continuously reducing the total loss in each training process, and the training is finished until the final total loss is 0, so as to obtain a trained target detection model.
In an optional embodiment, the detection unit 115 is configured to perform target detection based on the trained target detection model to obtain a target detection result.
In this alternative embodiment, a trained target detection model may be used to perform target detection on a sample image acquired in real time to obtain a target detection result.
According to the technical scheme, the collected sample images are labeled and then classified to obtain the classified image set, similarity calculation is carried out on all images in the classified image set of each type, and the images are superposed on the basis of the similarity to obtain the target balance image and then combined, so that a large number of training images are generated according to a small number of training samples, and the accuracy of the target detection model for detecting the new type of targets is improved.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. The electronic device 1 comprises a memory 12 and a processor 13. The memory 12 is used for storing computer readable instructions, and the processor 13 is used for executing the computer readable instructions stored in the memory to implement the artificial intelligence based target detection sample generation method according to any one of the above embodiments.
In an alternative embodiment, the electronic device 1 further comprises a bus, a computer program stored in said memory 12 and executable on said processor 13, such as an artificial intelligence based object detection sample generation program.
Fig. 3 shows only the electronic device 1 with the memory 12 and the processor 13, and it will be understood by those skilled in the art that the structure shown in fig. 3 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
In conjunction with fig. 1, the memory 12 in the electronic device 1 stores a plurality of computer-readable instructions to implement an artificial intelligence based target detection sample generation method, and the processor 13 can execute the plurality of instructions to implement:
acquiring sample images, and preprocessing all the sample images to obtain an optimized sample image set;
labeling all images in the optimized sample image set, and classifying all the labeled images to obtain a classified image set of multiple categories;
respectively calculating image similarity between a target image in a target classified image set and other images in the target classified image set to obtain a target similar image set of the target image, wherein the target classified image set is any one of the classified image sets of all categories, and the target image is any one of the target classified image sets of the corresponding categories;
performing weighted summation on all images in the target similar image set to obtain a target balanced image, wherein the target balanced image corresponds to the target similar image set one by one;
combining the target equilibrium images of each target similar image set of each category to generate a sample training set, and training a preset target detection model based on the sample training set to obtain a trained target detection model;
and carrying out target detection based on the trained target detection model to obtain a target detection result.
Specifically, the specific implementation method of the instruction by the processor 13 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1, which is not described herein again.
It will be understood by those skilled in the art that the schematic diagram is only an example of the electronic device 1, and does not constitute a limitation to the electronic device 1, the electronic device 1 may have a bus-type structure or a star-shaped structure, the electronic device 1 may further include more or less hardware or software than those shown in the figures, or different component arrangements, for example, the electronic device 1 may further include an input and output device, a network access device, etc.
It should be noted that the electronic device 1 is only an example, and other existing or future electronic products, such as those that may be adapted to the present application, should also be included in the scope of protection of the present application, and are included by reference.
Memory 12 includes at least one type of readable storage medium, which may be non-volatile or volatile. The readable storage medium includes flash memory, removable hard disks, multimedia cards, card type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 12 may in some embodiments be an internal storage unit of the electronic device 1, for example a removable hard disk of the electronic device 1. The memory 12 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the electronic device 1. The memory 12 can be used not only for storing application software installed in the electronic device 1 and various types of data, such as codes of an artificial intelligence-based object detection sample generation program, but also for temporarily storing data that has been output or is to be output.
The processor 13 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 13 is a Control Unit (Control Unit) of the electronic device 1, connects various components of the electronic device 1 by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (for example, executing an artificial intelligence based object detection sample generation program and the like) stored in the memory 12 and calling data stored in the memory 12.
The processor 13 executes an operating system of the electronic device 1 and various installed application programs. The processor 13 executes the application program to implement the steps of the various artificial intelligence based target detection sample generation method embodiments described above, such as the steps shown in fig. 1.
Illustratively, the computer program may be partitioned into one or more modules/units, which are stored in the memory 12 and executed by the processor 13 to accomplish the present application. The one or more modules/units may be a series of computer-readable instruction segments capable of performing certain functions, which are used to describe the execution of the computer program in the electronic device 1. For example, the computer program may be divided into an acquisition unit 110, a classification unit 111, a calculation unit 112, an obtaining unit 113, a combination unit 114, a detection unit 115.
The integrated unit implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a computer device, or a network device) or a processor (processor) to execute the portions of the artificial intelligence based target detection sample generation method according to the embodiments of the present application.
The integrated modules/units of the electronic device 1 may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, all or part of the processes in the methods of the embodiments described above may be implemented by a computer program, which may be stored in a computer-readable storage medium and executed by a processor, to implement the steps of the embodiments of the methods described above.
Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), random-access Memory and other Memory, etc.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one arrow is shown in FIG. 3, but this does not indicate only one bus or one type of bus. The bus is arranged to enable connection communication between the memory 12 and at least one processor 13 or the like.
The present application further provides a computer-readable storage medium (not shown), in which computer-readable instructions are stored, and the computer-readable instructions are executed by a processor in an electronic device to implement the artificial intelligence based target detection sample generation method according to any of the foregoing embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
Furthermore, it will be obvious that the term "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the specification may also be implemented by one unit or means through software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present application and not for limiting, and although the present application is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions can be made on the technical solutions of the present application without departing from the spirit and scope of the technical solutions of the present application.

Claims (10)

1. An artificial intelligence-based target detection sample generation method is characterized by comprising the following steps:
acquiring sample images, and preprocessing all the sample images to obtain an optimized sample image set;
labeling all images in the optimized sample image set, and classifying all the labeled images to obtain a classified image set of multiple categories;
respectively calculating image similarity between a target image in a target classified image set and other images in the target classified image set to obtain a target similar image set of the target image, wherein the target classified image set is any one of the classified image sets of all categories, and the target image is any one of the target classified image sets of the corresponding categories;
performing weighted summation on all images in the target similar image set to obtain a target balanced image, wherein the target balanced image corresponds to the target similar image set one by one;
combining the target equilibrium images of each target similar image set of each category to generate a sample training set, and training a preset target detection model based on the sample training set to obtain a trained target detection model;
and carrying out target detection based on the trained target detection model to obtain a target detection result.
2. The method for generating the target detection sample based on artificial intelligence as claimed in claim 1, wherein the acquiring the sample images and preprocessing all the sample images to obtain the optimized sample image set comprises:
collecting sample images, and converting all the sample images into gray level images to obtain a gray level image set;
and performing mean filtering on all the gray level images in the gray level image set to obtain an optimized sample image set.
3. The method for generating target detection samples based on artificial intelligence of claim 1, wherein the labeling all the images in the optimized sample image set and classifying all the labeled images to obtain classified image sets of multiple categories comprises:
performing framing on all images in the optimized sample image set according to a preset mode to obtain target frame images, and labeling different label values for the target frame images of different types;
and classifying all the target frame images according to the category of the label value to obtain a plurality of categories of classified image sets, wherein each classified image set comprises a plurality of target frame images of the same label value category.
4. The method as claimed in claim 1, wherein the step of separately calculating image similarities between the target image in the target classified image set and other images in the target classified image set to obtain a target similar image set of the target image, the target classified image set being any one of the classified image sets of all categories, and the target image being any one of the target classified image sets of corresponding categories, comprises:
respectively calculating image similarity between a target image in a target classified image set and other images in the target classified image set;
calculating an image similarity threshold of the target image based on all image similarities corresponding to the target image, and screening images in the target classification image set based on the image similarity threshold to obtain a target similar image set, wherein the target similar image set corresponds to the target image one by one;
and traversing all the images in the classified image sets of all the classes and all the images in the classified image set of each class to obtain a target similar image set of each image in the classified image set of each class.
5. The method as claimed in claim 4, wherein the step of calculating an image similarity threshold based on all image similarities corresponding to the target image and screening the images in the target classified image set based on the image similarity threshold to obtain a target similar image set comprises:
calculating all image similarities corresponding to the target image according to a maximum inter-class variance method to obtain an image similarity threshold;
and reserving all image similarities which are larger than the image similarity threshold value and correspond to the target image, and taking all images corresponding to the reserved image similarities as a target similar image set of the target image.
6. The artificial intelligence based target detection sample generation method according to claim 1, wherein the weighted summation of all the images in the target similar image set to obtain a target equilibrium image, the target equilibrium image corresponding to the target similar image set one by one, includes:
taking the image similarity of each image in the target similar image set and the target image as the similarity weight corresponding to each image in the target similar image set;
normalizing the similarity weight corresponding to each image in the target similar image set to obtain a normalized similarity weight corresponding to each image;
and carrying out weighted summation on each image in the target similar image set and the normalized similarity weight corresponding to each image to obtain a target balanced image of the target similar image set.
7. The method for generating target detection samples based on artificial intelligence as claimed in claim 1, wherein the combining the target equalization images of the respective target similar image sets of each category to generate a sample training set, and training a preset target detection model based on the sample training set to obtain a trained target detection model comprises:
combining all target equilibrium images in the target classification image set to obtain a target sample training set;
traversing all classes of classified image sets, and taking all obtained target sample sets as sample training sets;
and training a preset target detection model based on the sample training set to obtain a trained target detection model.
8. An artificial intelligence based target detection sample generation apparatus, the apparatus comprising:
the acquisition unit is used for acquiring sample images and preprocessing all the sample images to obtain an optimized sample image set;
the classification unit is used for labeling all the images in the optimized sample image set and classifying all the labeled images to obtain a classified image set of multiple categories;
the calculation unit is used for respectively calculating the image similarity between a target image in a target classified image set and other images in the target classified image set to obtain a target similar image set of the target image, wherein the target classified image set is any one of the classified image sets of all categories, and the target image is any one of the target classified image sets of the corresponding categories;
the obtaining unit is used for carrying out weighted summation on all images in the target similar image set to obtain a target balanced image, and the target balanced image corresponds to the target similar image set one by one;
the combination unit is used for combining the target equilibrium images of each target similar image set of each category to generate a sample training set, and training a preset target detection model based on the sample training set to obtain a trained target detection model;
and the detection unit is used for carrying out target detection based on the trained target detection model to obtain a target detection result.
9. An electronic device, characterized in that the electronic device comprises:
a memory storing computer readable instructions; and
a processor executing computer readable instructions stored in the memory to implement the artificial intelligence based target detection sample generation method of any one of claims 1 to 7.
10. A computer-readable storage medium having computer-readable instructions stored thereon, which when executed by a processor implement the artificial intelligence based target detection sample generation method of any one of claims 1 to 7.
CN202210690639.1A 2022-06-17 2022-06-17 Target detection sample generation method based on artificial intelligence and related equipment Pending CN114972883A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210690639.1A CN114972883A (en) 2022-06-17 2022-06-17 Target detection sample generation method based on artificial intelligence and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210690639.1A CN114972883A (en) 2022-06-17 2022-06-17 Target detection sample generation method based on artificial intelligence and related equipment

Publications (1)

Publication Number Publication Date
CN114972883A true CN114972883A (en) 2022-08-30

Family

ID=82964129

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210690639.1A Pending CN114972883A (en) 2022-06-17 2022-06-17 Target detection sample generation method based on artificial intelligence and related equipment

Country Status (1)

Country Link
CN (1) CN114972883A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150186742A1 (en) * 2013-12-27 2015-07-02 Xerox Corporation Weighting scheme for pooling image descriptors
CN108985190A (en) * 2018-06-28 2018-12-11 北京市商汤科技开发有限公司 Target identification method and device, electronic equipment, storage medium, program product
CN110210560A (en) * 2019-05-31 2019-09-06 北京市商汤科技开发有限公司 Increment training method, classification method and the device of sorter network, equipment and medium
CN111079833A (en) * 2019-12-16 2020-04-28 腾讯科技(深圳)有限公司 Image recognition method, image recognition device and computer-readable storage medium
CN111626371A (en) * 2020-05-29 2020-09-04 歌尔科技有限公司 Image classification method, device and equipment and readable storage medium
AU2020103613A4 (en) * 2020-11-23 2021-02-04 Agricultural Information and Rural Economic Research Institute of Sichuan Academy of Agricultural Sciences Cnn and transfer learning based disease intelligent identification method and system
CN112861975A (en) * 2021-02-10 2021-05-28 北京百度网讯科技有限公司 Generation method of classification model, classification method, device, electronic equipment and medium
CN112926654A (en) * 2021-02-25 2021-06-08 平安银行股份有限公司 Pre-labeling model training and certificate pre-labeling method, device, equipment and medium
CN113806613A (en) * 2021-09-29 2021-12-17 中国平安人寿保险股份有限公司 Training image set generation method and device, computer equipment and storage medium
WO2022062243A1 (en) * 2020-09-25 2022-03-31 上海商汤智能科技有限公司 Target re-identification method and apparatus, device, storage medium and program product
CN114373081A (en) * 2021-12-17 2022-04-19 东软睿驰汽车技术(沈阳)有限公司 Image processing method and device, electronic device and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150186742A1 (en) * 2013-12-27 2015-07-02 Xerox Corporation Weighting scheme for pooling image descriptors
CN108985190A (en) * 2018-06-28 2018-12-11 北京市商汤科技开发有限公司 Target identification method and device, electronic equipment, storage medium, program product
CN110210560A (en) * 2019-05-31 2019-09-06 北京市商汤科技开发有限公司 Increment training method, classification method and the device of sorter network, equipment and medium
CN111079833A (en) * 2019-12-16 2020-04-28 腾讯科技(深圳)有限公司 Image recognition method, image recognition device and computer-readable storage medium
CN111626371A (en) * 2020-05-29 2020-09-04 歌尔科技有限公司 Image classification method, device and equipment and readable storage medium
WO2022062243A1 (en) * 2020-09-25 2022-03-31 上海商汤智能科技有限公司 Target re-identification method and apparatus, device, storage medium and program product
AU2020103613A4 (en) * 2020-11-23 2021-02-04 Agricultural Information and Rural Economic Research Institute of Sichuan Academy of Agricultural Sciences Cnn and transfer learning based disease intelligent identification method and system
CN112861975A (en) * 2021-02-10 2021-05-28 北京百度网讯科技有限公司 Generation method of classification model, classification method, device, electronic equipment and medium
CN112926654A (en) * 2021-02-25 2021-06-08 平安银行股份有限公司 Pre-labeling model training and certificate pre-labeling method, device, equipment and medium
CN113806613A (en) * 2021-09-29 2021-12-17 中国平安人寿保险股份有限公司 Training image set generation method and device, computer equipment and storage medium
CN114373081A (en) * 2021-12-17 2022-04-19 东软睿驰汽车技术(沈阳)有限公司 Image processing method and device, electronic device and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王博威等: "少量样本下基于孪生CNN的SAR目标识别", 雷达科学与技术, no. 06, 31 December 2019 (2019-12-31), pages 17 - 23 *

Similar Documents

Publication Publication Date Title
Pereira et al. A deep learning-based approach for road pothole detection in timor leste
CN110569878B (en) Photograph background similarity clustering method based on convolutional neural network and computer
RU2427911C1 (en) Method to detect faces on image using classifiers cascade
CN111160249A (en) Multi-class target detection method of optical remote sensing image based on cross-scale feature fusion
Jaiswal et al. Detection of copy-move forgery in digital image using multi-scale, multi-stage deep learning model
CN109934081A (en) A kind of pedestrian's attribute recognition approach, device and storage medium based on deep neural network
CN113705462B (en) Face recognition method, device, electronic equipment and computer readable storage medium
US11783384B2 (en) Computer vision systems and methods for automatically detecting, classifying, and pricing objects captured in images or videos
Veres et al. Choosing the Method of Finding Similar Images in the Reverse Search System.
CN110008899B (en) Method for extracting and classifying candidate targets of visible light remote sensing image
CN108323209A (en) Information processing method, system, cloud processing device and computer program product
CN115063632A (en) Vehicle damage identification method, device, equipment and medium based on artificial intelligence
CN114419363A (en) Target classification model training method and device based on label-free sample data
CN112132812A (en) Certificate checking method and device, electronic equipment and medium
CN116541545A (en) Method, device, equipment and storage medium for identifying flip image
CN110210561B (en) Neural network training method, target detection method and device, and storage medium
JP7355299B2 (en) Learning dataset generation system, learning server, and learning dataset generation program
CN115131564A (en) Vehicle component damage detection method based on artificial intelligence and related equipment
CN114972883A (en) Target detection sample generation method based on artificial intelligence and related equipment
KR20200124887A (en) Method and Apparatus for Creating Labeling Model with Data Programming
CN113627576B (en) Code scanning information detection method, device, equipment and storage medium
CN113033305B (en) Living body detection method, living body detection device, terminal equipment and storage medium
CN113255766B (en) Image classification method, device, equipment and storage medium
CN117173075A (en) Medical image detection method and related equipment
CN114332993A (en) Face recognition method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination