CN113221918B - Object detection method, object detection model training method and device - Google Patents
Object detection method, object detection model training method and device Download PDFInfo
- Publication number
- CN113221918B CN113221918B CN202110540636.5A CN202110540636A CN113221918B CN 113221918 B CN113221918 B CN 113221918B CN 202110540636 A CN202110540636 A CN 202110540636A CN 113221918 B CN113221918 B CN 113221918B
- Authority
- CN
- China
- Prior art keywords
- image
- target
- target object
- detected
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/44—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/58—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
- G06F16/583—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4038—Image mosaicing, e.g. composing plane images from plane sub-images
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2200/00—Indexing scheme for image data processing or generation, in general
- G06T2200/32—Indexing scheme for image data processing or generation, in general involving image mosaicing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/62—Text, e.g. of license plates, overlay texts or captions on TV images
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Biomedical Technology (AREA)
- Library & Information Science (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Biophysics (AREA)
- Software Systems (AREA)
- Multimedia (AREA)
- Databases & Information Systems (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Image Analysis (AREA)
Abstract
本公开提供了一种目标检测方法、目标检测模型的训练方法及装置,涉及人工智能技术领域。方法包括:获取待检测图像;将待检测图像输入预先训练的目标检测模型,得到待检测图像对应的目标检测结果;在目标检测结果满足预设条件的情况下,获取目标检测结果中的位置框信息;其中,预设条件为目标检测结果中包含位置框信息,且目标检测结果对应的置信度小于预设的置信度阈值;基于位置框信息对目标检测结果进行校验,得到待检测图像对应的目标校验结果。本公开技术方案中,在目标检测模型输出的目标检测结果中,对于包含位置框信息,且置信度小于预设的置信度阈值的目标检测结果进行校验,以提升图像审核的准确率和包含目标对象的图像的召回率。
The disclosure provides a target detection method, a target detection model training method and a device, and relates to the technical field of artificial intelligence. The method includes: obtaining an image to be detected; inputting the image to be detected into a pre-trained target detection model to obtain a target detection result corresponding to the image to be detected; when the target detection result satisfies a preset condition, obtaining a position box in the target detection result information; wherein, the preset condition is that the target detection result contains location frame information, and the confidence corresponding to the target detection result is less than the preset confidence threshold; the target detection result is verified based on the location frame information, and the image corresponding to the image to be detected is obtained. The target verification result of . In the technical solution of the present disclosure, among the target detection results output by the target detection model, the target detection results containing the location frame information and whose confidence is less than the preset confidence threshold are verified, so as to improve the accuracy of image review and contain The recall rate of the image of the target object.
Description
技术领域technical field
本公开涉及人工智能技术领域,尤其涉及机器学习领域。The present disclosure relates to the technical field of artificial intelligence, in particular to the field of machine learning.
背景技术Background technique
随着电子商务的兴起,商家广告宣传手段日益多样,丰富的图片宣传为广告宣传的重要手段。现实广告物料推广过程中,存在商家在图文宣传过程中,违规发布包含特定目标的图像的情况,需要对商家广告物料中提供的图片进行审核,现有技术中的内容审核方案准确率较低,无法满足实际需要。With the rise of e-commerce, business advertising methods are becoming more and more diverse, and rich image promotion is an important means of advertising. In the promotion process of actual advertising materials, there are cases where merchants publish images containing specific targets in violation of regulations in the process of graphic and text promotion, and it is necessary to review the pictures provided in the advertising materials of merchants. The accuracy rate of the content review scheme in the prior art is low , unable to meet the actual needs.
发明内容Contents of the invention
本公开提供了一种目标检测方法、目标检测模型的训练方法、装置、设备以及存储介质。The disclosure provides a target detection method, a target detection model training method, a device, a device, and a storage medium.
根据本公开的一方面,提供了一种目标检测方法,包括:According to an aspect of the present disclosure, a target detection method is provided, including:
获取待检测图像;Obtain the image to be detected;
将待检测图像输入预先训练的目标检测模型,得到待检测图像对应的目标检测结果;Input the image to be detected into the pre-trained target detection model to obtain the target detection result corresponding to the image to be detected;
在目标检测结果满足预设条件的情况下,获取目标检测结果中的位置框信息;其中,预设条件为目标检测结果中包含位置框信息,且目标检测结果对应的置信度小于预设的置信度阈值;When the target detection result satisfies the preset condition, obtain the location frame information in the target detection result; where the preset condition is that the target detection result contains the location frame information, and the confidence corresponding to the target detection result is less than the preset confidence degree threshold;
基于位置框信息对目标检测结果进行校验,得到待检测图像对应的目标校验结果。The target detection result is verified based on the position frame information, and the target verification result corresponding to the image to be detected is obtained.
根据本公开的另一方面,提供了一种目标检测模型的训练方法,包括:According to another aspect of the present disclosure, a method for training a target detection model is provided, including:
获取多组第一训练样本数据,基于多组第一训练样本数据对初始目标检测模型进行训练,直到满足预设的训练结束条件,得到本公开任一实施例的目标检测模型;Obtain multiple sets of first training sample data, and train the initial target detection model based on the multiple sets of first training sample data until a preset training end condition is met, to obtain the target detection model of any embodiment of the present disclosure;
其中,第一训练样本数据包括第一样本图像以及第一样本图像对应的第一样本标签,第一样本标签用于表征第一样本图像中是否包含目标对象以及目标对象的位置框信息,第一样本图像包括拼接图像;拼接图像是基于目标对象图像和相似目标图像进行拼接得到的,目标对象图像为包含目标对象的图像,相似目标图像是包含相似目标对象的图像,相似目标对象与目标对象的相似度在预设范围内。Wherein, the first training sample data includes the first sample image and the first sample label corresponding to the first sample image, and the first sample label is used to represent whether the first sample image contains the target object and the position of the target object frame information, the first sample image includes a mosaic image; the mosaic image is obtained by stitching based on the target object image and similar target images, the target object image is an image containing the target object, the similar target image is an image containing similar target objects, and the similar The similarity between the target object and the target object is within a preset range.
根据本公开的另一方面,提供了一种目标检测装置,包括:According to another aspect of the present disclosure, a target detection device is provided, including:
检测图像获取模块,用于获取待检测图像;The detection image acquisition module is used to obtain the image to be detected;
目标检测模块,用于将待检测图像输入预先训练的目标检测模型,得到待检测图像对应的目标检测结果;The target detection module is used to input the image to be detected into the pre-trained target detection model to obtain the target detection result corresponding to the image to be detected;
位置框获取模块,用于在目标检测结果满足预设条件的情况下,获取目标检测结果中的位置框信息;其中,预设条件为目标检测结果中包含位置框信息,且目标检测结果对应的置信度小于预设的置信度阈值;The position frame acquisition module is used to obtain the position frame information in the target detection result when the target detection result meets the preset condition; wherein, the preset condition is that the target detection result contains the position frame information, and the target detection result corresponds to The confidence level is less than the preset confidence level threshold;
结果校验模块,用于基于位置框信息对目标检测结果进行校验,得到待检测图像对应的目标校验结果。The result verification module is configured to verify the target detection result based on the location frame information, and obtain the target verification result corresponding to the image to be detected.
根据本公开的另一方面,提供了一种目标检测模型的训练装置,包括:According to another aspect of the present disclosure, a training device for a target detection model is provided, including:
样本获取模块,用于获取多组第一训练样本数据;A sample acquisition module, configured to acquire multiple sets of first training sample data;
模型训练模块,用于基于多组第一训练样本数据对初始目标检测模型进行训练,直到满足预设的训练结束条件,得到本公开任一实施例的目标检测模型;A model training module, configured to train an initial target detection model based on multiple sets of first training sample data, until a preset training end condition is met, to obtain the target detection model of any embodiment of the present disclosure;
其中,第一训练样本数据包括第一样本图像以及第一样本图像对应的第一样本标签,第一样本标签用于表征第一样本图像中是否包含目标对象以及目标对象的位置框信息,第一样本图像包括拼接图像;拼接图像是基于目标对象图像和相似目标图像进行拼接得到的,目标对象图像为包含目标对象的图像,相似目标图像是包含相似目标对象的图像,相似目标对象与目标对象的相似度在预设范围内。Wherein, the first training sample data includes the first sample image and the first sample label corresponding to the first sample image, and the first sample label is used to represent whether the first sample image contains the target object and the position of the target object frame information, the first sample image includes a mosaic image; the mosaic image is obtained by stitching based on the target object image and similar target images, the target object image is an image containing the target object, the similar target image is an image containing similar target objects, and the similar The similarity between the target object and the target object is within a preset range.
根据本公开的另一方面,提供了一种电子设备,包括:According to another aspect of the present disclosure, an electronic device is provided, including:
至少一个处理器;以及at least one processor; and
与该至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
该存储器存储有可被该至少一个处理器执行的指令,该指令被该至少一个处理器执行,以使该至少一个处理器能够执行本公开任一实施例中的方法。The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the method in any embodiment of the present disclosure.
根据本公开的另一方面,提供了一种存储有计算机指令的非瞬时计算机可读存储介质,该计算机指令用于使计算机执行本公开任一实施例中的方法。According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method in any embodiment of the present disclosure.
根据本公开的另一方面,提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现本公开任一实施例中的方法。According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method in any embodiment of the present disclosure is implemented.
本公开技术方案解决了现有技术中的内容审核方案审核准确率低的问题。本公开技术方案中的目标检测方法,在目标检测模型输出的目标检测结果中,对于包含位置框信息,且置信度小于预设的置信度阈值的目标检测结果进行校验,以提升图像审核的准确率和包含目标对象的图像的召回率。The disclosed technical solution solves the problem of low review accuracy in the content review solution in the prior art. In the target detection method in the disclosed technical solution, in the target detection results output by the target detection model, the target detection results containing position frame information and whose confidence level is less than the preset confidence level threshold are verified, so as to improve the accuracy of image review. Precision and recall for images containing the target object.
应当理解,本部分所描述的内容并非旨在标识本公开的实施例的关键或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的说明书而变得容易理解。It should be understood that what is described in this section is not intended to identify key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will be readily understood through the following description.
附图说明Description of drawings
附图用于更好地理解本方案,不构成对本公开的限定。其中:The accompanying drawings are used to better understand the present solution, and do not constitute a limitation to the present disclosure. in:
图1为本公开一实施例中目标检测方法的示意图;FIG. 1 is a schematic diagram of a target detection method in an embodiment of the present disclosure;
图2为本公开一实施例中目标检测模型的训练样本的获取过程的示意图;2 is a schematic diagram of the process of obtaining training samples of a target detection model in an embodiment of the present disclosure;
图3为本公开一实施例中目标检测模型的迭代过程的示意图;FIG. 3 is a schematic diagram of an iterative process of a target detection model in an embodiment of the present disclosure;
图4为本公开一实施例中图像审核系统的示意图;FIG. 4 is a schematic diagram of an image review system in an embodiment of the present disclosure;
图5为本公开一实施例中目标检测模型的训练方法的示意图;5 is a schematic diagram of a training method for a target detection model in an embodiment of the present disclosure;
图6为本公开一实施例中目标检测装置的示意图;6 is a schematic diagram of a target detection device in an embodiment of the present disclosure;
图7为本公开一实施例中样本更新模块的示意图;7 is a schematic diagram of a sample update module in an embodiment of the present disclosure;
图8为本公开一实施例中目标检测模型的训练装置的示意图;8 is a schematic diagram of a training device for a target detection model in an embodiment of the present disclosure;
图9是用来实现本公开实施例的目标检测方法的电子设备的框图。FIG. 9 is a block diagram of an electronic device used to implement the object detection method of the embodiment of the present disclosure.
具体实施方式Detailed ways
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and they should be regarded as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
相关技术中,对图像中的内容进行目标检测时,一般通过以下两种方式:In related technologies, when performing target detection on content in an image, the following two methods are generally used:
一种方式是采用滑动窗口的方式进行目标区域提取与目标搜索。针对多类别的目标识别,采用基于方向梯度直方图(Histogram of Oriented Gradient,HOG)、尺度不变特征变换(Scale-invariant feature transform,SIFT)等特征提取方式提取特征,并训练基于自适应增强(Adaptive boosting,Adaboost)算法以及支持向量机(Support VectorMachine,SVM)等传统机器学习分类器来确定图像中是否包含目标。采用这种方式进行目标检测鲁棒性较差,识别精度低、速度慢,难以满足内容审核时延和精确度的要求。One way is to use a sliding window method for target area extraction and target search. For multi-category target recognition, features are extracted based on histogram of oriented gradient (Histogram of Oriented Gradient, HOG), scale-invariant feature transform (Scale-invariant feature transform, SIFT) and other feature extraction methods, and training based on adaptive enhancement ( Adaptive boosting, Adaboost) algorithm and support vector machine (Support Vector Machine, SVM) and other traditional machine learning classifiers to determine whether the image contains the target. Using this method for target detection has poor robustness, low recognition accuracy and slow speed, and it is difficult to meet the requirements of content review delay and accuracy.
另一种方式是基于深度学习目标检测方案检测目标,通过收集大量包含目标的图像数据,并人工标注各类目标的检测位置信息,通过训练好的模型识别目标的区域并记录回归框的位置,通过类别阈值确定检测结果。这种目标检测方式依赖大量的标注数据进行目标检测模型训练,标注数据收集难度大,通过收集到的背景单一的数据,所训练的模型在风险数据极度稀疏的场景下准确率与召回率偏低,无法满足高召回与高准确率的内容审核要求。对于某些类别日常出现机会少的目标对象,可收集的数据完全无法达到目标检测模型可训练的量级。另外,对于特定场景需要豁免审核的目标对象,无法满足实际需求。Another way is to detect targets based on the deep learning target detection scheme. By collecting a large amount of image data containing targets, and manually marking the detection position information of various targets, the trained model identifies the target area and records the position of the regression frame. Detections are determined by class thresholding. This target detection method relies on a large amount of labeled data for target detection model training, and the collection of labeled data is difficult. Through the collected data with a single background, the accuracy and recall of the trained model are low in scenarios where risk data is extremely sparse. , unable to meet the content review requirements of high recall and high accuracy. For certain categories of target objects that have few chances of daily occurrence, the data that can be collected cannot reach the level that the target detection model can train. In addition, the actual needs cannot be met for target objects that need to be exempted from auditing in specific scenarios.
本公开技术方案中,在目标检测模型输出的目标检测结果中,对于包含位置框信息,且置信度小于预设的置信度阈值的目标检测结果进行校验,以提升图像审核的准确率和包含目标对象的图像的召回率。通过利用目标对象图像和相似目标对象图像进行拼接,得到的拼接图像作为训练样本,可以丰富模型的训练样本数据。通过审核豁免机制,满足特定场景下待检测图像的审核豁免需求。In the technical solution of the present disclosure, among the target detection results output by the target detection model, the target detection results containing the location frame information and whose confidence is less than the preset confidence threshold are verified, so as to improve the accuracy of image review and contain The recall rate of the image of the target object. By splicing target object images and similar target object images, the spliced images obtained are used as training samples, which can enrich the training sample data of the model. Through the audit exemption mechanism, the audit exemption requirements of images to be detected in specific scenarios are met.
本公开的执行主体可以是任一电子设备,例如,服务器等。以下将详细介绍本公开实施例中的目标检测方法。The subject of execution of the present disclosure may be any electronic device, for example, a server or the like. The target detection method in the embodiment of the present disclosure will be introduced in detail below.
图1为本公开一实施例中目标检测方法的示意图。如图1所示,目标检测方法可以包括:FIG. 1 is a schematic diagram of a target detection method in an embodiment of the present disclosure. As shown in Figure 1, object detection methods can include:
步骤S101,获取待检测图像;Step S101, acquiring an image to be detected;
步骤S102,将待检测图像输入预先训练的目标检测模型,得到待检测图像对应的目标检测结果;Step S102, input the image to be detected into the pre-trained target detection model, and obtain the target detection result corresponding to the image to be detected;
步骤S103,在目标检测结果满足预设条件的情况下,获取目标检测结果中的位置框信息;其中,预设条件为目标检测结果中包含位置框信息,且目标检测结果对应的置信度小于预设的置信度阈值。Step S103, when the target detection result satisfies the preset condition, acquire the location frame information in the target detection result; wherein, the preset condition is that the target detection result contains the location frame information, and the confidence degree corresponding to the target detection result is less than the preset set the confidence threshold.
步骤S104,基于位置框信息对目标检测结果进行校验,得到待检测图像对应的目标校验结果。In step S104, the target detection result is verified based on the position frame information, and the target verification result corresponding to the image to be detected is obtained.
本公开实施例的目标检测方法,在目标检测模型输出的目标检测结果中,对于包含位置框信息,且置信度小于预设的置信度阈值的目标检测结果进行校验,以提升图像审核的准确率和包含目标对象的图像的召回率。In the target detection method of the embodiment of the present disclosure, in the target detection results output by the target detection model, the target detection results containing the location frame information and whose confidence is less than the preset confidence threshold are verified, so as to improve the accuracy of image review rate and recall of images containing the target object.
在一种实施方式中,例如,图像审核的应用场景中,待检测图像可以是需要进行内容审核的图像。图像中可能包括审核不能通过的任意目标对象,目标对象可包括徽章图像。另外,待检测图像还可以是其他需要进行目标检测的应用场景中的图像,本申请对此不做限定。In an implementation manner, for example, in an application scenario of image review, the image to be detected may be an image requiring content review. The image may include any target object that cannot be approved, and the target object can include a badge image. In addition, the image to be detected may also be an image in other application scenarios requiring target detection, which is not limited in this application.
在一种实施方式中,目标检测模型可以是任意神经网络模型,包括但不限于:In one embodiment, the target detection model can be any neural network model, including but not limited to:
快速区域卷积神经网络(faster region-convolution neural network,FasterRCNN)、单步多框检测器(Single Shot MultiBox Detector,SSD)、Yolo(You Only LookOnce)等目标检测算法。Target detection algorithms such as fast region-convolution neural network (FasterRCNN), Single Shot MultiBox Detector (SSD), Yolo (You Only LookOnce), etc.
在一种实施方式中,目标检测模型输出的目标检测结果可以包括是否包含目标对象的指示信息,例如,通过数字0来表示不包含目标对象,通过数字1来表示包含目标对象。也可以通过其他方式表示待检测图像中是否包含目标对象,本申请对象不做限定。如果目标检测结果包含目标对象,则输出目标对象在待检测图像中的位置框信息以及目标检测结果对应的置信度。其中,位置框信息包括但不限于位置框的坐标信息等。In one embodiment, the target detection result output by the target detection model may include indication information whether the target object is included, for example, the number 0 indicates that the target object is not included, and the number 1 indicates that the target object is included. Other methods may also be used to indicate whether the image to be detected contains the target object, which is not limited in this application. If the target detection result contains the target object, output the location frame information of the target object in the image to be detected and the confidence corresponding to the target detection result. Wherein, the location frame information includes but not limited to coordinate information of the location frame and the like.
在一种实施方式中,根据具体需要预先配置置信度阈值,若目标检测结果对应的置信度小于置信度阈值,则可以根据位置框信息,在待检测图像中确定出位置框对应框出的图像,进行校验,进一步确定待检测图像中是否包含目标对象,以提高目标检测的准确率和召回率。In one embodiment, the confidence threshold is pre-configured according to specific needs. If the confidence corresponding to the target detection result is less than the confidence threshold, the image corresponding to the position frame can be determined in the image to be detected according to the position frame information. , to perform verification, and further determine whether the target object is included in the image to be detected, so as to improve the accuracy and recall rate of target detection.
在一种实施方式中,目标检测模型是采用多组第一训练样本数据对初始目标检测模型进行训练得到的,第一训练样本数据包括第一样本图像以及第一样本图像对应的第一样本标签,第一样本标签用于表征第一样本图像中是否包含目标对象以及目标对象的位置框信息;第一样本图像包括拼接图像;拼接图像是基于目标对象图像和相似目标图像进行拼接得到的,目标对象图像为包含目标对象的图像,相似目标图像是包含相似目标对象的图像,相似目标对象与目标对象的相似度在预设范围内。In one embodiment, the target detection model is obtained by using multiple sets of first training sample data to train the initial target detection model. The first training sample data includes the first sample image and the first sample image corresponding to the first sample image. Sample label, the first sample label is used to represent whether the first sample image contains the target object and the location frame information of the target object; the first sample image includes a stitched image; the stitched image is based on the target object image and similar target images In the splicing, the target object image is an image containing the target object, the similar target image is an image containing the similar target object, and the similarity between the similar target object and the target object is within a preset range.
其中,目标对象可以是徽章类对象,则相似目标对象可以是与徽章形状或颜色相类似的目标,例如,手表、圆形图标等。可选的,可以通过在预设的数据库中或者常用的搜索引擎中获取目标对象图像以及相似目标对象图像。Wherein, the target object may be a badge-like object, and the similar target object may be a target similar in shape or color to the badge, for example, a watch, a circular icon, and the like. Optionally, the target object images and similar target object images may be obtained from a preset database or a commonly used search engine.
在一些实施例中,对于识别徽章类目标的目标检测模型,在获取训练数据时,对于不常见的徽章图像,获取大量的相关的训练数据的难度较大,可以通过图像拼接的方式,得到更多该类型徽章图像作为训练数据。In some embodiments, for a target detection model that recognizes badge targets, when acquiring training data, it is difficult to acquire a large amount of relevant training data for uncommon badge images, and a more accurate model can be obtained by image splicing. Multiple badge images of this type are used as training data.
可以理解的是,目标检测模型的训练样本数据除了拼接图像之外,还可以包括目标对象图像、相似目标对象图像等大量多个类型的图像。It can be understood that, in addition to stitched images, the training sample data of the target detection model may also include a large number of multiple types of images such as target object images and similar target object images.
本公开实施例中,通过利用目标对象图像和相似目标对象图像进行拼接得到的拼接图像作为训练样本,可以增加训练样本的数量和丰富性,通过丰富的训练样本图像进行模型训练,可以使得模型学习到更多的信息,以提升训练完成的目标检测模型的检测准确率。In the embodiment of the present disclosure, the number and richness of training samples can be increased by using the spliced images obtained by splicing target object images and similar target object images as training samples, and model training can be carried out through rich training sample images, which can make the model learn Get more information to improve the detection accuracy of the trained target detection model.
在一种实施方式中,拼接图像是通过以下方式得到的:In one embodiment, the spliced image is obtained in the following manner:
将目标对象图像按照预设方式进行处理,得到处理后图像;预设方式包括锐化、添加噪声、滤波、颜色抖动、随机填充和透视变换中的至少一项;Processing the image of the target object according to a preset method to obtain a processed image; the preset method includes at least one of sharpening, adding noise, filtering, color dithering, random filling and perspective transformation;
将处理后图像作为前景图,将相似目标图像作为背景图,进行拼接处理。The processed image is used as the foreground image, and the similar target image is used as the background image for splicing.
需要说明的是,预设方式还可以是其他任意的图像处理方式,本申请对此不做限定。It should be noted that the preset manner may also be any other image processing manner, which is not limited in this application.
本公开实施例中,通过将目标对象按照不同方式进行处理,得到每种处理方式处理后的图像,再进行图像拼接,将拼接图像作为训练样本,可以增加训练样本的数量和丰富性。In the embodiment of the present disclosure, the target object is processed in different ways to obtain images processed by each processing method, and then image stitching is performed, and the stitched images are used as training samples, which can increase the number and richness of training samples.
在一种实施方式中,目标检测方法还包括:In one embodiment, the target detection method also includes:
对初始目标检测模型进行训练过程中,获取多个测试样本图像,将测试样本图像输入模型,得到测试样本图像对应的输出结果;During the training process of the initial target detection model, multiple test sample images are obtained, and the test sample images are input into the model to obtain output results corresponding to the test sample images;
将目标对象图像和测试样本图像对应的输出结果中检测错误的结果对应的图像进行拼接处理,得到新的拼接图像,检测错误的结果为将不包含目标对象的图像检测为包含目标对象的结果;The image corresponding to the detection error result in the output results corresponding to the target object image and the test sample image is spliced to obtain a new spliced image, and the detection error result is the result of detecting an image that does not contain the target object as containing the target object;
获取新的拼接图像的标注标签;Obtain the annotation label of the new stitched image;
利用新的拼接图像和标注标签更新第一训练样本数据。The first training sample data is updated with new stitched images and annotation labels.
其中,对初始目标检测模型进行训练过程中,还可以在预设的图像数据库中获取测试样本图像,输入模型进行测试。利用模型输出的检测错误的结果对应的图像作为背景图像,与目标对象图像进行拼接,得到新的拼接图像,添加到模型的训练样本数据库中。其中的模型可以是训练过程中通过不断迭代,对初始目标检测模型的参数调整之后的模型,此时的模型还没有满足训练结束条件,不是最终训练完成的目标检测模型。Wherein, during the training process of the initial target detection model, a test sample image may also be obtained from a preset image database and input into the model for testing. The image corresponding to the detection error result output by the model is used as the background image, and is stitched with the target object image to obtain a new stitched image, which is added to the training sample database of the model. The model can be a model after adjusting the parameters of the initial target detection model through continuous iterations during the training process. The model at this time has not yet met the training end condition, and is not the target detection model that is finally trained.
在一些实施例中,新的拼接图像的标注标签可以是人工标注的标签,也可以是其他方式获取到的标签,本申请对此不做限定。In some embodiments, the tagged label of the new spliced image may be a manually tagged tag, or a tag obtained in other ways, which is not limited in this application.
本公开实施例中,通过模型迭代过程中的测试样本图像对应的检测错误结果对应的图像,和目标对象图像进行拼接得到的新的拼接图像,来增加模型的训练样本数据,可以实现训练样本数据的扩增。In the embodiment of the present disclosure, the training sample data of the model can be increased by splicing the image corresponding to the detection error result corresponding to the test sample image in the model iteration process and the target object image, so that the training sample data can be realized. expansion.
在一种实施方式中,基于位置框信息对目标检测结果进行校验,得到待检测图像对应的目标校验结果,包括:In one embodiment, the target detection result is verified based on the position frame information, and the target verification result corresponding to the image to be detected is obtained, including:
基于位置框信息,在待检测图像中获取位置框对应的图像;Based on the position frame information, an image corresponding to the position frame is acquired in the image to be detected;
将位置框对应的图像输入预先训练的第一分类模型,得到分类结果,待检测图像对应的目标校验结果包括分类结果。The image corresponding to the location frame is input into the pre-trained first classification model to obtain a classification result, and the target verification result corresponding to the image to be detected includes the classification result.
其中,第一分类模型可以包括但不限于深度卷积分类模型,ResNet模型、Inception模型、VGG模型等分类模型。可选的,分类结果可以是包含目标对象或者不包含目标对象,也可以是包含目标对象或者不包含目标对象的概率,本申请对此不做限定。可选的,可以将分类结果作为最终的目标校验结果,从而确定待检测图像是否是审核通过图像。Wherein, the first classification model may include but not limited to classification models such as deep convolutional classification models, ResNet models, Inception models, and VGG models. Optionally, the classification result may be whether the target object is included or not, or may be the probability of including the target object or not including the target object, which is not limited in this application. Optionally, the classification result can be used as the final target verification result, so as to determine whether the image to be detected is an approved image.
其中,输入第一分类模型的图像可以是待检测图像对应的检测结果中的位置框框住的图像。Wherein, the image input into the first classification model may be an image framed by a position box in the detection result corresponding to the image to be detected.
本公开实施例中,通过对目标检测结果对应的位置框图像进行分类,从而实现校验的目的,以提升目标检测的准确率和召回率。In the embodiment of the present disclosure, the purpose of verification is achieved by classifying the location frame images corresponding to the target detection results, so as to improve the accuracy rate and recall rate of target detection.
在一种实施方式中,第一分类模型是采用多组第二训练样本对初始第一分类模型进行训练得到的,第二训练样本包括第二样本图像以及各第二样本图像对应的第二样本标签;第二样本图像包括第一样本图像中的目标对象的位置框信息对应的图像,以及初始目标检测模型在训练过程中输出的检测错误的结果对应的位置框图像;第二样本标签用于表征第二样本图像中是否包含目标对象。In one embodiment, the first classification model is obtained by using multiple sets of second training samples to train the initial first classification model, and the second training samples include second sample images and second sample images corresponding to each second sample image. label; the second sample image includes the image corresponding to the position frame information of the target object in the first sample image, and the position frame image corresponding to the detection error result output by the initial target detection model during the training process; the second sample label uses To represent whether the target object is included in the second sample image.
本公开实施例中,将第一样本图像中的目标对象的位置框信息对应的图像作为第一分类模型的正样本,将初始目标检测模型在训练过程中输出的检测错误的结果对应的位置框图像作为负样本训练第一分类模型,可以使得训练完成的第一分类模型的分类准确率更高。In the embodiment of the present disclosure, the image corresponding to the position frame information of the target object in the first sample image is used as the positive sample of the first classification model, and the position corresponding to the detection error output by the initial target detection model during the training process is The frame image is used as a negative sample to train the first classification model, which can make the classification accuracy of the trained first classification model higher.
在一种实施方式中,基于位置框信息对目标检测结果进行校验,得到待检测图像对应的目标校验结果,包括:In one embodiment, the target detection result is verified based on the position frame information, and the target verification result corresponding to the image to be detected is obtained, including:
基于位置框信息,在待检测图像中获取位置框对应的图像;Based on the position frame information, an image corresponding to the position frame is acquired in the image to be detected;
获取位置框对应图像的特征向量;Obtain the feature vector of the image corresponding to the location box;
基于特征向量在预设的检索数据库中进行检索,得到检索结果;检索数据库中包括目标对象图像的特征向量;Searching in a preset retrieval database based on the feature vector to obtain a retrieval result; the retrieval database includes the feature vector of the image of the target object;
根据检索结果,确定待检测图像对应的目标校验结果。According to the retrieval result, the target verification result corresponding to the image to be detected is determined.
在本实施例中,可以通过第一分类模型的特征提取模块提取位置框对应的图像的特征向量,利用该特征向量在检索数据库中进行检索,检索方式可以包括但不限于近似最近邻搜索(Approximate Nearest Neighbor,ANN)。检索数据库是预先建立的包含各类型目标对象图像的特征向量的数据库。如果检索到该位置框图像与检索数据库中的图像的相似度大于预设阈值,则认为该待处理图像中包含目标对象。In this embodiment, the feature vector of the image corresponding to the position frame can be extracted by the feature extraction module of the first classification model, and the feature vector can be used to search in the retrieval database. The retrieval method can include but not limited to approximate nearest neighbor search (Approximate Nearest Neighbor, ANN). The retrieval database is a pre-established database containing feature vectors of images of various types of target objects. If the similarity between the retrieved position frame image and the image in the retrieved database is greater than a preset threshold, it is considered that the image to be processed contains the target object.
本公开实施例中,通过在检索数据库中检索的方式校验待检测图像中是否包含目标对象,可以提高目标检测的准确率。本公开实施例中的检索数据库中的数据可以不断进行更新,将新增目标对象图像的特征向量不断新增到检索数据库中,从而提升新增目标对象图像的召回能力。In the embodiment of the present disclosure, the accuracy of target detection can be improved by checking whether the target object is included in the image to be detected by searching in the search database. The data in the retrieval database in the embodiments of the present disclosure can be continuously updated, and feature vectors of newly added target object images can be continuously added to the retrieval database, thereby improving the recall ability of newly added target object images.
在一种实施方式中,基于位置框信息对目标检测结果进行校验,得到待检测图像对应的目标校验结果,包括:In one embodiment, the target detection result is verified based on the position frame information, and the target verification result corresponding to the image to be detected is obtained, including:
基于位置框信息,在待检测图像中获取位置框对应的图像;Based on the position frame information, an image corresponding to the position frame is acquired in the image to be detected;
获取位置框对应的图像的特征信息,基于特征信息确定待检测图像对应的目标校验结果;Obtain feature information of the image corresponding to the position frame, and determine a target verification result corresponding to the image to be detected based on the feature information;
特征信息包括以下至少一项:Feature information includes at least one of the following:
图像中包含的对象的形状特征、图像中包含的对象的颜色特征和图像中的文字信息。The shape feature of the object contained in the image, the color feature of the object contained in the image and the text information in the image.
本公开实施例中,还可以通过计算机视觉算法,提取位置框图像的视觉特征,包括但不限于图像中包含的对象的形状特征、图像中包含的对象的颜色特征和图像中的文字信息中的至少一项,通过这些特征来确定位置框图像中是否包含目标对象,从而提升目标检测结果的准确率。In the embodiment of the present disclosure, the visual features of the position frame image can also be extracted through the computer vision algorithm, including but not limited to the shape features of the objects contained in the image, the color features of the objects contained in the image, and the text information in the image. At least one of these features is used to determine whether the target object is contained in the location frame image, thereby improving the accuracy of the target detection result.
本公开技术方案中,还可以包括审核豁免机制,对于目标校验结果中包括目标对象的图像,进一步确定是否进行审核豁免,具体见如下实施例。In the technical solution of the present disclosure, an audit exemption mechanism may also be included. For the image of the target object included in the target verification result, it is further determined whether to perform audit exemption. For details, see the following embodiments.
在一种实施方式中,目标对象包括徽章类对象,目标检测方法还包括:In one embodiment, the target object includes a badge object, and the target detection method further includes:
在目标校验结果为待检测图像包含徽章类对象的情况下,将待检测图像输入预设的第二分类模型,在根据第二分类模型的输出结果确定待检测图像为书籍封面图像的情况下,将待检测图像确定为审核通过图像。When the target verification result is that the image to be detected contains a badge-like object, input the image to be detected into the preset second classification model, and determine that the image to be detected is a book cover image according to the output result of the second classification model , and determine the image to be detected as the approved image.
本公开实施例中,在目标对象为徽章类对象的情况下,第二分类模型可以是用于书籍封面图像、证件图像进行分类的模型。将待检测图像或者待检测图像的位置框图像输入第二分类模型,确定是否是书籍封面图像,书籍封面图像可以是豁免审核的图像,即使包含徽章类图像,也可以审核通过,则确定该待检测图像审核通过。In the embodiment of the present disclosure, when the target object is a badge object, the second classification model may be a model for classifying book cover images and certificate images. Input the image to be detected or the position frame image of the image to be detected into the second classification model to determine whether it is a book cover image. The book cover image can be an image that is exempt from review. The inspection image is approved.
本公开实施例中,通过第二分类模型的输出结果来确定待检测图像是否可以审核豁免,可以满足对书籍封面图像的审核豁需求。In the embodiment of the present disclosure, the output result of the second classification model is used to determine whether the image to be detected can be exempted from examination, which can meet the examination exemption requirement for the book cover image.
在一种实施方式中,目标检测方法还包括:In one embodiment, the target detection method also includes:
在根据第二分类模型的输出结果确定待检测图像不是书籍封面图像的情况下,获取待检测图像中的文字信息,在根据文字信息确定待检测图像为合法证件图像的情况下,将待检测图像确定为审核通过图像。When it is determined that the image to be detected is not a book cover image according to the output result of the second classification model, the text information in the image to be detected is obtained, and when the image to be detected is determined to be a legal document image according to the text information, the image to be detected is Determined as approved image.
本公开实施例中,在根据第二分类模型的输出结果确定待检测图像不是书籍封面图像的情况下,根据待检测图像中的文字信息,通过光学字符识别(Optical CharacterRecognition,OCR)等方式,对该待检测图像中的文字信息进行识别,确定是否是合法证件名称,从而确定待检测图像是否是合法证件图像,如果是合法证件图像,则将待检测图像确定为审核通过图像。In the embodiment of the present disclosure, when it is determined according to the output result of the second classification model that the image to be detected is not a book cover image, according to the text information in the image to be detected, through optical character recognition (Optical Character Recognition, OCR) and other methods, the The text information in the image to be detected is identified to determine whether it is a legal certificate name, thereby determining whether the image to be detected is a legal certificate image, and if it is a legal certificate image, the image to be detected is determined to be an approved image.
本公开实施例中,通过文字识别的方式来确定待检测图像是否可以审核豁免,可以满足对合法证件图像的审核豁需求。In the embodiment of the present disclosure, it is determined whether the image to be detected can be exempted from examination by means of character recognition, which can meet the examination exemption requirements for legal document images.
在一种实施方式中,目标检测方法还包括:In one embodiment, the target detection method also includes:
在根据文字信息确定待检测图像不是合法证件图像的情况下,获取待检测图像对应的用户资质信息,根据用户资质确定待检测图像对应的用户是否具有审核豁免权限,如果是,将待检测图像确定为审核通过图像。When it is determined according to the text information that the image to be detected is not a legal document image, obtain the user qualification information corresponding to the image to be detected, determine whether the user corresponding to the image to be detected has audit exemption authority according to the user qualification, and if so, determine the image to be detected Approved image for review.
本公开实施例中,对于特定用户,可以赋予审核豁免权限,对于该用户上传的图像可以进行审核豁免。用户资质信息可以和用户上传的图像进行绑定,通过图像的标识信息等可以查询到该图像对应用户的用户资质信息,根据用户资质信息可以确定待检测图像对应的用户是否具有审核豁免权限。In the embodiment of the present disclosure, for a specific user, an audit exemption authority may be granted, and an image uploaded by the user may be exempted from audit. The user qualification information can be bound to the image uploaded by the user, and the user qualification information of the user corresponding to the image can be queried through the identification information of the image, etc. According to the user qualification information, it can be determined whether the user corresponding to the image to be detected has the audit exemption authority.
本公开实施例中,通过对用户资质信息进行核验,来确定待检测图像是否可以审核豁免,可以满足对具有审核豁免权限的用户上传的图像的审核豁需求。In the embodiment of the present disclosure, by verifying the user qualification information, it is determined whether the image to be detected can be exempted from auditing, which can meet the auditing exemption requirements for images uploaded by users with auditing exemption authority.
在一种实施方式中,目标检测方法还包括:In one embodiment, the target detection method also includes:
在根据用户资质确定待检测图像对应的用户不具有审核豁免权限,则将待检测图像确定为审核未通过图像。When it is determined according to the user qualification that the user corresponding to the image to be detected does not have audit exemption authority, the image to be detected is determined to be an image that has failed the review.
本公开实施例中,对于不具有审核豁免权限的用户发送的包含徽章类目标对象的图像,确定为审核未通过图像。In the embodiment of the present disclosure, for an image containing a badge-type target object sent by a user who does not have the audit exemption authority, it is determined to be an image that fails the audit.
本公开技术方案中的目标检测方法,在目标检测模型输出的目标检测结果中,对于包含位置框信息,且置信度小于预设的置信度阈值的目标检测结果进行校验,以提升图像审核的准确率和包含目标对象的图像的召回率。In the target detection method in the disclosed technical solution, in the target detection results output by the target detection model, the target detection results containing position frame information and whose confidence level is less than the preset confidence level threshold are verified, so as to improve the accuracy of image review. Precision and recall for images containing the target object.
图2为本公开一实施例中目标检测模型的训练样本的获取过程的示意图。本实施例中的目标对象为徽章类对象。如图2所示,获取包含徽章的图像作为正样本图像,并进行样本标注(如图中所示的“正例样本抓取、标注”)。获取与徽章外形相近的图像作为相似目标图像(如图中所示的“徽章外形相近图抓取”);在预设数据库中检索与徽章图像相似的图像(如图中所示的“广告物料库检索”),利用徽章图像和与徽章图像相似的图像进行拼接得到拼接图像(如图中所示的“样本生成与扩增”),将徽章图像、与徽章相似的图像、拼接图像作为目标检测模型的第一训练样本数据(如图中所示的“初始训练数据”)。FIG. 2 is a schematic diagram of an acquisition process of training samples of a target detection model in an embodiment of the present disclosure. The target object in this embodiment is a badge object. As shown in Figure 2, the image containing the badge is obtained as a positive sample image, and the sample is labeled ("positive sample capture and labeling" as shown in the figure). Obtain an image similar to the badge image as a similar target image (as shown in the figure "Badge shape similar image capture"); search for images similar to the badge image in the preset database (as shown in the figure "Advertising material library search"), use the badge image and images similar to the badge image to stitch together to obtain a stitched image (as shown in the "sample generation and amplification" shown in the figure), and use the badge image, the image similar to the badge, and the stitched image as the target The first training sample data of the detection model ("initial training data" shown in the figure).
图3为本公开一实施例中目标检测模型的迭代过程的示意图。如图3所示,获取目标对象图像和相似目标对象图像,并进行拼接,并获取拼接图像的样本标签(如图中所示的“初始标注、生成数据”),将拼接图像和样本标签作为目标检测模型的训练数据集,并进行目标检测模型的迭代训练,在模型的迭代过程中,将测试样本图像输入模型,将模型输出的检测错误的结果对应的位置框图像作为背景图像(如图中所示的“负例收集”)和目标对象图像进行拼接,得到新的拼接图像,增加到目标检测模型的训练样本集中(如图中所示的“样本生成与扩增”),利用不断更新的训练数据集训练模型(如图中所示的“模型迭代”),直到满足预设的训练结束条件,得到目标检测模型(如图中所示的“模型发布”)。Fig. 3 is a schematic diagram of an iterative process of a target detection model in an embodiment of the present disclosure. As shown in Figure 3, the target object image and similar target object images are obtained, and stitched, and the sample label of the stitched image (as shown in the figure "initial annotation, generated data") is obtained, and the stitched image and sample label are used as The training data set of the target detection model, and iterative training of the target detection model, in the iterative process of the model, the test sample image is input into the model, and the position frame image corresponding to the detection error result output by the model is used as the background image (as shown in Fig. The "negative example collection" shown in the figure) is spliced with the target object image to obtain a new spliced image, which is added to the training sample set of the target detection model ("sample generation and amplification" shown in the figure), using continuous The updated training data set trains the model ("model iteration" as shown in the figure), until the preset training end condition is met, and the target detection model is obtained ("model release" as shown in the figure).
图4为本公开一实施例中图像审核系统的示意图。如图4所示,在本实施例中,目标对象图像为徽章类图像。图像审核系统包括:目标检测单元、二次校验单元和特殊场景识别与豁免单元。待检测图像输入目标检测单元,通过敏感徽章目标检测器(可以是本公开技术方案中的目标检测模型)进行徽章检测,得到徽章检测结果,如果其中包含徽章的概率小于预设阈值(如图中所示的“小于阈值”),则待检测图像中不包含徽章,确定该待处理图像为审核通过图像。如果徽章检测结果中包含徽章的概率大于等于预设阈值,则表示待检测图像中可能包含徽章,将目标检测结果中包含位置框信息,且目标检测结果对应的置信度小于预设的置信度阈值的待处理图像进行校验,从这些图像中提取位置框图像,输入二次校验单元进行校验,具体校验方式可以包括三种:第一种检索库检索,具体实现过程包括:提取位置框图像的特征向量,并进行压缩处理,利用处理后的特征向量在预设的检索数据库中进行检索,得到检索结果,根据检索结果确定是否包含徽章。第二种形态特征检测,具体实现过程包括:对位置框图像进行特征信息提取,根据图像中包含的对象的形状特征、图像中包含的对象的颜色特征和图像中的文字信息等特征,确定图像中是否包含徽章。第三种通过徽章识别分类器(本公开技术方案中的第一分类模型)的分类结果确定图像中是否包含徽章。如果根据二次校验单元的校验结果确定图像中包含徽章的概率小于预设阈值(如图中所示的“小于阈值”),则直接审核通过。在目标校验结果为待检测图像包含徽章类图像的情况下,将待检测图像输入特殊场景识别与豁免单元,通过证件书籍分类器(本公开技术方案中的第二分类模型)进行分类识别,如果是书籍封面图像,则审核通过。如果不是书籍封面图像,获取待检测图像中的文字信息,进行合法证件名称校验,如果是合法证件图像,则审核通过。如果不是合法证件图像,再获取待检测图像对应的用户资质信息,进行资质授权核验,如果上传该图像的用户具有审核豁免资质,则审核通过,否则,将待检测图像确定为审核未通过图像。FIG. 4 is a schematic diagram of an image review system in an embodiment of the present disclosure. As shown in FIG. 4 , in this embodiment, the target object image is a badge image. The image review system includes: a target detection unit, a secondary verification unit, and a special scene recognition and exemption unit. The image to be detected is input to the target detection unit, and the badge detection is performed by a sensitive badge target detector (which can be the target detection model in the disclosed technical solution), and the badge detection result is obtained. If the probability of including the badge is less than the preset threshold (as shown in the figure Shown as "less than the threshold"), the image to be detected does not contain a badge, and the image to be processed is determined to be an approved image. If the probability that the badge detection result contains a badge is greater than or equal to the preset threshold, it means that the image to be detected may contain a badge, and the target detection result contains location frame information, and the confidence corresponding to the target detection result is less than the preset confidence threshold The images to be processed are verified, and the position frame images are extracted from these images, and input into the secondary verification unit for verification. The specific verification methods can include three types: the first search library search, and the specific implementation process includes: extracting the position Frame the feature vector of the image, and perform compression processing, use the processed feature vector to search in the preset search database, get the search result, and determine whether to include the badge according to the search result. The second type of morphological feature detection, the specific implementation process includes: extracting feature information from the position frame image, and determining the image according to the shape features of the object contained in the image, the color features of the object contained in the image, and the text information in the image. Whether to include a badge in . The third method is to determine whether the image contains a badge based on the classification result of the badge recognition classifier (the first classification model in the technical solution of the present disclosure). If it is determined according to the verification result of the secondary verification unit that the probability of including the badge in the image is less than the preset threshold ("less than the threshold" as shown in the figure), the approval is passed directly. When the target verification result is that the image to be detected contains a badge image, the image to be detected is input into the special scene recognition and exemption unit, and the certificate book classifier (the second classification model in the disclosed technical solution) is used for classification and recognition. If it is a book cover image, it is approved. If it is not a book cover image, the text information in the image to be detected is obtained, and the name of the legal certificate is verified. If it is a legal certificate image, the review is passed. If it is not a legal document image, then obtain the user qualification information corresponding to the image to be detected, and perform qualification authorization verification. If the user who uploaded the image has the qualification for exemption from review, the review is passed; otherwise, the image to be detected is determined to be an image that has not passed the review.
图5为本公开一实施例中目标检测模型的训练方法的示意图。如图5所示,目标检测模型的训练方法可以包括:FIG. 5 is a schematic diagram of a method for training a target detection model in an embodiment of the present disclosure. As shown in Figure 5, the training method of the target detection model may include:
步骤S501,获取多组第一训练样本数据;Step S501, acquiring multiple sets of first training sample data;
其中,第一训练样本数据包括第一样本图像以及第一样本图像对应的第一样本标签,第一样本标签用于表征第一样本图像中是否包含目标对象以及目标对象的位置框信息,第一样本图像包括拼接图像;拼接图像是基于目标对象图像和相似目标图像进行拼接得到的,目标对象图像为包含目标对象的图像,相似目标图像是包含相似目标对象的图像,相似目标对象与目标对象的相似度在预设范围内。Wherein, the first training sample data includes the first sample image and the first sample label corresponding to the first sample image, and the first sample label is used to represent whether the first sample image contains the target object and the position of the target object frame information, the first sample image includes a mosaic image; the mosaic image is obtained by stitching based on the target object image and similar target images, the target object image is an image containing the target object, the similar target image is an image containing similar target objects, and the similar The similarity between the target object and the target object is within a preset range.
步骤S502,基于多组第一训练样本数据对初始目标检测模型进行训练,直到满足预设的训练结束条件,得到本公开任一实施例的目标检测模型。In step S502, the initial target detection model is trained based on multiple sets of first training sample data until the preset training end condition is satisfied, and the target detection model of any embodiment of the present disclosure is obtained.
本公开技术方案中的目标检测模型的训练方法,通过利用目标对象图像和相似目标对象图像进行拼接得到的拼接图像作为训练样本,可以增加训练样本的数量和丰富性,通过丰富的训练样本图像进行模型训练,可以使得模型学习到更多的信息,以提升训练完成的目标检测模型的检测准确率。The training method of the target detection model in the disclosed technical solution can increase the number and richness of training samples by using the spliced images obtained by splicing target object images and similar target object images as training samples. Model training can enable the model to learn more information to improve the detection accuracy of the trained target detection model.
在一种实施方式中,拼接图像是通过以下方式得到的:In one embodiment, the spliced image is obtained in the following manner:
将目标对象图像按照预设方式进行处理,得到处理后图像;预设方式包括锐化、添加噪声、滤波、颜色抖动、随机填充和透视变换中的至少一项;Processing the image of the target object according to a preset method to obtain a processed image; the preset method includes at least one of sharpening, adding noise, filtering, color dithering, random filling and perspective transformation;
将处理后图像作为前景图,将相似目标图像作为背景图,进行拼接处理。The processed image is used as the foreground image, and the similar target image is used as the background image for splicing.
需要说明的是,预设方式还可以是其他任意的图像处理方式,本申请对此不做限定。It should be noted that the preset manner may also be any other image processing manner, which is not limited in this application.
本公开实施例中,通过将目标对象按照不同方式进行处理,得到每种处理方式处理后的图像,再进行图像拼接,将拼接图像作为训练样本,可以增加训练样本的数量和丰富性。In the embodiment of the present disclosure, the target object is processed in different ways to obtain images processed by each processing method, and then image stitching is performed, and the stitched images are used as training samples, which can increase the number and richness of training samples.
在一种实施方式中,目标检测模型的训练方法还包括:In one embodiment, the training method of target detection model also includes:
对初始目标检测模型进行训练过程中,获取多个测试样本图像,将测试样本图像输入模型,得到测试样本图像对应的输出结果;During the training process of the initial target detection model, multiple test sample images are obtained, and the test sample images are input into the model to obtain output results corresponding to the test sample images;
将目标对象图像和测试样本图像对应的输出结果中检测错误的结果对应的图像进行拼接处理,得到新的拼接图像,检测错误的结果为将不包含目标对象的图像检测为包含目标对象的结果;The image corresponding to the detection error result in the output results corresponding to the target object image and the test sample image is spliced to obtain a new spliced image, and the detection error result is the result of detecting an image that does not contain the target object as containing the target object;
获取新的拼接图像的标注标签;Obtain the annotation label of the new stitched image;
利用新的拼接图像和标注标签更新第一训练样本数据。The first training sample data is updated with new stitched images and annotation labels.
其中,对初始目标检测模型进行训练过程中,还可以在预设的图像数据库中获取测试样本图像,输入模型进行测试。利用模型输出的检测错误的结果对应的图像作为背景图像,与目标对象图像进行拼接,得到新的拼接图像,添加到模型的训练样本数据库中。其中的模型可以是训练过程中通过不断迭代,对初始目标检测模型的参数调整之后的模型,此时的模型还没有满足训练结束条件,不是最终训练完成的目标检测模型。Wherein, during the training process of the initial target detection model, a test sample image may also be obtained from a preset image database and input into the model for testing. The image corresponding to the detection error result output by the model is used as the background image, and is stitched with the target object image to obtain a new stitched image, which is added to the training sample database of the model. The model can be a model after adjusting the parameters of the initial target detection model through continuous iterations during the training process. The model at this time has not yet met the training end condition, and is not the target detection model that is finally trained.
在一些实施例中,新的拼接图像的标注标签可以是人工标注的标签,也可以是其他方式获取到的标签,本申请对此不做限定。In some embodiments, the tagged label of the new spliced image may be a manually tagged tag, or a tag obtained in other ways, which is not limited in this application.
本公开实施例中,通过模型迭代过程中的测试样本图像对应的检测错误结果对应的图像,和目标对象图像进行拼接得到的新的拼接图像,来增加模型的训练样本数据,可以实现训练样本数据的扩增。In the embodiment of the present disclosure, the training sample data of the model can be increased by splicing the image corresponding to the detection error result corresponding to the test sample image in the model iteration process and the target object image, so that the training sample data can be realized. expansion.
图6为本公开一实施例中目标检测装置的示意图。如图6所示,目标检测装置可以包括:FIG. 6 is a schematic diagram of an object detection device in an embodiment of the present disclosure. As shown in Figure 6, the target detection device may include:
检测图像获取模块601,用于获取待检测图像;A detection image acquisition module 601, configured to obtain an image to be detected;
目标检测模块602,用于将待检测图像输入预先训练的目标检测模型,得到待检测图像对应的目标检测结果;A target detection module 602, configured to input the image to be detected into a pre-trained target detection model to obtain a target detection result corresponding to the image to be detected;
位置框获取模块603,用于在目标检测结果满足预设条件的情况下,获取目标检测结果中的位置框信息;其中,预设条件为目标检测结果中包含位置框信息,且目标检测结果对应的置信度小于预设的置信度阈值;The position frame obtaining module 603 is used to obtain the position frame information in the target detection result when the target detection result satisfies the preset condition; wherein, the preset condition is that the target detection result contains the position frame information, and the target detection result corresponds to The confidence of is less than the preset confidence threshold;
结果校验模块604,用于基于位置框信息对目标检测结果进行校验,得到待检测图像对应的目标校验结果。The result verification module 604 is configured to verify the target detection result based on the location frame information, and obtain a target verification result corresponding to the image to be detected.
在一种实施方式中,目标检测模型是采用多组第一训练样本数据对初始目标检测模型进行训练得到的,第一训练样本数据包括第一样本图像以及第一样本图像对应的第一样本标签,第一样本标签用于表征第一样本图像中是否包含目标对象以及目标对象的位置框信息;In one embodiment, the target detection model is obtained by using multiple sets of first training sample data to train the initial target detection model. The first training sample data includes the first sample image and the first sample image corresponding to the first sample image. A sample label, the first sample label is used to represent whether the first sample image contains the target object and the location frame information of the target object;
第一样本图像包括拼接图像;拼接图像是基于目标对象图像和相似目标图像进行拼接得到的,目标对象图像为包含目标对象的图像,相似目标图像是包含相似目标对象的图像,相似目标对象与目标对象的相似度在预设范围内。The first sample image includes a mosaic image; the mosaic image is obtained based on the mosaic of the target object image and the similar target image, the target object image is an image containing the target object, the similar target image is an image containing the similar target object, and the similar target object and The similarity of the target object is within a preset range.
在一种实施方式中,拼接图像是通过以下方式得到的:In one embodiment, the spliced image is obtained in the following manner:
将目标对象图像按照预设方式进行处理,得到处理后图像;预设方式包括锐化、添加噪声、滤波、颜色抖动、随机填充和透视变换中的至少一项;Processing the image of the target object according to a preset method to obtain a processed image; the preset method includes at least one of sharpening, adding noise, filtering, color dithering, random filling and perspective transformation;
将处理后图像作为前景图,将相似目标图像作为背景图,进行拼接处理。The processed image is used as the foreground image, and the similar target image is used as the background image for splicing.
图7为本公开一实施例中样本更新模块的示意图。如图7所示,在一种实施方式中,目标检测装置还包括样本更新模块,样本更新模块包括:FIG. 7 is a schematic diagram of a sample update module in an embodiment of the present disclosure. As shown in Figure 7, in one embodiment, the target detection device also includes a sample update module, and the sample update module includes:
测试结果获取单元701,用于对初始目标检测模型进行训练过程中,获取多个测试样本图像,将测试样本图像输入模型,得到测试样本图像对应的输出结果;The test result acquisition unit 701 is used to obtain a plurality of test sample images during the training process of the initial target detection model, input the test sample images into the model, and obtain the corresponding output results of the test sample images;
图像拼接单元702,用于将目标对象图像和测试样本图像对应的输出结果中检测错误的结果对应的图像进行拼接处理,得到新的拼接图像,检测错误的结果为将不包含目标对象的图像检测为包含目标对象的结果;The image stitching unit 702 is configured to stitch the image corresponding to the result of the detection error among the output results corresponding to the target object image and the test sample image to obtain a new stitched image, and the result of the detection error is to detect an image that does not contain the target object. for results containing the target object;
标签获取单元703,用于获取新的拼接图像的标注标签;A label obtaining unit 703, configured to obtain an annotation label of a new spliced image;
更新单元704,用于利用新的拼接图像和标注标签更新第一训练样本数据。An updating unit 704, configured to update the first training sample data with the new spliced image and label.
在一种实施方式中,结果校验模块604,具体用于:In one embodiment, the result verification module 604 is specifically used for:
基于位置框信息,在待检测图像中获取位置框对应的图像;Based on the position frame information, an image corresponding to the position frame is acquired in the image to be detected;
将位置框对应的图像输入预先训练的第一分类模型,得到分类结果,待检测图像对应的目标校验结果包括分类结果。The image corresponding to the location frame is input into the pre-trained first classification model to obtain a classification result, and the target verification result corresponding to the image to be detected includes the classification result.
在一种实施方式中,第一分类模型是采用多组第二训练样本对初始第一分类模型进行训练得到的,第二训练样本包括第二样本图像以及各第二样本图像对应的第二样本标签;第二样本图像包括第一样本图像中的目标对象的位置框信息对应的图像,以及初始目标检测模型在训练过程中输出的检测错误的结果对应的位置框图像;第二样本标签用于表征第二样本图像中是否包含目标对象。In one embodiment, the first classification model is obtained by using multiple sets of second training samples to train the initial first classification model, and the second training samples include second sample images and second sample images corresponding to each second sample image. label; the second sample image includes the image corresponding to the position frame information of the target object in the first sample image, and the position frame image corresponding to the detection error result output by the initial target detection model during the training process; the second sample label uses To represent whether the target object is included in the second sample image.
在一种实施方式中,结果校验模块604,具体用于:In one embodiment, the result verification module 604 is specifically used for:
基于位置框信息,在待检测图像中获取位置框对应的图像;Based on the position frame information, an image corresponding to the position frame is acquired in the image to be detected;
获取位置框对应图像的特征向量;Obtain the feature vector of the image corresponding to the location frame;
基于特征向量在预设的检索数据库中进行检索,得到检索结果;检索数据库中包括目标对象图像的特征向量;Searching in a preset retrieval database based on the feature vector to obtain a retrieval result; the retrieval database includes the feature vector of the image of the target object;
根据检索结果,确定待检测图像对应的目标校验结果。According to the retrieval result, the target verification result corresponding to the image to be detected is determined.
在一种实施方式中,结果校验模块604,具体用于:In one embodiment, the result verification module 604 is specifically used for:
基于位置框信息,在待检测图像中获取位置框对应的图像;Based on the position frame information, an image corresponding to the position frame is acquired in the image to be detected;
获取位置框对应的图像的特征信息,基于特征信息确定待检测图像对应的目标校验结果;Obtain feature information of the image corresponding to the position frame, and determine a target verification result corresponding to the image to be detected based on the feature information;
特征信息包括以下至少一项:Feature information includes at least one of the following:
图像中包含的对象的形状特征、图像中包含的对象的颜色特征和图像中的文字信息。The shape feature of the object contained in the image, the color feature of the object contained in the image and the text information in the image.
在一种实施方式中,目标对象包括徽章类对象,目标检测装置还包括图像分类模块,用于:In one embodiment, the target object includes a badge-like object, and the target detection device further includes an image classification module, configured to:
在目标校验结果为待检测图像包含徽章类对象的情况下,将待检测图像输入预设的第二分类模型,在根据第二分类模型的输出结果确定待检测图像为书籍封面图像的情况下,将待检测图像确定为审核通过图像。When the target verification result is that the image to be detected contains a badge-like object, input the image to be detected into the preset second classification model, and determine that the image to be detected is a book cover image according to the output result of the second classification model , and determine the image to be detected as the approved image.
在一种实施方式中,目标检测装置还包括文字识别模块,用于:In one embodiment, the target detection device also includes a character recognition module, configured to:
在根据第二分类模型的输出结果确定待检测图像不是书籍封面图像的情况下,获取待检测图像中的文字信息,在根据文字信息确定待检测图像为合法证件图像的情况下,将待检测图像确定为审核通过图像。When it is determined that the image to be detected is not a book cover image according to the output result of the second classification model, the text information in the image to be detected is obtained, and when the image to be detected is determined to be a legal document image according to the text information, the image to be detected is Determined as approved image.
在一种实施方式中,目标检测装置还包括资质审核模块,用于:In one embodiment, the target detection device also includes a qualification verification module, which is used for:
在根据文字信息确定待检测图像不是合法证件图像的情况下,获取待检测图像对应的用户资质信息,根据用户资质确定待检测图像对应的用户是否具有审核豁免权限,如果是,将待检测图像确定为审核通过图像。When it is determined according to the text information that the image to be detected is not a legal document image, obtain the user qualification information corresponding to the image to be detected, determine whether the user corresponding to the image to be detected has audit exemption authority according to the user qualification, and if so, determine the image to be detected Approved image for review.
在一种实施方式中,目标检测装置还包括结果确定模块,用于:In one embodiment, the target detection device also includes a result determination module, configured to:
在根据用户资质确定待检测图像对应的用户不具有审核豁免权限,则将待检测图像确定为审核未通过图像。When it is determined according to the user qualification that the user corresponding to the image to be detected does not have audit exemption authority, the image to be detected is determined to be an image that has failed the review.
本公开实施例的目标检测装置,在目标检测模型输出的目标检测结果中,对于包含位置框信息,且置信度小于预设的置信度阈值的目标检测结果进行校验,以提升图像审核的准确率和包含目标对象的图像的召回率。In the target detection device of the embodiment of the present disclosure, in the target detection results output by the target detection model, the target detection results containing the location frame information and whose confidence is less than the preset confidence threshold are verified, so as to improve the accuracy of image review. rate and recall of images containing the target object.
图8为本公开一实施例中目标检测模型的训练装置的示意图。如图8所示,目标检测的训练装置可以包括:FIG. 8 is a schematic diagram of a training device for a target detection model in an embodiment of the present disclosure. As shown in Figure 8, the training device for target detection can include:
样本获取模块801,用于获取多组第一训练样本数据;A sample acquisition module 801, configured to acquire multiple sets of first training sample data;
模型训练模块802,用于基于多组第一训练样本数据对初始目标检测模型进行训练,直到满足预设的训练结束条件,得到本公开任一实施例的目标检测模型;The model training module 802 is configured to train the initial target detection model based on multiple sets of first training sample data until the preset training end condition is met, and obtain the target detection model of any embodiment of the present disclosure;
其中,第一训练样本数据包括第一样本图像以及第一样本图像对应的第一样本标签,第一样本标签用于表征第一样本图像中是否包含目标对象以及目标对象的位置框信息,第一样本图像包括拼接图像;拼接图像是基于目标对象图像和相似目标图像进行拼接得到的,目标对象图像为包含目标对象的图像,相似目标图像是包含相似目标对象的图像,相似目标对象与目标对象的相似度在预设范围内。Wherein, the first training sample data includes the first sample image and the first sample label corresponding to the first sample image, and the first sample label is used to represent whether the first sample image contains the target object and the position of the target object frame information, the first sample image includes a mosaic image; the mosaic image is obtained by stitching based on the target object image and similar target images, the target object image is an image containing the target object, the similar target image is an image containing similar target objects, and the similar The similarity between the target object and the target object is within a preset range.
在一种实施方式中,拼接图像是通过以下方式得到的:In one embodiment, the spliced image is obtained in the following manner:
将目标对象图像按照预设方式进行处理,得到处理后图像;预设方式包括锐化、添加噪声、滤波、颜色抖动、随机填充和透视变换中的至少一项;Processing the image of the target object according to a preset method to obtain a processed image; the preset method includes at least one of sharpening, adding noise, filtering, color dithering, random filling and perspective transformation;
将处理后图像作为前景图,将相似目标图像作为背景图,进行拼接处理。The processed image is used as the foreground image, and the similar target image is used as the background image for splicing.
在一种实施方式中,目标检测模型的训练装置还包括样本更新模块,样本更新模块包括:In one embodiment, the training device of the target detection model also includes a sample update module, and the sample update module includes:
测试结果获取单元,用于对初始目标检测模型进行训练过程中,获取多个测试样本图像,将测试样本图像输入模型,得到测试样本图像对应的输出结果;The test result acquisition unit is used to obtain a plurality of test sample images during the training process of the initial target detection model, input the test sample images into the model, and obtain the corresponding output results of the test sample images;
图像拼接单元,用于将目标对象图像和测试样本图像对应的输出结果中检测错误的结果对应的图像进行拼接处理,得到新的拼接图像,检测错误的结果为将不包含目标对象的图像检测为包含目标对象的结果;The image splicing unit is used to splice the image corresponding to the result of the detection error in the output results corresponding to the target object image and the test sample image to obtain a new spliced image, and the result of the detection error is to detect the image that does not contain the target object as Contains results for the target object;
标签获取单元,用于获取新的拼接图像的标注标签;A label acquisition unit, configured to acquire an annotation label of a new spliced image;
更新单元,用于利用新的拼接图像和标注标签更新第一训练样本数据。An update unit, configured to update the first training sample data with new stitched images and annotation labels.
本公开技术方案中的目标检测模型的训练装置,通过利用目标对象图像和相似目标对象图像进行拼接得到的拼接图像作为训练样本,可以增加训练样本的数量和丰富性,通过丰富的训练样本图像进行模型训练,可以使得模型学习到更多的信息,以提升训练完成的目标检测模型的检测准确率。The training device of the target detection model in the disclosed technical solution can increase the number and richness of training samples by using the spliced images obtained by splicing target object images and similar target object images as training samples. Model training can enable the model to learn more information to improve the detection accuracy of the trained target detection model.
本公开实施例各装置中的各单元、模块或子模块的功能可以参见上述方法实施例中的对应描述,在此不再赘述。For functions of each unit, module, or submodule in each device in the embodiments of the present disclosure, reference may be made to the corresponding descriptions in the foregoing method embodiments, and details are not repeated here.
根据本公开的实施例,本公开还提供了一种电子设备、一种可读存储介质和一种计算机程序产品。According to the embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
图9示出了可以用来实施本公开的实施例的示例电子设备900的示意性框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或要求的本公开的实现。FIG. 9 shows a schematic block diagram of an example electronic device 900 that may be used to implement embodiments of the present disclosure. Electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the disclosure described and/or claimed herein.
如图9所示,电子设备900包括计算单元901,其可以根据存储在只读存储器(ROM)902中的计算机程序或者从存储单元908加载到随机访问存储器(RAM)903中的计算机程序来执行各种适当的动作和处理。在RAM 903中,还可存储电子设备900操作所需的各种程序和数据。计算单元901、ROM 902以及RAM 903通过总线904彼此相连。输入输出(I/O)接口905也连接至总线904。As shown in FIG. 9 , an electronic device 900 includes a computing unit 901 that can be executed according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903 Various appropriate actions and treatments. In the RAM 903, various programs and data necessary for the operation of the electronic device 900 can also be stored. The computing unit 901 , ROM 902 , and RAM 903 are connected to each other through a bus 904 . An input-output (I/O) interface 905 is also connected to the bus 904 .
电子设备900中的多个部件连接至I/O接口905,包括:输入单元906,例如键盘、鼠标等;输出单元907,例如各种类型的显示器、扬声器等;存储单元908,例如磁盘、光盘等;以及通信单元909,例如网卡、调制解调器、无线通信收发机等。通信单元909允许电子设备900通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Multiple components in the electronic device 900 are connected to the I/O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a magnetic disk, an optical disk etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 909 allows the electronic device 900 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.
计算单元901可以是各种具有处理和计算能力的通用和/或专用处理组件。计算单元901的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的计算单元、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。计算单元901执行上文所描述的各个方法和处理,例如目标检测方法。例如,在一些实施例中,目标检测方法或目标检测模型的训练方法可被实现为计算机软件程序,其被有形地包含于机器可读介质,例如存储单元908。在一些实施例中,计算机程序的部分或者全部可以经由ROM 902和/或通信单元909而被载入和/或安装到电子设备900上。当计算机程序加载到RAM 903并由计算单元901执行时,可以执行上文描述的目标检测方法的一个或多个步骤。备选地,在其他实施例中,计算单元901可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行目标检测方法。The computing unit 901 may be various general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of computing units 901 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 executes various methods and processes described above, such as object detection methods. For example, in some embodiments, an object detection method or a method for training an object detection model may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 908 . In some embodiments, part or all of the computer program may be loaded and/or installed on the electronic device 900 via the ROM 902 and/or the communication unit 909 . When the computer program is loaded into RAM 903 and executed by computing unit 901, one or more steps of the object detection method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured in any other appropriate way (for example, by means of firmware) to execute the object detection method.
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips Implemented in a system of systems (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpreted on a programmable system including at least one programmable processor, the programmable processor Can be special-purpose or general-purpose programmable processor, can receive data and instruction from storage system, at least one input device, and at least one output device, and transmit data and instruction to this storage system, this at least one input device, and this at least one output device an output device.
用于实施本公开的方法的程序代码可以采用一个或多个编程语言的任何组合来编写。这些程序代码可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器或控制器,使得程序代码当由处理器或控制器执行时使流程图和/或框图中所规定的功能/操作被实施。程序代码可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Program codes for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special purpose computer, or other programmable data processing devices, so that the program codes, when executed by the processor or controller, make the functions/functions specified in the flow diagrams and/or block diagrams Action is implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入、或者触觉输入来接收来自用户的输入。To provide for interaction with the user, the systems and techniques described herein can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user. ); and a keyboard and pointing device (eg, a mouse or a trackball) through which a user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Input from the user may be received through acoustic input, voice input, or tactile input.
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., as a a user computer having a graphical user interface or web browser through which a user can interact with embodiments of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system. The components of the system can be interconnected by any form or medium of digital data communication, eg, a communication network. Examples of communication networks include: Local Area Network (LAN), Wide Area Network (WAN) and the Internet.
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。A computer system may include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本公开中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本公开公开的技术方案所期望的结果,本文在此不进行限制。It should be understood that steps may be reordered, added or deleted using the various forms of flow shown above. For example, each step described in the present disclosure may be executed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution disclosed in the present disclosure can be achieved, no limitation is imposed herein.
上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。The specific implementation manners described above do not limit the protection scope of the present disclosure. It should be apparent to those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present disclosure shall be included within the protection scope of the present disclosure.
Claims (26)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110540636.5A CN113221918B (en) | 2021-05-18 | 2021-05-18 | Object detection method, object detection model training method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110540636.5A CN113221918B (en) | 2021-05-18 | 2021-05-18 | Object detection method, object detection model training method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN113221918A CN113221918A (en) | 2021-08-06 |
| CN113221918B true CN113221918B (en) | 2023-08-04 |
Family
ID=77092668
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110540636.5A Active CN113221918B (en) | 2021-05-18 | 2021-05-18 | Object detection method, object detection model training method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN113221918B (en) |
Families Citing this family (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114255389B (en) * | 2021-11-15 | 2024-12-27 | 浙江时空道宇科技有限公司 | A method, device, equipment and storage medium for detecting a target object |
| CN114511697A (en) * | 2022-01-18 | 2022-05-17 | 中国人民公安大学 | Image detection method, device and system |
| CN114218599B (en) * | 2022-02-22 | 2022-05-27 | 飞狐信息技术(天津)有限公司 | Business data processing method and device, storage medium and electronic equipment |
| CN115272817A (en) * | 2022-07-12 | 2022-11-01 | 浙江大华技术股份有限公司 | Target detection method, model training method and device |
| CN115731381A (en) * | 2022-11-16 | 2023-03-03 | 中邮信息科技(北京)有限公司 | Target detection method and device, electronic equipment and storage medium |
| CN117152653B (en) * | 2023-07-06 | 2026-01-30 | 昆明船舶设备研究试验中心(中国船舶集团有限公司七五〇试验场) | Instantaneous target recognition method based on video small samples |
| CN117058689B (en) * | 2023-10-09 | 2024-02-20 | 巴斯夫一体化基地(广东)有限公司 | Offline detection data processing method for chemical production |
| CN120766268A (en) * | 2024-06-04 | 2025-10-10 | 荣耀终端股份有限公司 | Image recognition method and related device |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110852285A (en) * | 2019-11-14 | 2020-02-28 | 腾讯科技(深圳)有限公司 | Object detection method and device, computer equipment and storage medium |
| CN111160406A (en) * | 2019-12-10 | 2020-05-15 | 北京达佳互联信息技术有限公司 | Training method of image classification model, and image classification method and device |
| CN112183098A (en) * | 2020-09-30 | 2021-01-05 | 完美世界(北京)软件科技发展有限公司 | Session processing method and device, storage medium and electronic device |
| CN112766244A (en) * | 2021-04-07 | 2021-05-07 | 腾讯科技(深圳)有限公司 | Target object detection method and device, computer equipment and storage medium |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR102348593B1 (en) * | 2017-10-26 | 2022-01-06 | 삼성에스디에스 주식회사 | Method for detecting target object based on machine-learning and Apparatus thereof |
-
2021
- 2021-05-18 CN CN202110540636.5A patent/CN113221918B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110852285A (en) * | 2019-11-14 | 2020-02-28 | 腾讯科技(深圳)有限公司 | Object detection method and device, computer equipment and storage medium |
| CN111160406A (en) * | 2019-12-10 | 2020-05-15 | 北京达佳互联信息技术有限公司 | Training method of image classification model, and image classification method and device |
| CN112183098A (en) * | 2020-09-30 | 2021-01-05 | 完美世界(北京)软件科技发展有限公司 | Session processing method and device, storage medium and electronic device |
| CN112766244A (en) * | 2021-04-07 | 2021-05-07 | 腾讯科技(深圳)有限公司 | Target object detection method and device, computer equipment and storage medium |
Non-Patent Citations (1)
| Title |
|---|
| 基于深度神经网络的遥感图像飞机目标检测;李文斌;何冉;;计算机工程(第07期);第274-282页 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113221918A (en) | 2021-08-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN113221918B (en) | Object detection method, object detection model training method and device | |
| CN105027162B (en) | Image analysis device, image analysis system, image analysis method | |
| CN107463605B (en) | Method and device for identifying low-quality news resource, computer equipment and readable medium | |
| WO2024109619A1 (en) | Sensitive data identification method and apparatus, device, and computer storage medium | |
| WO2021169111A1 (en) | Resume screening method and apparatus, computer device and storage medium | |
| CN109872162B (en) | Wind control classification and identification method and system for processing user complaint information | |
| CN110135411A (en) | Business card recognition method and device | |
| WO2019200806A1 (en) | Device for generating text classification model, method, and computer readable storage medium | |
| US20120136812A1 (en) | Method and system for machine-learning based optimization and customization of document similarities calculation | |
| CN109034069B (en) | Method and apparatus for generating information | |
| CN109213862B (en) | Object recognition method and device, computer readable storage medium | |
| CN114495113B (en) | Text classification method and text classification model training method and device | |
| CN112632226A (en) | Semantic search method and device based on legal knowledge graph and electronic equipment | |
| Wang et al. | Logo information recognition in large-scale social media data | |
| CN110134965B (en) | Method, apparatus, device and computer-readable storage medium for information processing | |
| CN116524523B (en) | Information extraction method, and model training method and device for information extraction | |
| CN111931859A (en) | Multi-label image identification method and device | |
| US10423817B2 (en) | Latent fingerprint ridge flow map improvement | |
| CN114418124A (en) | Method, device, equipment and storage medium for generating graph neural network model | |
| CN107688744B (en) | Malicious file classification method and device based on image feature matching | |
| CN115700790A (en) | Method, device and storage medium for object attribute classification model training | |
| CN113688268A (en) | Picture information extraction method and device, computer equipment and storage medium | |
| US20190034758A1 (en) | Systems and methods for clustering of near-duplicate images in very large image collections | |
| CN112241470A (en) | Video classification method and system | |
| CN116680388A (en) | Image-text mutual retrieval method, image-text mutual retrieval device, equipment and 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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |