[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN109063761B - Diffuser shedding detection method, device and electronic equipment - Google Patents

Diffuser shedding detection method, device and electronic equipment Download PDF

Info

Publication number
CN109063761B
CN109063761B CN201810810454.3A CN201810810454A CN109063761B CN 109063761 B CN109063761 B CN 109063761B CN 201810810454 A CN201810810454 A CN 201810810454A CN 109063761 B CN109063761 B CN 109063761B
Authority
CN
China
Prior art keywords
feature extraction
samples
extraction network
features
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
Application number
CN201810810454.3A
Other languages
Chinese (zh)
Other versions
CN109063761A (en
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.)
Force Map New (Chongqing) Technology Co.,Ltd.
Original Assignee
Beijing Kuangshi Technology 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 Beijing Kuangshi Technology Co Ltd filed Critical Beijing Kuangshi Technology Co Ltd
Priority to CN201810810454.3A priority Critical patent/CN109063761B/en
Publication of CN109063761A publication Critical patent/CN109063761A/en
Application granted granted Critical
Publication of CN109063761B publication Critical patent/CN109063761B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D21/00Measuring or testing not otherwise provided for
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a method and a device for detecting the falling of a diffuser and electronic equipment, and relates to the technical field of 3D (three-dimensional) shooting, wherein the method comprises the following steps: acquiring an image to be detected through a camera device; inputting an image to be detected into a pre-trained feature extraction network so that the feature extraction network extracts features of the image to be detected; wherein the feature extraction network is generated by training a new sample set; the new sample set is formed by a new sample group obtained by combining given samples; inputting the features into a pre-trained classifier to obtain a classification result; and determining whether the diffuser dropping occurs according to the classification result. The embodiment of the invention can carry out more efficient diffuser falling detection on the camera device, and has higher detection accuracy.

Description

扩散器脱落检测方法、装置及电子设备Diffuser shedding detection method, device and electronic equipment

技术领域technical field

本发明涉及3D摄像技术领域,尤其是涉及一种扩散器脱落检测方法、装置及电子设备。The present invention relates to the technical field of 3D imaging, and in particular, to a method, device and electronic device for detecting the falling off of a diffuser.

背景技术Background technique

随着3D模组的广泛应用,越来越多的移动终端会带有3D摄像模组,例如常见的飞行时间(Time-of-flight)模组技术,通过传感器发出经调制的近红外光,遇物体后反射,传感器通过计算光线发射和反射时间差或相位差,来换算被拍摄景物的距离,以产生深度信息,此外再结合传统的相机拍摄,就能将物体的三维轮廓以不同颜色代表不同距离的地形图方式呈现出来。With the wide application of 3D modules, more and more mobile terminals will be equipped with 3D camera modules, such as the common Time-of-flight module technology, which emits modulated near-infrared light through sensors, After encountering the reflection of the object, the sensor converts the distance of the captured scene by calculating the time difference or phase difference between light emission and reflection to generate depth information. In addition, combined with traditional camera shooting, the three-dimensional outline of the object can be represented by different colors. A topographic map of distances is presented.

上述摄像模组通常在红外光源前面安装了扩散器(Diffuser,也称扩散片或散射器),使得红外光能够均匀的照射到整个拍摄场景。如果没有扩散器,红外光源发出的红外光会聚集成一束,导致3D相机无法正常感知场景内被拍摄物体的深度。在实际使用过程中,3D摄像模组受到碰撞或震动会有一定概率出现扩散器脱落的问题,使得3D摄像头模组失效。The above-mentioned camera module is usually equipped with a diffuser (Diffuser, also called a diffuser or a diffuser) in front of the infrared light source, so that the infrared light can be uniformly irradiated to the entire shooting scene. Without a diffuser, the infrared light emitted by the infrared light source would gather into a bundle, which would prevent the 3D camera from properly perceiving the depth of the object being photographed in the scene. In the actual use process, if the 3D camera module is bumped or vibrated, there will be a certain probability that the diffuser will fall off, making the 3D camera module invalid.

针对现有技术中,检测扩散器脱落的精度较差的问题,目前尚未提出有效的解决方案。In view of the problem of poor accuracy in detecting the falling off of the diffuser in the prior art, no effective solution has been proposed yet.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明的目的在于提供一种扩散器脱落检测方法、装置及电子设备,可以提高检测扩散器脱落的精度。In view of this, the purpose of the present invention is to provide a method, device and electronic device for detecting the falling off of a diffuser, which can improve the accuracy of detecting the falling off of the diffuser.

为了实现上述目的,本发明实施例采用的技术方案如下:In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present invention are as follows:

第一方面,本发明实施例提供了一种扩散器脱落检测方法,所述扩散器设置于摄像装置,该方法包括:通过所述摄像装置获取待检测图像;将所述待检测图像输入预先训练的特征提取网络,以使所述特征提取网络提取所述待检测图像的特征;其中,所述特征提取网络是由新样本集训练生成的;所述新样本集是由给定样本进行组合得到的新样本组构成的;将所述特征输入预先训练的分类器,得到分类结果;根据所述分类结果确定是否发生扩散器脱落。In a first aspect, an embodiment of the present invention provides a method for detecting the falling off of a diffuser, where the diffuser is arranged on a camera, and the method includes: acquiring an image to be detected through the camera; inputting the image to be detected into pre-training feature extraction network, so that the feature extraction network extracts the features of the image to be detected; wherein, the feature extraction network is generated by training a new sample set; the new sample set is obtained by combining the given samples It is composed of a new sample group; the feature is input into a pre-trained classifier, and a classification result is obtained; according to the classification result, it is determined whether the diffuser falls off.

进一步,所述方法还包括:将所述新样本集中的一个所述新样本组输入所述特征提取网络;所述新样本组包括至少两个所述给定样本;通过所述特征提取网络分别提取每个所述给定样本的特征;如果两个所述给定样本属于相同类别的样本,将两个所述给定样本的所述特征进行最小化处理,以训练所述特征提取网络;所述类别包括非脱落类别和脱落类别;如果两个所述给定样本不属于相同类别的样本,将两个所述给定样本的所述特征进行最大化处理,以训练所述特征提取网络;依次输入所述新样本集中的新样本组,直至所述特征提取网络收敛时停止。Further, the method further includes: inputting one of the new sample groups in the new sample set into the feature extraction network; the new sample group includes at least two of the given samples; extracting features of each of the given samples; if two of the given samples belong to the same class of samples, minimize the features of the two given samples to train the feature extraction network; The classes include non-dropout classes and dropout classes; if two of the given samples do not belong to the same class of samples, the features of the two given samples are maximized to train the feature extraction network ; Input new sample groups in the new sample set in turn, and stop when the feature extraction network converges.

进一步,所述将所述新样本集中的一个所述新样本组输入特征提取网络的步骤,包括:将一个脱落样本、一个正常样本和一个攻击样本组成所述新样本组输入所述特征提取网络;所述将两个所述给定样本的所述特征进行最小化处理的步骤,包括:将所述攻击样本和所述正常样本的所述特征进行最小化处理;所述将两个所述给定样本的所述特征进行最大化处理的步骤,包括:将所述脱落样本和所述正常样本的所述特征进行最大化处理;将所述脱落样本和所述攻击样本的所述特征进行最大化处理。Further, the step of inputting one of the new sample groups in the new sample set into the feature extraction network includes: forming a dropout sample, a normal sample and an attack sample into the new sample group and inputting it into the feature extraction network ; The step of minimizing the features of the two given samples includes: minimizing the features of the attack samples and the normal samples; The step of maximizing the feature of a given sample includes: maximizing the feature of the dropout sample and the normal sample; maximizing the feature of the dropout sample and the attack sample. maximize processing.

进一步,所述将所述新样本集中的一个所述新样本组输入特征提取网络的步骤,包括:随机选择两个所述给定样本组成所述新样本组,并将所述新样本组输入所述特征提取网络。Further, the step of inputting one of the new sample groups in the new sample set into the feature extraction network includes: randomly selecting two of the given samples to form the new sample group, and inputting the new sample group into the feature extraction network. the feature extraction network.

进一步,所述将两个所述训练样本的所述特征进行最小化处理的步骤,包括:计算两个所述特征的向量间的距离,将所述距离最小化,以进行最小化处理。Further, the step of minimizing the features of the two training samples includes: calculating a distance between vectors of the two features, and minimizing the distance to perform the minimization process.

进一步,所述将两个所述训练样本的所述特征进行最大化处理的步骤,包括:计算两个所述特征的向量间的距离,并将所述距离最大化,以进行最大化处理。Further, the step of maximizing the features of the two training samples includes: calculating a distance between vectors of the two features, and maximizing the distance to perform maximization processing.

进一步,所述方法还包括:通过所述预先训练的特征提取网络,对脱落样本、正常样本和攻击样本进行特征提取;将所述脱落样本的特征划分为脱落类别,将所述正常样本和攻击样本的特征划分为非脱落类别,对所述分类器进行训练。Further, the method further includes: performing feature extraction on the drop-off samples, normal samples and attack samples through the pre-trained feature extraction network; dividing the features of the drop-off samples into drop-off categories, and classifying the normal samples and attack samples The features of the samples are divided into non-dropout categories, and the classifier is trained.

进一步,所述方法还包括:当确定发生扩散器脱落时,进行报警提醒。Further, the method further includes: when it is determined that the diffuser falls off, performing an alarm reminder.

第二方面,本发明实施例还提供了一种扩散器脱落检测装置,所述扩散器设置于摄像装置,该装置包括:获取模块,用于通过所述摄像装置获取待检测图像;特征提取模块,用于将所述待检测图像输入预先训练的特征提取网络,以使所述特征提取网络提取所述待检测图像的特征;其中,所述特征提取网络是由新样本集训练生成的;所述新样本集是由给定样本进行组合得到的新样本组构成的;分类模块,用于将所述特征输入预先训练的分类器,得到分类结果;判断模块,用于根据所述分类结果确定是否发生扩散器脱落。In a second aspect, an embodiment of the present invention further provides a diffuser falling off detection device, the diffuser is arranged on a camera device, and the device includes: an acquisition module for acquiring an image to be detected through the camera device; a feature extraction module , which is used to input the image to be detected into a pre-trained feature extraction network, so that the feature extraction network extracts the features of the image to be detected; wherein, the feature extraction network is generated by training a new sample set; The new sample set is composed of a new sample group obtained by combining the given samples; the classification module is used to input the features into a pre-trained classifier to obtain a classification result; the judgment module is used to determine according to the classification results. Whether the diffuser has fallen off.

第三方面,本发明实施例提供了一种电子设备,包括存储器和处理器,所述存储器中存储有可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现第一方面任一项所述的方法的步骤。In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, the memory stores a computer program that can run on the processor, and the processor implements the computer program when the processor executes the computer program. The steps of any one of the methods of the first aspect.

第四方面,本发明实施例提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器运行时执行上述第一方面任一项所述的方法的步骤。In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is run by a processor, any one of the foregoing first aspects is executed. steps of the method.

本发明实施例提供了一种扩散器脱落检测方法、装置及电子设备,可以通过预先训练的特征提取网络对待检测图像进行特征提取,该待采集图像是由待检测摄像装置获取的,该特征提取网络是由给定样本进行组合得到的新样本集进行训练得到的,在提取得到特征后进行分类,并确定是否发生扩散器脱落的情况,可以对摄像装置进行更高效的扩散器脱落检测,且检测准确度更高。Embodiments of the present invention provide a method, device, and electronic device for detecting diffuser shedding, which can perform feature extraction on an image to be detected through a pre-trained feature extraction network, and the image to be collected is acquired by a camera device to be detected. The network is trained by a new sample set obtained by combining the given samples. After the features are extracted, the classification is performed to determine whether the diffuser falls off. The camera device can be more efficiently detected by the diffuser falling off, and The detection accuracy is higher.

本公开的其他特征和优点将在随后的说明书中阐述,或者,部分特征和优点可以从说明书推知或毫无疑义地确定,或者通过实施本公开的上述技术即可得知。Additional features and advantages of the present disclosure will be set forth in the description that follows, or some may be inferred or unambiguously determined from the description, or may be learned by practicing the above-described techniques of the present disclosure.

为使本公开的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present disclosure more obvious and easy to understand, the preferred embodiments are exemplified below, and are described in detail as follows in conjunction with the accompanying drawings.

附图说明Description of drawings

为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the specific embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the specific embodiments or the prior art. Obviously, the accompanying drawings in the following description The drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.

图1为本发明实施例提供的一种处理设备的结构示意图;FIG. 1 is a schematic structural diagram of a processing device according to an embodiment of the present invention;

图2为本发明实施例提供的一种扩散器脱落检测方法的流程图;2 is a flowchart of a method for detecting a diffuser falling off according to an embodiment of the present invention;

图3为本发明实施例提供的一种特征提取网络训练方法的流程图;3 is a flowchart of a feature extraction network training method provided by an embodiment of the present invention;

图4为本发明实施例提供的一种给定样本的示意图;4 is a schematic diagram of a given sample provided by an embodiment of the present invention;

图5为本发明实施例提供的一种训练特征提取网络的示意图;5 is a schematic diagram of a training feature extraction network provided by an embodiment of the present invention;

图6为本发明实施例提供的另一种训练特征提取网络的示意图;6 is a schematic diagram of another training feature extraction network provided by an embodiment of the present invention;

图7为本发明实施例提供的一种扩散器脱落检测装置的结构框图。FIG. 7 is a structural block diagram of a diffuser falling-off detection device according to an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合附图对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of them. example. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

随着3D感测技术在智能终端上的应用,对3D摄像模组的扩散器脱落检测成为新问题。智能终端厂商或摄像模组厂商对于扩散器的检测精度要求在99.9%以上,尤其是要尽量降低良品的误识。在智能终端用户实际使用智能终端时,也存在检测扩散器是否脱落的需要。现有的检测扩散器是否脱落的方法精度较差,无法满足厂商或用户需求。为改善此问题,本发明实施例提供了一种扩散器脱落检测方法、装置及电子设备,以下对本发明实施例进行详细介绍。With the application of 3D sensing technology in smart terminals, the detection of diffuser shedding of 3D camera modules has become a new problem. Smart terminal manufacturers or camera module manufacturers require a detection accuracy of more than 99.9% for diffusers, especially to minimize misidentification of good products. When the smart terminal user actually uses the smart terminal, there is also a need to detect whether the diffuser falls off. The existing methods for detecting whether the diffuser falls off have poor precision and cannot meet the needs of manufacturers or users. In order to improve this problem, the embodiments of the present invention provide a method, device and electronic device for detecting the falling off of a diffuser, and the embodiments of the present invention will be described in detail below.

实施例一:Example 1:

首先,参照图1来描述用于实现本发明实施例的扩散器脱落检测方法、装置及电子设备的示例电子设备100。First, an example electronic device 100 for implementing the diffuser shedding detection method, apparatus, and electronic device according to an embodiment of the present invention will be described with reference to FIG. 1 .

如图1所示的一种电子设备的结构示意图,电子设备100包括一个或多个处理器102、一个或多个存储装置104、输入装置106、输出装置108以及图像采集装置110,这些组件通过总线系统112和/或其它形式的连接机构(未示出)互连。应当注意,图1所示的电子设备100的组件和结构只是示例性的,而非限制性的,根据需要,所述电子设备也可以具有其他组件和结构。As shown in FIG. 1 is a schematic structural diagram of an electronic device, the electronic device 100 includes one or more processors 102, one or more storage devices 104, an input device 106, an output device 108, and an image acquisition device 110. These components are The bus system 112 and/or other form of connection mechanism (not shown) are interconnected. It should be noted that the components and structures of the electronic device 100 shown in FIG. 1 are only exemplary and not restrictive, and the electronic device may also have other components and structures as required.

所述处理器102可以采用数字信号处理器(DSP)、现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)中的至少一种硬件形式来实现,所述处理器102可以是中央处理单元(CPU)或者具有数据处理能力和/或指令执行能力的其它形式的处理单元中的一种或几种的组合,并且可以控制所述电子设备100中的其它组件以执行期望的功能。The processor 102 may be implemented in at least one hardware form of a digital signal processor (DSP), a field programmable gate array (FPGA), and a programmable logic array (PLA), and the processor 102 may be a central processing unit. Unit (CPU) or one or a combination of other forms of processing units with data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device 100 to perform desired functions.

所述存储装置104可以包括一个或多个计算机程序产品,所述计算机程序产品可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。所述易失性存储器例如可以包括随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。所述非易失性存储器例如可以包括只读存储器(ROM)、硬盘、闪存等。在所述计算机可读存储介质上可以存储一个或多个计算机程序指令,处理器102可以运行所述程序指令,以实现下文所述的本发明实施例中(由处理器实现)的客户端功能以及/或者其它期望的功能。在所述计算机可读存储介质中还可以存储各种应用程序和各种数据,例如所述应用程序使用和/或产生的各种数据等。The storage device 104 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and/or cache memory, or the like. The non-volatile memory may include, for example, read only memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 102 may execute the program instructions to implement the client functions (implemented by the processor) in the embodiments of the present invention described below. and/or other desired functionality. Various application programs and various data, such as various data used and/or generated by the application program, etc. may also be stored in the computer-readable storage medium.

所述输入装置106可以是用户用来输入指令的装置,并且可以包括键盘、鼠标、麦克风和触摸屏等中的一个或多个。The input device 106 may be a device used by a user to input instructions, and may include one or more of a keyboard, mouse, microphone, touch screen, and the like.

所述输出装置108可以向外部(例如,用户)输出各种信息(例如,图像或声音),并且可以包括显示器、扬声器等中的一个或多个。The output device 108 may output various information (eg, images or sounds) to the outside (eg, a user), and may include one or more of a display, a speaker, and the like.

所述图像采集装置110可以拍摄用户期望的图像(例如照片、视频等),并且将所拍摄的图像存储在所述存储装置104中以供其它组件使用。所述图像采集装置110包括3D摄像模组,该3D摄像模组包括扩散器。The image capture device 110 may capture images (eg, photos, videos, etc.) desired by the user, and store the captured images in the storage device 104 for use by other components. The image acquisition device 110 includes a 3D camera module, and the 3D camera module includes a diffuser.

示例性地,用于实现根据本发明实施例的扩散器脱落检测方法、装置及系统的示例电子设备可以被实现为诸如智能手机、平板电脑、计算机等智能终端。Exemplarily, exemplary electronic devices for implementing the method, apparatus, and system for detecting diffuser shedding according to embodiments of the present invention may be implemented as smart terminals such as smart phones, tablet computers, and computers.

实施例二:Embodiment 2:

参见图2所示的一种扩散器脱落检测方法的流程图,该扩散器设置于摄像装置,该方法可由前述实施例提供的电子设备执行,该方法具体包括如下步骤:Referring to the flow chart of a method for detecting the falling off of a diffuser shown in FIG. 2 , the diffuser is arranged in a camera device, and the method can be performed by the electronic equipment provided in the foregoing embodiment, and the method specifically includes the following steps:

步骤S202,通过摄像装置获取待检测图像。Step S202, the image to be detected is acquired by the camera device.

该摄像装置既可以安装于智能终端上,也可以是独立使用的。在对摄像装置进行扩散器脱落检测时,由该摄像装置采集图像,作为待检测图像。例如,通过上述智能终端接收及存储该待检测图像,或其他与该摄像装置连接的外接设备接收及存储该待检测图像。The camera device can be installed on the smart terminal, or can be used independently. When the camera device is subjected to the detection of the diffuser falling off, the camera device captures an image as the image to be detected. For example, the to-be-detected image is received and stored by the above-mentioned intelligent terminal, or the to-be-detected image is received and stored by other external devices connected to the camera device.

步骤S204,将待检测图像输入预先训练的特征提取网络,以使特征提取网络提取待检测图像的特征。Step S204, input the image to be detected into a pre-trained feature extraction network, so that the feature extraction network extracts the features of the image to be detected.

其中,特征提取网络是由给定样本进行组合得到的新样本集训练生成的。由特征提取网络进行深度学习的方式,特征提取的准确度更高,且不需要人工调整参数,但是运算速度相对较慢,需要预先对模型进行训练。Among them, the feature extraction network is generated by training a new sample set obtained by combining the given samples. The method of deep learning by the feature extraction network has higher accuracy of feature extraction and does not require manual adjustment of parameters, but the operation speed is relatively slow, and the model needs to be trained in advance.

由于扩散器脱落的情况并不常见,因此存在脱落样本少、需要处理情况多的问题。上述给定样本包括脱落样本和非脱落样本,本实施例可以将脱落样本以及非脱落样本进行组合,例如一个脱落样本与一个非脱落样本组合、一个脱落样本与两个非脱落样本组合、两个脱落样本组合或者两个非脱落样本组合等方式,得到新样本组,该新样本组的数量大于脱落样本与正常样本的数量和,将上述新样本组构成的新样本集作为特征提取网络的训练样本集。通过上述方式增加了特征提取网络的训练样本数量,从而可以仅通过原始的小样本数据获得更准确的提取模型。Since it is uncommon for the diffuser to fall off, there are few samples that fall off and many cases to deal with. The above given samples include shedding samples and non-shedding samples. In this embodiment, shedding samples and non-shedding samples can be combined, for example, a shedding sample is combined with a non-shedding sample, a shedding sample is combined with two non-shedding samples, and two A new sample group is obtained by a combination of dropped samples or a combination of two non-dropped samples. The number of the new sample group is greater than the sum of the number of dropped samples and normal samples, and the new sample set formed by the above new sample group is used as the training of the feature extraction network. sample set. The above method increases the number of training samples of the feature extraction network, so that a more accurate extraction model can be obtained only from the original small sample data.

步骤S206,将特征输入预先训练的分类器,得到分类结果。Step S206, input the feature into the pre-trained classifier to obtain a classification result.

在训练分类器时,输入的样本为上述特征提取网络提取训练样本得到的特征,可以将每个训练样本表示为一个特征向量。将对应于脱落样本的特征向量标记为一类,将对应于非脱落样本的特征向量标记为另一类,通过两者对分类器进行训练。其中,脱落样本为扩散器脱落时摄像装置采集的图像;非脱落样本包括正常样本和攻击样本,该正常样本为扩散器正常工作时摄像装置采集的图像;该攻击样本为近似脱落信号,是在扩散器正常安装工作,但用户操作不当或其他因素导致拍摄异常的情况下采集到的图像。When training the classifier, the input samples are the features obtained by the above-mentioned feature extraction network extracting the training samples, and each training sample can be represented as a feature vector. The feature vectors corresponding to the shedding samples are labeled as one class, and the feature vectors corresponding to the non-dropping samples are labeled as another class, and the classifier is trained by both. Among them, the detached sample is the image collected by the camera when the diffuser is detached; the non-detached sample includes a normal sample and an attack sample, and the normal sample is the image collected by the camera when the diffuser is working normally; the attack sample is an approximate detachment signal, which is in the The diffuser is installed and working normally, but the image is captured when the user is improperly operated or other factors cause the shooting to be abnormal.

上述分类器训练完成后,即可对特征提取网络提取的特征进行分类。After the above classifier is trained, the features extracted by the feature extraction network can be classified.

步骤S208,根据分类结果确定是否发生扩散器脱落。In step S208, it is determined whether the diffuser falls off according to the classification result.

在分类器输出待检测图像的特征的分类结果后,即可根据该分类结果确定摄像装置是否发生扩散器脱落的情况。当确定发生扩散器脱落时,可以进行报警提醒,从而方便智能终端的用户出现问题需要进行维修,或方便厂商将问题摄像装置剔除或进行维修。After the classifier outputs the classification result of the features of the image to be detected, it can be determined whether the diffuser falls off in the camera device according to the classification result. When it is determined that the diffuser falls off, an alarm reminder can be given, so that it is convenient for the user of the smart terminal to have a problem and need to be repaired, or for the manufacturer to remove or repair the faulty camera device.

本发明实施例提供的上述扩散器脱落检测方法,可以通过预先训练的特征提取网络对待检测图像进行特征提取,该待采集图像是由待检测摄像装置获取的,该特征提取网络是由给定样本进行组合得到的新样本组进行训练得到的,在提取得到特征后进行分类,并确定是否发生扩散器脱落的情况,可以对摄像装置进行更高效的扩散器脱落检测,且检测准确度更高。The above-mentioned diffuser shedding detection method provided by the embodiment of the present invention can perform feature extraction on the image to be detected through a pre-trained feature extraction network, the image to be collected is acquired by the camera device to be detected, and the feature extraction network is based on a given sample. The new sample group obtained by the combination is obtained by training, and after the features are extracted, the classification is performed, and whether the diffuser falls off is determined, and the camera device can be more efficiently detected.

在上述方法中使用的特征提取网络,是基于小样本的特征学习方案进行训练的,参见图3所示的特征提取网络训练方法的流程图,该方法具体包括如下步骤:The feature extraction network used in the above method is trained based on the feature learning scheme of small samples. Referring to the flowchart of the feature extraction network training method shown in FIG. 3, the method specifically includes the following steps:

步骤S302,将新样本集中的一个新样本组输入特征提取网络。新样本组包括至少两个给定样本。Step S302, a new sample group in the new sample set is input into the feature extraction network. The new sample set includes at least two of the given samples.

该特征提取网络可以是现有的可进行图像特征提取的神经网络。对给定样本进行组合,组合方式可以是随机样本组合,例如任意两个给定样本组合或者三个给定样本组合,将组合后的多个给定样本作为一个新样本组,输入到特征提取网络中。通过将新样本组的形式可以增加训练样本的数量。The feature extraction network may be an existing neural network capable of image feature extraction. The given samples are combined, and the combination method can be a random sample combination, such as any combination of two given samples or three given samples, and the combined multiple given samples are used as a new sample group and input to feature extraction. in the network. The number of training samples can be increased by incorporating new samples in the form of groups.

步骤S304,通过特征提取网络分别提取每个给定样本的特征。In step S304, the features of each given sample are respectively extracted through the feature extraction network.

在进行训练前,特征提取网络使用初始参数进行给定样本的特征提取。Before training, the feature extraction network uses the initial parameters to perform feature extraction for a given sample.

步骤S306,如果两个给定样本属于相同类别的样本,将两个给定样本的特征进行最小化处理,以训练特征提取网络。Step S306, if the two given samples belong to the same category of samples, minimize the features of the two given samples to train a feature extraction network.

上述类别包括非脱落类别和脱落类别,将给定样本中的正常样本和攻击样本划分为非脱落类别,将脱落样本划分为脱落类别。参见图4所示的给定样本的示意图,自左至右依次是正常样本、攻击样本和脱落样本,以IR(Infrared Radiation,红外线)图像为例。其中,正常样本是扩散器正常工作时摄像装置采集的图像;攻击样本指近似脱落信号,是在扩散器正常安装工作,但用户操作不当或其他因素导致拍摄异常的情况下采集到的图像,一般在图像中会有一个比较明显的光斑,例如用户的手指非常靠近摄像装置的镜头;脱落样本是在扩散器脱落时摄像装置采集的图像,由于摄像装置的光源前无扩散器,导致光源发出的光为较窄的一束,采集的图像也仅很小一部分存在内容,其他部分无。The above categories include non-drop-off classes and drop-off classes, normal samples and attack samples in a given sample are classified as non-drop-off classes, and drop-off samples are classified as drop-off classes. Referring to the schematic diagram of a given sample shown in FIG. 4 , from left to right are a normal sample, an attack sample, and a shedding sample, taking an IR (Infrared Radiation, infrared) image as an example. Among them, the normal sample is the image collected by the camera device when the diffuser is working normally; the attack sample refers to the approximate shedding signal, which is the image collected when the diffuser is installed and worked normally, but the user's operation is improper or other factors cause abnormal shooting. There will be a relatively obvious light spot in the image, for example, the user's finger is very close to the lens of the camera device; the detached sample is the image collected by the camera device when the diffuser falls off. Since there is no diffuser in front of the light source of the camera device, the light source emits light. The light is a narrow beam, and only a small part of the collected image has content, and other parts have no content.

步骤S308,如果两个给定样本不属于相同类别的样本,将两个给定样本的特征进行最大化处理,以训练特征提取网络。Step S308, if the two given samples do not belong to the same category of samples, the features of the two given samples are maximized to train a feature extraction network.

对上述新样本组中属于相同类别的给定样本,将两个给定样本的特征进行最小化处理;对上述新样本组中属于不同类别的给定样本,将两个给定样本的特征进行最大化处理;从而优化上述特征提取网络的参数。最大化和最小化处理,可以通过特征对应的特征向量的距离来进行,例如:计算两个特征向量间的距离,最大化即将该距离最大化,最小化即将该距离最小化。例如,样本1得到特征为F1(多维向量),样本2得到特征为F2(同样维度的特征向量),最大化就使得向量之间距离最大Max|F1-F2|^2,最小化为Min|F1-F2|^2。通过最大化/最小化上述特征向量的距离后,就可以回传特征提取网络,最终优化特征提取网络的参数,使其提取的特征进行分类的结果更准确。其中优化上述网络的方法,可以采用现有网络优化方法,例如梯度下降优化算法等。For the given samples belonging to the same category in the above new sample group, the features of the two given samples are minimized; for the given samples belonging to different categories in the above new sample group, the features of the two given samples are processed. Maximize processing; thereby optimizing the parameters of the feature extraction network described above. The maximization and minimization processing can be performed by the distance of the feature vector corresponding to the feature, for example: calculating the distance between two feature vectors, maximization is to maximize the distance, and minimization is to minimize the distance. For example, the feature obtained from sample 1 is F 1 (multi-dimensional vector), and the feature obtained from sample 2 is F 2 (feature vector of the same dimension), maximizing the distance between the vectors to make the maximum distance between the vectors Max|F 1 -F 2 |^2, the minimum It becomes Min|F 1 -F 2 |^2. After maximizing/minimizing the distance of the above feature vectors, the feature extraction network can be returned, and the parameters of the feature extraction network can be finally optimized, so that the results of classification of the extracted features are more accurate. The method for optimizing the above network may use an existing network optimization method, such as a gradient descent optimization algorithm.

步骤S310,依次输入所述新样本集中的新样本组,直至特征提取网络收敛时停止。Step S310 , sequentially inputting new sample groups in the new sample set, and stopping when the feature extraction network converges.

在训练过程中,每次输入一个上述新样本组进行训练,得到优化之后的特征提取网络,之后再选取第二批样本,在上述优化的特征提取网络基础上再优化,直到网络收敛为止。In the training process, each time a new sample group is input for training, the optimized feature extraction network is obtained, and then the second batch of samples is selected, and the optimization is performed on the basis of the above-mentioned optimized feature extraction network until the network converges.

考虑到给定样本可能包括三种:正常样本、攻击样本和脱落样本,可以将一个脱落样本、一个正常样本和一个攻击样本作为一个新样本组输入特征提取网络进行训练,也可以随机选择两个样本作为一个新样本组输入特征提取网络进行训练。Considering that a given sample may include three types: normal samples, attack samples and dropout samples, a dropout sample, a normal sample and an attack sample can be used as a new sample group input feature extraction network for training, or two can be randomly selected. The samples are used as a new sample group to input the feature extraction network for training.

参见图5所示的训练特征提取网络的示意图,以一个脱落样本、一个正常样本和一个攻击样本组成新样本组输入特征提取网络为例进行说明。特征提取网络对上述样本进行特征提取,分别得到脱落特征、攻击特征和正常特征。如图5所示,将每两个特征进行最大化或最小化处理,具体为:将攻击特征和正常特征进行最小化处理;将脱落特征和正常特征进行最大化处理;将脱落特征和攻击特征进行最大化处理。在上述方式中每次以三个样本输入,对特征提取网络进行不断训练,直到收敛为止。Referring to the schematic diagram of the training feature extraction network shown in FIG. 5 , the input feature extraction network of a new sample group composed of a shedding sample, a normal sample and an attack sample is taken as an example for description. The feature extraction network performs feature extraction on the above-mentioned samples, and obtains shedding features, attack features and normal features respectively. As shown in Figure 5, each two features are maximized or minimized, specifically: the attack feature and the normal feature are minimized; the shedding feature and the normal feature are maximized; the shedding feature and the attack feature are maximized to maximize processing. In the above method, three samples are input each time, and the feature extraction network is continuously trained until it converges.

参见图6所示的训练特征提取网络的示意图,以随机选择的两个样本输入特征提取网络为例进行说明。每次输入两个样本,在图6中以样本1和样本2为例,两样本为从所有样本中随机挑选,特征提取网络对上述样本进行特征提取,分别得到样本1特征和样本2特征。如图6所示,将两个特征进行最大化或最小化处理,具体为:同类样本进行最小化处理,例如样本1和样本2同属于上述非脱落类别或脱落类别;将不同类样本进行最大化处理,例如样本1和样本2分别属于上述非脱落类别和脱落类别。Referring to the schematic diagram of the training feature extraction network shown in FIG. 6 , the description is given by taking two randomly selected samples to input the feature extraction network as an example. Two samples are input each time. In Figure 6, sample 1 and sample 2 are used as examples. The two samples are randomly selected from all samples. The feature extraction network performs feature extraction on the above samples to obtain sample 1 features and sample 2 features respectively. As shown in Figure 6, the two features are maximized or minimized, specifically: the same samples are minimized, for example, sample 1 and sample 2 belong to the above non-dropout category or dropout category; different types of samples are maximized For example, sample 1 and sample 2 belong to the above-mentioned non-dropout category and dropout category, respectively.

在使用上述分类器进行分类前,还需要对其进行训练,分类器可以是现有的SVM(Support Vector Machine,支持向量机),也可以是其他适用的分类器,本实施例对此不作限定。对分类器的训练过程,可以按如下步骤进行:Before using the above classifier for classification, it needs to be trained. The classifier may be an existing SVM (Support Vector Machine, Support Vector Machine), or other applicable classifiers, which are not limited in this embodiment. . The training process of the classifier can be carried out as follows:

(1)通过预先训练的特征提取网络,对脱落样本、正常样本和攻击样本进行特征提取;(1) Feature extraction is performed on the shedding samples, normal samples and attack samples through a pre-trained feature extraction network;

(2)将脱落样本的特征划分为脱落类别,将正常样本和攻击样本的特征划分为非脱落类别,对分类器进行训练。其中,每个样本表示为一个特征向量,将脱落样本的特征向量归为一类、正常样本以及攻击样本的特征向量归为一类进行训练。(2) The features of the shedding samples are divided into shedding categories, the features of normal samples and attack samples are divided into non-shedding categories, and the classifier is trained. Among them, each sample is represented as a feature vector, and the feature vectors of the dropped samples are classified into one class, and the feature vectors of normal samples and attack samples are classified into one class for training.

上述方法,通过将脱落样本和非脱落样本(包括正常样本和攻击样本)进行成对组合,来增大训练样本集,并且学习得到脱落样本和非脱落样本的特征,由此进行脱落检测,可以基于小样本的脱落样本进行网络训练,并且基于该网络可以进行高效的脱落检测。The above method increases the training sample set by combining the shedding samples and non-shedding samples (including normal samples and attack samples) in pairs, and learns the characteristics of the shedding samples and the non-shedding samples, and thus performs shedding detection, which can be The network is trained based on the dropout samples of small samples, and efficient dropout detection can be performed based on the network.

实施例三:Embodiment three:

对于实施例二中所提供的扩散器脱落检测方法,本发明实施例提供了一种扩散器脱落检测装置,参见图7所示的一种扩散器脱落检测装置的结构框图,包括:For the method for detecting the detachment of a diffuser provided in the second embodiment, the embodiment of the present invention provides a device for detecting the detachment of a diffuser. Referring to the structural block diagram of a device for detecting the detachment of a diffuser shown in FIG. 7 , the device includes:

获取模块701,用于通过摄像装置获取待检测图像;an acquisition module 701, configured to acquire an image to be detected through a camera;

特征提取模块702,用于将待检测图像输入预先训练的特征提取网络,以使特征提取网络提取待检测图像的特征;其中,特征提取网络是由新样本集训练生成的;新样本集是由给定样本进行组合得到的新样本组构成的;The feature extraction module 702 is used to input the image to be detected into a pre-trained feature extraction network, so that the feature extraction network extracts the features of the image to be detected; wherein, the feature extraction network is generated by training a new sample set; the new sample set is composed of It consists of a new sample group obtained by combining the given samples;

分类模块703,用于将特征提输入预先训练的分类器,得到分类结果;A classification module 703, for inputting the feature extraction into a pre-trained classifier to obtain a classification result;

判断模块704,用于根据分类结果确定是否发生扩散器脱落。The judging module 704 is configured to determine whether the diffuser falls off according to the classification result.

本发明实施例提供的上述扩散器脱落检测装置,可以通过预先训练的特征提取网络对待检测图像进行特征提取,该待采集图像是由待检测摄像装置获取的,该特征提取网络是由给定样本进行组合得到的新样本集进行训练得到的,在提取得到特征后进行分类,并确定是否发生扩散器脱落的情况,可以对摄像装置进行更高效的扩散器脱落检测,且检测准确度更高。The above-mentioned diffuser shedding detection device provided by the embodiment of the present invention can perform feature extraction on the image to be detected through a pre-trained feature extraction network. The new sample set obtained by combining is obtained by training, and after the features are extracted, the classification is performed, and whether the diffuser falls off is determined.

在一种实施方式中,上述装置还包括特征提取网络训练模块,用于:将新样本集中的一个新样本组输入特征提取网络;新样本组包括至少两个给定样本;通过特征提取网络分别提取每个给定样本的特征;如果两个给定样本属于相同类别的样本,将两个给定样本的特征进行最小化处理,以训练特征提取网络;类别包括正常类别和脱落类别;如果两个给定样本不属于相同类别的样本,将两个给定样本的特征进行最大化处理,以训练特征提取网络;依次输入所述新样本集中的新样本组,直至特征提取网络收敛时停止。In one embodiment, the above-mentioned apparatus further includes a feature extraction network training module for: inputting a new sample group in the new sample set into the feature extraction network; the new sample group includes at least two given samples; Extract the features of each given sample; if two given samples belong to the same class of samples, the features of the two given samples are minimized to train the feature extraction network; the classes include normal classes and dropout classes; if two If the given samples do not belong to the same category, the features of the two given samples are maximized to train the feature extraction network; new sample groups in the new sample set are sequentially input until the feature extraction network converges.

其中,上述特征提取网络训练模块,还用于:将一个脱落样本、一个正常样本和一个攻击样本组成新样本组输入特征提取网络;将两个给定样本的特征进行最小化处理,以优化特征提取网络的参数的步骤,包括:将攻击样本和正常样本的特征进行最小化处理;将两个给定样本的特征进行最大化处理,以优化特征提取网络的参数的步骤,包括:将脱落样本和正常样本的特征进行最大化处理;将脱落样本和攻击样本的特征进行最大化处理。Among them, the above feature extraction network training module is also used to: form a new sample group of a shedding sample, a normal sample and an attack sample into the feature extraction network; minimize the features of the two given samples to optimize the features The steps of extracting the parameters of the network include: minimizing the features of the attack samples and the normal samples; maximizing the features of the two given samples to optimize the parameters of the feature extraction network, including: removing the dropped samples and the features of normal samples are maximized; the features of shedding samples and attack samples are maximized.

上述特征提取网络训练模块,还用于:随机选择两个给定样本组成新样本组,并将新样本组输入特征提取网络。上述特征提取网络训练模块,还用于:计算两个特征的向量间的距离,将距离最小化,以进行最小化处理。上述特征提取网络训练模块,还用于:计算两个特征的向量间的距离,并将距离最大化,以进行最大化处理。上述特征提取网络训练模块,还用于:根据以下公式计算两个特征的向量间的距离:|F1–F2|^2;其中F1和F2分别表示特征的特征向量。The above feature extraction network training module is also used for: randomly selecting two given samples to form a new sample group, and inputting the new sample group into the feature extraction network. The above feature extraction network training module is also used for: calculating the distance between vectors of two features, and minimizing the distance, so as to perform minimization processing. The above feature extraction network training module is also used for: calculating the distance between vectors of two features, and maximizing the distance, so as to perform maximization processing. The above feature extraction network training module is also used to: calculate the distance between vectors of two features according to the following formula: |F1–F2|^2; where F1 and F2 represent feature vectors of features respectively.

在另一种实施方式中,上述装置还包括分类器训练模块,用于:通过预先训练的特征提取网络,对脱落样本、正常样本和攻击样本进行特征提取;将脱落样本的特征划分为脱落类别,将正常样本和攻击样本的特征划分为非脱落类别,对分类器进行训练。In another embodiment, the above-mentioned apparatus further includes a classifier training module, which is used for: extracting features from the drop-off samples, normal samples and attack samples through a pre-trained feature extraction network; classifying the features of the drop-off samples into drop-off categories , the features of normal samples and attack samples are divided into non-dropout categories, and the classifier is trained.

在另一种实施方式中,上述装置还包括提醒模块,用于当确定发生扩散器脱落时,进行报警提醒。In another embodiment, the above-mentioned device further includes a reminder module, configured to issue an alarm reminder when it is determined that the diffuser falls off.

本实施例所提供的装置,其实现原理及产生的技术效果和前述实施例相同,为简要描述,装置实施例部分未提及之处,可参考前述方法实施例中相应内容。The implementation principle and the technical effects of the device provided in this embodiment are the same as those in the foregoing embodiments. For brief description, for the parts not mentioned in the device embodiment, reference may be made to the corresponding content in the foregoing method embodiments.

此外,本实施例还提供了一种电子设备,包括存储器和处理器,存储器中存储有可在处理器上运行的计算机程序,处理器执行计算机程序时实现上述实施例二提供的扩散器脱落检测方法的步骤。In addition, this embodiment also provides an electronic device, including a memory and a processor, the memory stores a computer program that can run on the processor, and when the processor executes the computer program, the diffuser shedding detection provided in the second embodiment above is implemented. steps of the method.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的设备具体工作过程,可以参考前述实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the device described above, reference may be made to the corresponding process in the foregoing embodiments, and details are not repeated here.

本实施例还提供了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,计算机程序被处理器运行时执行上述实施例二所提供的方法的步骤。This embodiment also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is run by a processor, the steps of the method provided in the second embodiment above are executed.

本发明实施例所提供的一种扩散器脱落检测方法、装置及处理设备的计算机程序产品,包括存储了程序代码的计算机可读存储介质,所述程序代码包括的指令可用于执行前面方法实施例中所述的方法,具体实现可参见方法实施例,在此不再赘述。所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,RandomAccess Memory)、磁碟或者光盘等各种可以存储程序代码的介质。A computer program product of a method, an apparatus, and a processing device for a diffuser shedding detection provided by the embodiments of the present invention includes a computer-readable storage medium storing program codes, and the instructions included in the program codes can be used to execute the foregoing method embodiments. For the specific implementation of the method described in , please refer to the method embodiment, which will not be repeated here. The functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, removable hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes.

最后应说明的是:以上所述实施例,仅为本发明的具体实施方式,用以说明本发明的技术方案,而非对其限制,本发明的保护范围并不局限于此,尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本发明实施例技术方案的精神和范围,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。Finally, it should be noted that the above-mentioned embodiments are only specific implementations of the present invention, and are used to illustrate the technical solutions of the present invention, but not to limit them. The protection scope of the present invention is not limited thereto, although referring to the foregoing The embodiment has been described in detail the present invention, those of ordinary skill in the art should understand: any person skilled in the art who is familiar with the technical field within the technical scope disclosed by the present invention can still modify the technical solutions described in the foregoing embodiments. Or can easily think of changes, or equivalently replace some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be covered in the present invention. within the scope of protection. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (10)

1. A method for detecting the dropping of a diffuser, wherein the diffuser is provided in an image pickup device, the method comprising:
acquiring an image to be detected through the camera device;
inputting the image to be detected into a pre-trained feature extraction network so that the feature extraction network extracts the features of the image to be detected; wherein the feature extraction network is generated by a new sample set training; the new sample set is formed by a new sample group obtained by combining given samples;
inputting the features into a pre-trained classifier to obtain a classification result;
and determining whether the diffuser falling-off occurs according to the classification result.
2. The method of claim 1, further comprising:
inputting one of the new sample sets into a feature extraction network; the new set of samples comprises at least two of the given samples;
respectively extracting the features of each given sample through the feature extraction network;
if the two given samples belong to the same class of samples, performing minimization processing on the features of the two given samples to train the feature extraction network; the categories include a non-shedding category and a shedding category;
if the two given samples do not belong to the same class of samples, performing maximization processing on the features of the two given samples to train the feature extraction network;
and sequentially inputting new sample groups in the new sample set until the feature extraction network converges.
3. The method of claim 2, wherein said step of inputting one of said new sample sets into a feature extraction network comprises:
inputting a new sample group consisting of a shedding sample, a normal sample and an attack sample into the feature extraction network;
said step of minimizing said features of both said given samples comprises: minimizing the features of the attack and normal samples;
said step of maximizing said features of both said given samples comprises: maximizing the features of the shed and normal samples; maximizing the features of the shedding sample and the attacking sample.
4. The method of claim 2, wherein said step of inputting one of said new sample sets into a feature extraction network comprises:
randomly selecting two of the given samples to form the new sample set, and inputting the new sample set into the feature extraction network.
5. The method of claim 2, wherein said step of minimizing said features of said two given samples comprises:
and calculating the distance between the vectors of the two features, and minimizing the distance to perform minimization processing.
6. The method of claim 2, wherein said step of maximizing said features of said two given samples comprises:
and calculating the distance between the vectors of the two features, and maximizing the distance to perform maximization processing.
7. The method of claim 1, further comprising:
extracting the characteristics of the shedding sample, the normal sample and the attack sample through the pre-trained characteristic extraction network;
and dividing the characteristics of the shedding sample into shedding categories, dividing the characteristics of the normal sample and the attacking sample into non-shedding categories, and training the classifier.
8. A device for detecting the dropping of a diffuser, wherein the diffuser is provided in an image pickup device, the device comprising:
the acquisition module is used for acquiring an image to be detected through the camera device;
the characteristic extraction module is used for inputting the image to be detected into a pre-trained characteristic extraction network so that the characteristic extraction network extracts the characteristics of the image to be detected; wherein the feature extraction network is generated by a new sample set training; the new sample set is formed by a new sample group obtained by combining given samples;
the classification module is used for inputting the characteristics into a pre-trained classifier to obtain a classification result;
and the judging module is used for determining whether the diffuser falls off or not according to the classification result.
9. An electronic device comprising a memory and a processor, the memory having stored therein a computer program operable on the processor, wherein the processor implements the steps of the method of any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, having stored thereon a computer program, characterized in that the computer program, when being executed by a processor, is adapted to carry out the steps of the method of any of the claims 1 to 7.
CN201810810454.3A 2018-07-20 2018-07-20 Diffuser shedding detection method, device and electronic equipment Active CN109063761B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810810454.3A CN109063761B (en) 2018-07-20 2018-07-20 Diffuser shedding detection method, device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810810454.3A CN109063761B (en) 2018-07-20 2018-07-20 Diffuser shedding detection method, device and electronic equipment

Publications (2)

Publication Number Publication Date
CN109063761A CN109063761A (en) 2018-12-21
CN109063761B true CN109063761B (en) 2020-11-03

Family

ID=64834877

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810810454.3A Active CN109063761B (en) 2018-07-20 2018-07-20 Diffuser shedding detection method, device and electronic equipment

Country Status (1)

Country Link
CN (1) CN109063761B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111310578B (en) * 2020-01-17 2023-05-02 上海乐普云智科技股份有限公司 Method and device for generating heart beat data sample classification network

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107396094A (en) * 2017-08-17 2017-11-24 上海大学 The automatic testing method of single camera damage towards in multi-cam monitoring system
CN108198175A (en) * 2017-12-28 2018-06-22 广东欧珀移动通信有限公司 Detection method, detection device, computer equipment and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160241733A1 (en) * 2015-02-18 2016-08-18 Xerox Corporation Led illumination uniformity

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107396094A (en) * 2017-08-17 2017-11-24 上海大学 The automatic testing method of single camera damage towards in multi-cam monitoring system
CN108198175A (en) * 2017-12-28 2018-06-22 广东欧珀移动通信有限公司 Detection method, detection device, computer equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN109063761A (en) 2018-12-21

Similar Documents

Publication Publication Date Title
CN105335722B (en) Detection system and method based on depth image information
CN105933589B (en) Image processing method and terminal
CN110909825B (en) Detecting objects in visual data using probabilistic models
JP5160235B2 (en) Detection and tracking of objects in images
US9665803B2 (en) Image processing apparatus and image processing method
EP3709266A1 (en) Human-tracking methods, apparatuses, systems, and storage media
JP6482195B2 (en) Image recognition apparatus, image recognition method, and program
CN111783505A (en) Recognition method, device and computer-readable storage medium for fake face
WO2016187888A1 (en) Keyword notification method and device based on character recognition, and computer program product
JP7007829B2 (en) Information processing equipment, information processing methods and programs
JP2015207280A (en) target identification method and target identification device
JP2016071830A (en) Object tracking device, object tracking system, object tracking method, display control device, object detection device, program, and recording medium
JP2016191975A (en) Machine learning apparatus
KR20160053833A (en) Improved data comparison method
JP2015106197A (en) Image processing device and image processing method
JPWO2013122009A1 (en) Reliability acquisition device, reliability acquisition method, and reliability acquisition program
CN109815823A (en) Data processing methods and related products
CN112417970A (en) Target object identification method, device and electronic system
US20210366129A1 (en) Image processing apparatus, image processing method, and storage medium
JP2012048624A (en) Learning device, method and program
CN109063761B (en) Diffuser shedding detection method, device and electronic equipment
CN108875488B (en) Object tracking method, object tracking apparatus, and computer-readable storage medium
US20240127631A1 (en) Liveness detection method and apparatus, and computer device
JP6647134B2 (en) Subject tracking device and program thereof
CN107315985A (en) A kind of iris identification method and terminal

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
TR01 Transfer of patent right

Effective date of registration: 20241212

Address after: No. 257, 2nd Floor, Building 9, No. 2 Huizhu Road, Liangjiang New District, Yubei District, Chongqing 401120

Patentee after: Force Map New (Chongqing) Technology Co.,Ltd.

Country or region after: China

Address before: 313, block a, No.2, south academy of Sciences Road, Haidian District, Beijing

Patentee before: BEIJING KUANGSHI TECHNOLOGY Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right