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

WO2021217858A1 - Target identification method and apparatus based on picture, and electronic device and readable storage medium - Google Patents

Target identification method and apparatus based on picture, and electronic device and readable storage medium Download PDF

Info

Publication number
WO2021217858A1
WO2021217858A1 PCT/CN2020/098990 CN2020098990W WO2021217858A1 WO 2021217858 A1 WO2021217858 A1 WO 2021217858A1 CN 2020098990 W CN2020098990 W CN 2020098990W WO 2021217858 A1 WO2021217858 A1 WO 2021217858A1
Authority
WO
WIPO (PCT)
Prior art keywords
training
scene
picture
target recognition
layer
Prior art date
Application number
PCT/CN2020/098990
Other languages
French (fr)
Chinese (zh)
Inventor
童新宇
刘莉红
刘玉宇
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021217858A1 publication Critical patent/WO2021217858A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • 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/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]

Definitions

  • the embodiment of the present application uses the scene segmentation network and the target recognition network to input a picture of the front engine hood of a truck into the scene segmentation network to obtain a scene picture including only the front engine hood of the truck, and the truck
  • the scene picture of the background where the front engine hood is located, and the scene picture of the front engine hood of the truck is input to the target recognition network to obtain a picture of the area where the front engine hood of the truck is hit by a high-altitude projectile. This area picture is the target picture.
  • the step I includes: extracting the size of the convolution kernel of the convolution operation and setting the expansion rate, using the size of the convolution kernel and the expansion rate as input parameters of the pre-built expansion convolution calculation formula, and calculating The expanded convolution kernel size of the expanded convolution operation is obtained, and the first target recognition layer is constructed by combining the convolution kernel size and the expanded convolution kernel size.

Landscapes

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

Abstract

A target identification method and apparatus based on a picture, and an electronic device and a computer-readable storage medium. The method comprises: by using a scene segmentation network, executing a convolution operation, an activation operation and a pooling operation on an original picture, so as to obtain a first feature set (S1); in the scene segmentation network, executing an up-sampling operation, the convolution operation and the activation operation on the first feature set, so as to obtain a second feature set, and performing a classification operation on the second feature set according to a pre-constructed classification function, so as to obtain a scene picture set (S2); and inputting the scene picture set into a target identification network to perform target identification, so as obtain a target picture (S3). The method further relates to blockchain technology, and the original picture and the target picture can be stored in a blockchain node. By means of the method, the problem of excessive calculation resources being occupied due to the large amount of calculation required during a target identification process is solved.

Description

基于图片的目标识别方法、装置、电子设备及可读存储介质Image-based target recognition method, device, electronic equipment and readable storage medium
本申请要求于2020年4月30日提交中国专利局、申请号为CN202010360752.4、发明名称为“基于图片的目标识别方法、装置及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on April 30, 2020, the application number is CN202010360752.4, and the invention title is "Image-based target recognition method, device and readable storage medium". All of them The content is incorporated in this application by reference.
技术领域Technical field
本申请涉及人工智能技术领域,尤其涉及一种基于图片的目标识别的方法、装置、电子设备及可读存储介质。This application relates to the field of artificial intelligence technology, and in particular to a method, device, electronic device, and readable storage medium for image-based target recognition.
背景技术Background technique
基于图片的目标识别是指从图片中将一种类型的目标从其它目标中被区分出来的过程。当下基于图片的目标识别主要分为传统机器学习算法和深度学习算法,传统机器学习算法先对图片进行数字图像处理,然后基于支持向量机、决策树等机器学习进行识别图片中的目标。深度学习算法主要以卷积神经网络为基础,直接识别图片中的目标。Picture-based target recognition refers to the process of distinguishing one type of target from other targets in a picture. The current picture-based target recognition is mainly divided into traditional machine learning algorithms and deep learning algorithms. The traditional machine learning algorithms first perform digital image processing on the pictures, and then recognize the targets in the pictures based on machine learning such as support vector machines and decision trees. The deep learning algorithm is mainly based on the convolutional neural network, which directly recognizes the target in the picture.
发明人意识到两种方法都可以识别图片中的目标,但传统机器学习算法处理步骤繁琐且识别准确率不高,深度学习算法虽然识别准确率高,但由于卷积神经网络是直接对图片进行目标识别,并没有对目标识别进行步骤拆分,故识别过程需要进行大量的计算,占用过多计算资源。The inventor realized that both methods can identify the target in the picture, but the traditional machine learning algorithm has cumbersome processing steps and low recognition accuracy. Although the deep learning algorithm has high recognition accuracy, because the convolutional neural network directly performs the image Target recognition does not split the steps of target recognition, so the recognition process requires a lot of calculations and takes up too much computing resources.
发明内容Summary of the invention
本申请提供一种基于图片的目标识别方法、装置、电子设备及计算机可读存储介质,其主要目的在于拆分目标识别的步骤,解决识别过程需要进行大量计算,占用过多计算资源的问题。This application provides a picture-based target recognition method, device, electronic equipment, and computer-readable storage medium, the main purpose of which is to split the target recognition steps and solve the problem that the recognition process requires a lot of calculations and takes up too much computing resources.
为实现上述目的,本申请提供的一种基于图片的目标识别方法,包括:In order to achieve the above objective, a picture-based target recognition method provided by this application includes:
利用场景分割网络,对原始图片执行卷积操作、激活操作及池化操作得到第一特征集;Use the scene segmentation network to perform convolution, activation, and pooling operations on the original image to obtain the first feature set;
在所述场景分割网络内,对所述第一特征集执行上采样操作、所述卷积操作及所述激活操作,得到第二特征集,并根据预先构建的分类函数,对所述第二特征集进行分类操作得到场景图片集;In the scene segmentation network, perform an upsampling operation, the convolution operation, and the activation operation on the first feature set to obtain a second feature set, and according to a pre-built classification function, perform an upsampling operation, the convolution operation and the activation operation on the second feature set. Perform a classification operation on the feature set to obtain a scene picture set;
将所述场景图片集输入至目标识别网络中进行目标识别得到目标图片。The scene picture set is input into a target recognition network for target recognition to obtain a target picture.
为了解决上述问题,本申请还提供一种基于图片的目标识别装置,所述装置包括:In order to solve the above-mentioned problems, this application also provides a picture-based target recognition device, which includes:
第一特征获取模块,用于利用场景分割网络,对原始图片执行卷积操作、激活操作及池化操作得到第一特征集;The first feature acquisition module is configured to use the scene segmentation network to perform convolution, activation, and pooling operations on the original image to obtain the first feature set;
场景图片提取模块,用于在所述场景分割网络内,对所述第一特征集执行上采样操作、所述卷积操作及所述激活操作,得到第二特征集,并根据预先构建的分类函数,对所述第二特征集进行分类操作得到场景图片集;The scene picture extraction module is configured to perform an up-sampling operation, the convolution operation, and the activation operation on the first feature set in the scene segmentation network to obtain a second feature set, which is based on a pre-built classification Function to perform a classification operation on the second feature set to obtain a scene picture set;
目标图片识别模块,用于将所述场景图片集输入至目标识别网络中进行目标识别得到目标图片。The target picture recognition module is used to input the scene picture set into the target recognition network for target recognition to obtain the target picture.
为了解决上述问题,本申请还提供一种电子设备,所述电子设备包括:In order to solve the above-mentioned problems, the present application also provides an electronic device, which includes:
存储器,存储至少一个指令;及Memory, storing at least one instruction; and
处理器,执行所述存储器中存储的指令时实现如下步骤:The processor implements the following steps when executing instructions stored in the memory:
利用场景分割网络,对原始图片执行卷积操作、激活操作及池化操作得到第一特征集;Use the scene segmentation network to perform convolution, activation, and pooling operations on the original image to obtain the first feature set;
在所述场景分割网络内,对所述第一特征集执行上采样操作、所述卷积操作及所述激活操作,得到第二特征集,并根据预先构建的分类函数,对所述第二特征集进行分类操作 得到场景图片集;In the scene segmentation network, perform an upsampling operation, the convolution operation, and the activation operation on the first feature set to obtain a second feature set, and according to a pre-built classification function, perform an upsampling operation, the convolution operation and the activation operation on the second feature set. Perform a classification operation on the feature set to obtain a scene picture set;
将所述场景图片集输入至目标识别网络中进行目标识别得到目标图片。The scene picture set is input into a target recognition network for target recognition to obtain a target picture.
为了解决上述问题,本申请还提供一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现如下步骤:In order to solve the above problems, the present application also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the following steps are implemented:
利用场景分割网络,对原始图片执行卷积操作、激活操作及池化操作得到第一特征集;Use the scene segmentation network to perform convolution, activation, and pooling operations on the original image to obtain the first feature set;
在所述场景分割网络内,对所述第一特征集执行上采样操作、所述卷积操作及所述激活操作,得到第二特征集,并根据预先构建的分类函数,对所述第二特征集进行分类操作得到场景图片集;In the scene segmentation network, perform an upsampling operation, the convolution operation, and the activation operation on the first feature set to obtain a second feature set, and according to a pre-built classification function, perform an upsampling operation, the convolution operation and the activation operation on the second feature set. Perform a classification operation on the feature set to obtain a scene picture set;
将所述场景图片集输入至目标识别网络中进行目标识别得到目标图片。The scene picture set is input into a target recognition network for target recognition to obtain a target picture.
本申请实施例先利用场景分割网络,对原始图片进行卷积操作、激活操作及池化操作,以达到从原始图片中提取图片特征,并缩减图片像素规模的目的,同时根据原始图片内所包括的场景,结合上采样操作及分类函数对图片特征进行场景分离得到场景图片集,由于将原始图片拆分为若干场景图片,因此进一步缩减图片尺寸规模,同时使用目标识别网络直接从场景图片集中识别出图片。由于本申请使用包括卷积操作、激活操作及池化操作的深度学习网络,故目标识别准确率高,同时将原始图片按照特征提取、场景分割及目标识别循环而进进行处理,每个过程都有涉及到对图片尺寸进行缩小的作用,因此本申请可以解决识别过程需要进行大量计算,占用过多计算资源的问题。The embodiment of this application first uses the scene segmentation network to perform convolution, activation, and pooling operations on the original picture to achieve the purpose of extracting picture features from the original picture and reducing the size of the picture pixel, and at the same time according to the original picture included The scene of the scene, combined with the upsampling operation and the classification function to separate the picture features to obtain the scene picture set. Since the original picture is split into several scene pictures, the picture size is further reduced, and the target recognition network is used to directly identify from the scene picture set. Picture. Since this application uses a deep learning network that includes convolution operations, activation operations, and pooling operations, the accuracy of target recognition is high. At the same time, the original image is processed in a cycle of feature extraction, scene segmentation, and target recognition. Each process is There is a function of reducing the size of the picture, so this application can solve the problem that the recognition process requires a lot of calculations and takes up too much computing resources.
附图说明Description of the drawings
图1为本申请一实施例提供的基于图片的目标识别方法的流程示意图;FIG. 1 is a schematic flowchart of a method for image-based target recognition provided by an embodiment of this application;
图2为本申请一实施例提供的基于图片的目标识别装置的模块示意图;2 is a schematic diagram of modules of a picture-based target recognition device provided by an embodiment of the application;
图3为本申请一实施例提供的实现基于图片的目标识别方法的电子设备的内部结构示意图;3 is a schematic diagram of the internal structure of an electronic device that implements a method for image-based target recognition provided by an embodiment of the application;
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics, and advantages of the purpose of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described here are only used to explain the present application, and are not used to limit the present application.
本申请实施例提供的基于图片的目标识别方法的执行主体包括但不限于服务端、终端等能够被配置为执行本申请实施例提供的该方法的电子设备中的至少一种。换言之,所述基于图片的目标识别方法可以由安装在终端设备或服务端设备的软件或硬件来执行,所述软件可以是区块链平台。所述服务端包括但不限于:单台服务器、服务器集群、云端服务器或云端服务器集群等。The execution subject of the image-based target recognition method provided in the embodiments of the present application includes but is not limited to at least one of the electronic devices that can be configured to execute the method provided in the embodiments of the present application, such as a server and a terminal. In other words, the image-based target recognition method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
参照图1所示,为本申请一实施例提供的基于图片的目标识别方法的流程示意图。在本实施例中,所述基于图片的目标识别方法包括:Referring to FIG. 1, it is a schematic flowchart of a picture-based target recognition method provided by an embodiment of this application. In this embodiment, the image-based target recognition method includes:
S1、获取原始图片,根据场景分割网络,对所述原始图片进行卷积操作、激活操作及池化操作得到第一特征集。S1. Obtain an original picture, and perform a convolution operation, an activation operation, and a pooling operation on the original picture according to the scene segmentation network to obtain a first feature set.
本申请实施例中,所述原始图片是用于执行目标识别的图片,即从所述原始图片中识别出预设类型的目标物。所述原始图片的获取途径多种多样,包括获取用户通过手机拍摄的图像、网络中使用爬虫技术爬取的图片等。In the embodiment of the present application, the original picture is a picture used to perform target recognition, that is, a preset type of target is recognized from the original picture. There are various ways to obtain the original picture, including obtaining images taken by a user through a mobile phone, pictures crawled by using crawler technology on the Internet, and the like.
本申请其中一个应用场景中,小张是一位卡车司机,在驾驶卡车时,被高空抛物砸中了卡车的前发动机引擎盖,因此,本申请其中一个实施例中,小张使用手机拍摄被高空抛物砸中后的卡车前发动机引擎盖图片,即为本申请实施例中所述原始图片,本申请实施例通过所述原始图片识别出所述卡车前发动机引擎盖图片中发动机引擎盖被砸中的区域。In one of the application scenarios of this application, Xiao Zhang is a truck driver. When driving a truck, he was hit by a high-altitude projectile on the front engine hood of the truck. Therefore, in one of the embodiments of this application, Xiao Zhang uses a mobile phone to take a picture of the truck driver. The picture of the front engine hood of the truck after being hit by a high-altitude projectile is the original picture described in the embodiment of the application. The embodiment of the application recognizes that the engine hood in the picture of the front engine hood of the truck is smashed through the original picture. In the area.
较佳地,为了从卡车前发动机引擎盖图片识别发动机引擎盖被砸中的区域,本申请实施例需要构建一个场景分割网络,用于将原始图片分割为若干场景图片。例如,卡车前发动机引擎盖图片可能包括卡车前发动机引擎盖图片、卡车轮胎、卡车轮胎所在的公路等, 故构建一个场景分割网络,将卡车前发动机引擎盖图片分为成只包括卡车前发动机引擎盖图片、卡车轮胎图片、卡车轮胎所在的公路图片。Preferably, in order to identify the area where the engine hood is hit from the front engine hood picture of the truck, the embodiment of the present application needs to construct a scene segmentation network for dividing the original picture into several scene pictures. For example, a picture of the front engine hood of a truck may include pictures of the front engine hood of the truck, truck tires, and roads where the truck tires are located. Therefore, a scene segmentation network is constructed to divide the picture of the front engine hood of the truck into only the front engine engine of the truck. Cover pictures, pictures of truck tires, pictures of highways where truck tires are located.
优选地,所述构建所述场景分割网络,包括:构建执行卷积操作、激活操作及池化操作的分割层,构建执行上采样操作、所述卷积操作及所述激活操作的提取层;及构建执行所述卷积操作、所述激活操作及分类操作的输出层,根据所述分割层、所述提取层及所述输出层,构建所述场景分割网络。Preferably, the constructing the scene segmentation network includes: constructing a segmentation layer that performs a convolution operation, an activation operation, and a pooling operation, and constructing an extraction layer that performs an upsampling operation, the convolution operation, and the activation operation; And construct an output layer that performs the convolution operation, the activation operation, and the classification operation, and construct the scene segmentation network according to the segmentation layer, the extraction layer, and the output layer.
当构建所述场景分割网络之后,需要对所述场景分割网络进行训练,从而调整所述场景分割网络的内部参数。优选地,所述训练包括:After the scene segmentation network is constructed, the scene segmentation network needs to be trained to adjust the internal parameters of the scene segmentation network. Preferably, the training includes:
步骤A:获取场景图片训练集,利用所述分割层对所述场景图片训练集执行第一特征提取得到第一场景特征集;Step A: Obtain a scene picture training set, and use the segmentation layer to perform first feature extraction on the scene picture training set to obtain a first scene feature set;
步骤B:利用所述提取层在所述第一场景特征集中执行第二特征提取得到第二场景特征集;Step B: Use the extraction layer to perform second feature extraction in the first scene feature set to obtain a second scene feature set;
步骤C:利用所述输出层在所述第二场景特征集中执行第三特征提取和所述分类操作,得到第一训练值;Step C: Use the output layer to perform a third feature extraction and the classification operation in the second scene feature set to obtain a first training value;
步骤D:在所述第一训练值大于预设的第一训练阈值时,返回步骤A;Step D: When the first training value is greater than the preset first training threshold, return to step A;
步骤E:在所述第一训练值小于或等于所述第一训练阈值时,得到训练完成的场景分割网络。Step E: When the first training value is less than or equal to the first training threshold, a trained scene segmentation network is obtained.
详细地,本申请实施例先构建5个分割层,每个分割层都包括卷积操作、激活操作及池化操作,进一步构建4个提取层,每个分割层都包括上采样操作、卷积操作及激活操作,再构建一个输出层,该输出层包括卷积操作、激活操作及分类操作。In detail, the embodiment of the present application first constructs 5 segmentation layers, each segmentation layer includes convolution operation, activation operation, and pooling operation, and further constructs 4 extraction layers, each segmentation layer includes upsampling operation, convolution Operation and activation operation, and then construct an output layer, the output layer includes convolution operation, activation operation and classification operation.
其中,所述卷积操作及池化操作,即为当前已公开的卷积神经网络中的卷积操作及池化操作。所述激活操作可使用线性整流函数、Sigmoid函数等。所述分类操作可采用Softmax函数。Wherein, the convolution operation and the pooling operation are the convolution operation and the pooling operation in the currently disclosed convolutional neural network. The activation operation may use a linear rectification function, a Sigmoid function, or the like. The classification operation can use the Softmax function.
详细地,本申请实施例先从网络上或公开数据集等途径获取场景图片训练集,并将获取的场景图片训练集输入至所述场景分割网络进行训练,其中第一训练值可根据预先构建的损失函数,如感知损失函数、平方损失函数等计算得到。In detail, the embodiment of the present application first obtains a scene picture training set from the Internet or public data sets, and inputs the obtained scene picture training set to the scene segmentation network for training, where the first training value can be constructed according to pre-built The loss function of, such as perceptual loss function, square loss function, etc. is calculated.
进一步地,当训练完成得到场景分割网络时,本申请实施例将原始图片输入至所述场景分割网络依次进行所述卷积操作、所述激活操作及所述池化操作得到第一特征集,如上述被高空抛物砸中后的卡车前发动机引擎盖图片先在第一分割层中进行卷积操作、激活操作及池化操作,然后在第二分割层中进行卷积操作、激活操作及池化操作,以此类推直到第五分割层中进行卷积操作、激活操作及池化操作后得到所述第一特征集。Further, when the training is completed to obtain the scene segmentation network, the embodiment of the present application inputs the original picture to the scene segmentation network to sequentially perform the convolution operation, the activation operation, and the pooling operation to obtain the first feature set, As the above-mentioned picture of the front engine hood of a truck hit by a high-altitude projectile, convolution, activation, and pooling are performed in the first segmentation layer, and then convolution, activation, and pooling are performed in the second segmentation layer. The first feature set is obtained after convolution operation, activation operation, and pooling operation are performed in the fifth segmentation layer.
S2、在所述场景分割网络内,对所述第一特征集进行上采样操作、卷积操作及激活操作,得到第二特征集,并根据预先构建的分类函数,对所述第二特征集进行分类操作得到场景图片集。S2. In the scene segmentation network, perform an upsampling operation, a convolution operation, and an activation operation on the first feature set to obtain a second feature set, and according to a pre-built classification function, perform an upsampling operation, a convolution operation, and an activation operation on the second feature set Perform a classification operation to obtain a collection of scene pictures.
如S1所述,本申请实施例中,所述场景分割网络包括5个分割层、4个提取层及1个输出层,当原始图片经过5个分割层进行处理后,可得到第一特征集,进一步地,使用4个提取层对第一特征集进行操作得到第二特征集。As described in S1, in this embodiment of the application, the scene segmentation network includes 5 segmentation layers, 4 extraction layers, and 1 output layer. After the original image is processed by the 5 segmentation layers, the first feature set can be obtained. , Further, use 4 extraction layers to operate on the first feature set to obtain the second feature set.
本申请实施例中,4个提取层对第一特征集分别进行上采样操作、卷积操作及激活操作,其中上采样操作包括重采样和插值的操作,如预先设定一个期望图片尺寸,使用如双线性插值等方法,对所述第一特征集进行插值完成上采样操作。In the embodiment of this application, the four extraction layers respectively perform upsampling, convolution, and activation operations on the first feature set. The upsampling operation includes resampling and interpolation operations, such as pre-setting a desired image size, using For example, in a method such as bilinear interpolation, the first feature set is interpolated to complete the up-sampling operation.
当经过4个提取层后可得第二特征集,根据输出层的搭建过程知,对第二特征集先进行卷积操作及激活操作后,利用预先构建的分类函数如Softmax函数等,进行分类操作得到所述场景图片集。After 4 extraction layers, the second feature set can be obtained. According to the construction process of the output layer, the second feature set is first subjected to convolution and activation operations, and then pre-built classification functions such as Softmax functions are used for classification Operate to obtain the scene picture collection.
S3、将所述场景分割集输入至目标识别网络中进行目标识别得到目标图片。S3. Input the scene segmentation set into a target recognition network for target recognition to obtain a target picture.
所述目标识别网络主要是识别场景分割集中所出现的目标,如上述包括卡车前发动机 引擎盖图片、卡车轮胎图片、卡车轮胎所在的公路图片的场景图片集,若目标识别网络是为了识别卡车前发动机引擎盖,则在每个场景图片都会以识别卡车前发动机引擎盖为目的进行识别。The target recognition network is mainly to identify the targets that appear in the scene segmentation set, such as the above-mentioned scene picture set including the front engine hood picture of the truck, the picture of the truck tire, and the picture of the road where the truck tire is located. If the target recognition network is to identify the front of the truck The engine hood is identified in each scene picture for the purpose of identifying the front engine hood of the truck.
本申请实施例首先构建所述目标识别网络,所述构建包括:The embodiment of the present application first constructs the target recognition network, and the construction includes:
步骤Ⅰ:以所述场景分割网络中的卷积操作为基础,构建包括膨胀卷积操作的第一目标识别层;Step I: Based on the convolution operation in the scene segmentation network, construct a first target recognition layer that includes an expanded convolution operation;
详细地,所述步骤Ⅰ包括:提取所述卷积操作的卷积核尺寸并设置膨胀率,将所述卷积核尺寸和所述膨胀率作为预构建的膨胀卷积计算公式输入参数,计算得到所述膨胀卷积操作的膨胀卷积核尺寸,结合所述卷积核尺寸及所述膨胀卷积核尺寸构建得到所述第一目标识别层。In detail, the step I includes: extracting the size of the convolution kernel of the convolution operation and setting the expansion rate, using the size of the convolution kernel and the expansion rate as input parameters of the pre-built expansion convolution calculation formula, and calculating The expanded convolution kernel size of the expanded convolution operation is obtained, and the first target recognition layer is constructed by combining the convolution kernel size and the expanded convolution kernel size.
如卷积操作中的卷积核大小(kernel_size)为3*3,膨胀率(dilation_rate)为2,根据膨胀卷积计算公式dilation_rate*(kernel_size-1)+1计算为:2*(3-1)+1=5,因此膨胀卷积核尺寸为5*5。For example, the convolution kernel size (kernel_size) in the convolution operation is 3*3, and the dilation rate (dilation_rate) is 2, according to the dilation_rate*(kernel_size-1)+1 calculation formula for dilation convolution, it is calculated as: 2*(3-1 )+1=5, so the size of the expanded convolution kernel is 5*5.
当得到卷积核3*3及膨胀卷积核5*5后,可根据实际应用场景构建第一目标识别层,如构建5次卷积操作、5次膨胀卷积操作的第一目标识别层等。When the convolution kernel 3*3 and the expanded convolution kernel 5*5 are obtained, the first target recognition layer can be constructed according to the actual application scenario, such as the first target recognition layer with 5 convolution operations and 5 dilated convolution operations Wait.
步骤Ⅱ:构建相似性度量分类函数,并根据所述膨胀卷积操作和所述相似性度量分类函数构建第二目标识别层;Step II: construct a similarity measure classification function, and construct a second target recognition layer according to the expanded convolution operation and the similarity measure classification function;
所述相似性度量分类函数为:The similarity measure classification function is:
Figure PCTCN2020098990-appb-000001
Figure PCTCN2020098990-appb-000001
其中,y *为所述目标图片训练集的标签值,
Figure PCTCN2020098990-appb-000002
为所述目标识别网络训练所述目标图片训练集的训练值,c为所述目标图片训练集标签值的类别,如所述目标图片训练集总共有172个标签值,则c的数量为172。
Where y * is the label value of the target image training set,
Figure PCTCN2020098990-appb-000002
Train the training value of the target image training set for the target recognition network, c is the label value category of the target image training set, if the target image training set has a total of 172 label values, the number of c is 172 .
第二目标识别层的构建也需要根据实际应用场景,本申请实施例中,第二目标识别层的操作主要包括先卷积操作、然后多次膨胀卷积操作,最后使用所述相似性度量分类函数输出目标结果。The construction of the second target recognition layer also needs to be based on actual application scenarios. In the embodiment of this application, the operations of the second target recognition layer mainly include first convolution operation, then multiple expansion convolution operations, and finally classification using the similarity measure The function outputs the target result.
步骤Ⅲ:组合所述第一目标识别层及所述第二目标识别层得到所述目标识别网络。Step III: Combine the first target recognition layer and the second target recognition layer to obtain the target recognition network.
与所述场景分割网络对应,当构建所述目标识别网络完成后,需要对所述目标识别网络进行训练,从而调整目标识别网络的内部参数。优选地,所述训练包括:Corresponding to the scene segmentation network, after the construction of the target recognition network is completed, the target recognition network needs to be trained to adjust the internal parameters of the target recognition network. Preferably, the training includes:
步骤a:获取目标图片训练集,利用所述第一目标识别层对所述目标图片训练集执行第一膨胀卷积操作得到第一目标特征集;Step a: Obtain a target picture training set, and use the first target recognition layer to perform a first dilated convolution operation on the target picture training set to obtain a first target feature set;
步骤b:利用所述第二目标识别层对所述第一目标特征集执行第二膨胀卷积操作,及相似性度量计算得到第二训练值;Step b: Use the second target recognition layer to perform a second dilated convolution operation on the first target feature set, and calculate a similarity measure to obtain a second training value;
步骤c:若所述第二训练值大于所述第二训练阈值,则返回步骤Ⅰ;Step c: If the second training value is greater than the second training threshold, return to step I;
步骤d:若所述第二训练值小于或等于所述第二训练阈值,得到所述目标识别网络。Step d: If the second training value is less than or equal to the second training threshold, the target recognition network is obtained.
结合上述构建所述目标识别网络及训练所述目标识别网络的步骤后,得到训练完成的目标识别网络。After combining the above steps of constructing the target recognition network and training the target recognition network, a trained target recognition network is obtained.
进一步地,本申请实施例将所述场景图片集输入至目标识别网络中进行目标识别,可以得到目标图片。Further, in the embodiment of the present application, the scene picture set is input into the target recognition network for target recognition, and the target picture can be obtained.
例如,在其中一个应用场景中,本申请实施例利用场景分割网络和目标识别网络,将卡车前发动机引擎盖图片,输入至场景分割网络得到包括仅有卡车前发动机引擎盖的场景图片,及卡车前发动机引擎盖所在背景的场景图片,并将卡车前发动机引擎盖的场景图片输入至目标识别网络得到卡车前发动机引擎盖被高空抛物砸中的区域图片,该区域图片即为目标图片。For example, in one of the application scenarios, the embodiment of the present application uses the scene segmentation network and the target recognition network to input a picture of the front engine hood of a truck into the scene segmentation network to obtain a scene picture including only the front engine hood of the truck, and the truck The scene picture of the background where the front engine hood is located, and the scene picture of the front engine hood of the truck is input to the target recognition network to obtain a picture of the area where the front engine hood of the truck is hit by a high-altitude projectile. This area picture is the target picture.
本申请优选实施例中,所述原始图片及所述目标图片可以存储于区块链节点中。In a preferred embodiment of the present application, the original picture and the target picture may be stored in a blockchain node.
本申请实施例先利用场景分割网络,对原始图片进行卷积操作、激活操作及池化操作,以达到从原始图片中提取图片特征,并缩减图片像素规模的目的,同时根据原始图片内所包括的场景,结合上采样操作及分类函数对图片特征进行场景分离得到场景图片集,由于将原始图片拆分为若干场景图片,因此进一步缩减图片尺寸规模,同时使用目标识别网络直接从场景图片集中识别出图片。由于本申请使用包括卷积操作、激活操作及池化操作的深度学习网络,故目标识别准确率高,同时将原始图片按照特征提取、场景分割及目标识别循环而进进行处理,每个过程都有涉及到对图片尺寸进行缩小的作用,因此本申请可以解决识别过程需要进行大量计算,占用过多计算资源的问题。The embodiment of this application first uses the scene segmentation network to perform convolution, activation, and pooling operations on the original picture to achieve the purpose of extracting picture features from the original picture and reducing the size of the picture pixel, and at the same time according to the original picture included The scene of the scene, combined with the upsampling operation and the classification function to separate the picture features to obtain the scene picture set. Since the original picture is split into several scene pictures, the picture size is further reduced, and the target recognition network is used to directly identify from the scene picture set. Picture. Since this application uses a deep learning network that includes convolution operations, activation operations, and pooling operations, the accuracy of target recognition is high. At the same time, the original image is processed in a cycle of feature extraction, scene segmentation, and target recognition. Each process is There is a function of reducing the size of the picture, so this application can solve the problem that the recognition process requires a lot of calculations and takes up too much computing resources.
如图2所示,是本申请基于图片的目标识别装置的功能模块图。As shown in Fig. 2, it is a functional block diagram of the image-based target recognition device of the present application.
本申请所述基于图片的目标识别装置100可以安装于电子设备中。根据实现的功能,所述基于图片的目标识别装置可以包括第一特征获取模块101、场景图片提取模块102、目标图片识别模块103。本发所述模块也可以称之为单元,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。The image-based target recognition apparatus 100 described in this application can be installed in an electronic device. According to the realized functions, the picture-based target recognition device may include a first feature acquisition module 101, a scene picture extraction module 102, and a target picture recognition module 103. The module described in the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can complete fixed functions, and are stored in the memory of the electronic device.
在本实施例中,关于各模块/单元的功能如下:In this embodiment, the functions of each module/unit are as follows:
所述第一特征获取模块101,用于利用场景分割网络,对原始图片执行卷积操作、激活操作及池化操作得到第一特征集;The first feature acquisition module 101 is configured to use a scene segmentation network to perform a convolution operation, an activation operation, and a pooling operation on the original picture to obtain a first feature set;
所述场景图片提取模块102,用于在所述场景分割网络内,对所述第一特征集执行上采样操作、所述卷积操作及所述激活操作,得到第二特征集,并根据预先构建的分类函数,对所述第二特征集进行分类操作得到场景图片集;The scene picture extraction module 102 is configured to perform an up-sampling operation, the convolution operation, and the activation operation on the first feature set in the scene segmentation network to obtain a second feature set, and according to the previous The constructed classification function performs a classification operation on the second feature set to obtain a scene picture set;
所述目标图片识别模块103,用于将所述场景图片集输入至目标识别网络中进行目标识别得到目标图片。The target picture recognition module 103 is configured to input the scene picture set into a target recognition network for target recognition to obtain a target picture.
详细地,所述基于图片的目标识别装置各模块的具体实施步骤如下:In detail, the specific implementation steps of each module of the image-based target recognition device are as follows:
所述第一特征获取模块101利用场景分割网络,对原始图片执行卷积操作、激活操作及池化操作得到第一特征集。The first feature acquisition module 101 uses the scene segmentation network to perform convolution, activation, and pooling operations on the original picture to obtain a first feature set.
本申请实施例中,所述原始图片是用于执行目标识别的图片,即从所述原始图片中识别出预设类型的目标物。所述原始图片的获取途径多种多样,包括获取用户通过手机拍摄的图像、网络中使用爬虫技术爬取的图片等。In the embodiment of the present application, the original picture is a picture used to perform target recognition, that is, a preset type of target is recognized from the original picture. There are various ways to obtain the original picture, including obtaining images taken by a user through a mobile phone, pictures crawled by using crawler technology on the Internet, and the like.
本申请其中一个应用场景中,小张是一位卡车司机,在驾驶卡车时,被高空抛物砸中了卡车的前发动机引擎盖,因此,本申请其中一个实施例中,小张使用手机拍摄被高空抛物砸中后的卡车前发动机引擎盖图片,即为本申请实施例中所述原始图片,本申请实施例通过所述原始图片识别出所述卡车前发动机引擎盖图片中发动机引擎盖被砸中的区域。In one of the application scenarios of this application, Xiao Zhang is a truck driver. When driving a truck, he was hit by a high-altitude projectile on the front engine hood of the truck. Therefore, in one of the embodiments of this application, Xiao Zhang uses a mobile phone to take a picture of the truck driver. The picture of the front engine hood of the truck after being hit by a high-altitude projectile is the original picture described in the embodiment of the application. The embodiment of the application recognizes that the engine hood in the picture of the front engine hood of the truck is smashed through the original picture. In the area.
较佳地,为了从卡车前发动机引擎盖图片识别发动机引擎盖被砸中的区域,本申请实施例需要构建一个场景分割网络,将原始图片分割为若干场景图片,如卡车前发动机引擎盖图片可能包括卡车前发动机引擎盖图片、卡车轮胎、卡车轮胎所在的公路等,故构建一个场景分割网络,将卡车前发动机引擎盖图片分为成只包括卡车前发动机引擎盖图片、卡车轮胎图片、卡车轮胎所在的公路图片。Preferably, in order to identify the area where the engine hood has been hit from the picture of the front engine hood of the truck, the embodiment of the application needs to construct a scene segmentation network to divide the original picture into several scene pictures, such as the picture of the front engine hood of the truck. Including the truck front engine hood picture, truck tires, the road where the truck tires are located, etc., so build a scene segmentation network to divide the truck front engine hood picture into only the truck front engine hood picture, the truck tire picture, and the truck tire. Picture of the highway where you are.
优选地,本申请还包括场景分割网络构建模块104。所述场景分割网络构建模块104用于:构建执行所述卷积操作、所述激活操作及所述池化操作的分割层,构建执行所述上采样操作、所述卷积操作及所述激活操作的提取层;及构建执行所述卷积操作、所述激活操作及所述分类操作的输出层,根据所述分割层、所述提取层及所述输出层,构建所述场景分割网络。Preferably, this application also includes a scene segmentation network construction module 104. The scene segmentation network construction module 104 is configured to construct a segmentation layer that performs the convolution operation, the activation operation, and the pooling operation, and construct and perform the upsampling operation, the convolution operation, and the activation Operating an extraction layer; and constructing an output layer that performs the convolution operation, the activation operation, and the classification operation, and constructs the scene segmentation network according to the segmentation layer, the extraction layer, and the output layer.
进一步地,本申请实施例还可以包括场景分割网络训练模块105,用于调整场景分割网络的内部参数。优选地,所述场景分割网络训练模块105在调整场景分割网络的内部参数时,执行下述操作:Further, the embodiment of the present application may also include a scene segmentation network training module 105, which is used to adjust the internal parameters of the scene segmentation network. Preferably, the scene segmentation network training module 105 performs the following operations when adjusting the internal parameters of the scene segmentation network:
步骤A:获取场景图片训练集,利用所述分割层对所述场景图片训练集执行第一特征 提取得到第一场景特征集;Step A: Obtain a scene picture training set, and use the segmentation layer to perform first feature extraction on the scene picture training set to obtain a first scene feature set;
步骤B:利用所述提取层在所述第一场景特征集中执行第二特征提取得到第二场景特征集;Step B: Use the extraction layer to perform second feature extraction in the first scene feature set to obtain a second scene feature set;
步骤C:利用所述输出层在所述第二场景特征集中执行第三特征提取和所述分类操作,得到第一训练值;Step C: Use the output layer to perform a third feature extraction and the classification operation in the second scene feature set to obtain a first training value;
步骤D:在所述第一训练值大于预设的第一训练阈值时,返回步骤A;Step D: When the first training value is greater than the preset first training threshold, return to step A;
步骤E:在所述第一训练值小于或等于所述第一训练阈值时,得到训练完成的场景分割网络。Step E: When the first training value is less than or equal to the first training threshold, a trained scene segmentation network is obtained.
详细地,本申请实施例先构建5个分割层,每个分割层都包括卷积操作、激活操作及池化操作,进一步构建4个提取层,每个分割层都包括上采样操作、卷积操作及激活操作,再构建一个输出层,该输出层包括卷积操作、激活操作及分类操作。In detail, the embodiment of the present application first constructs 5 segmentation layers, each segmentation layer includes convolution operation, activation operation, and pooling operation, and further constructs 4 extraction layers, each segmentation layer includes upsampling operation, convolution Operation and activation operation, and then construct an output layer, the output layer includes convolution operation, activation operation and classification operation.
其中,所述卷积操作及池化操作,即为当前已公开的卷积神经网络中的卷积操作及池化操作。所述激活操作可使用线性整流函数、Sigmoid函数等。所述分类操作可采用Softmax函数。Wherein, the convolution operation and the pooling operation are the convolution operation and the pooling operation in the currently disclosed convolutional neural network. The activation operation may use a linear rectification function, a Sigmoid function, or the like. The classification operation can use the Softmax function.
详细地,本申请实施例先从网络上或公开数据集等途径获取场景图片训练集,并将获取的场景图片训练集输入至所述场景分割网络进行训练,其中第一训练值可根据预先构建的损失函数,如感知损失函数、平方损失函数等计算得到。In detail, the embodiment of the present application first obtains a scene picture training set from the Internet or public data sets, and inputs the obtained scene picture training set to the scene segmentation network for training, where the first training value can be constructed according to pre-built The loss function of, such as perceptual loss function, square loss function, etc. is calculated.
进一步地,当训练完成得到场景分割网络时,本申请实施例将原始图片输入至所述场景分割网络依次进行所述卷积操作、所述激活操作及所述池化操作得到第一特征集,如上述被高空抛物砸中后的卡车前发动机引擎盖图片先在第一分割层中进行卷积操作、激活操作及池化操作,然后在第二分割层中进行卷积操作、激活操作及池化操作,以此类推直到第五分割层中进行卷积操作、激活操作及池化操作后得到所述第一特征集。Further, when the training is completed to obtain the scene segmentation network, the embodiment of the present application inputs the original picture to the scene segmentation network to sequentially perform the convolution operation, the activation operation, and the pooling operation to obtain the first feature set, As the above-mentioned picture of the front engine hood of a truck hit by a high-altitude projectile, convolution, activation, and pooling are performed in the first segmentation layer, and then convolution, activation, and pooling are performed in the second segmentation layer. The first feature set is obtained after convolution operation, activation operation, and pooling operation are performed in the fifth segmentation layer.
所述场景图片提取模块102在所述场景分割网络内,对所述第一特征集执行上采样操作、所述卷积操作及所述激活操作,得到第二特征集,并根据预先构建的分类函数,对所述第二特征集进行分类操作得到场景图片集。The scene picture extraction module 102 performs an up-sampling operation, the convolution operation, and the activation operation on the first feature set in the scene segmentation network to obtain a second feature set, which is based on a pre-built classification Function to perform a classification operation on the second feature set to obtain a scene picture set.
如上所述,本申请实施例中,所述场景分割网络包括5个分割层、4个提取层及1个输出层,当原始图片经过5个分割层进行处理后,可得到第一特征集,进一步地,使用4个提取层对第一特征集进行操作得到第二特征集。As mentioned above, in this embodiment of the application, the scene segmentation network includes 5 segmentation layers, 4 extraction layers, and 1 output layer. After the original image is processed by the 5 segmentation layers, the first feature set can be obtained. Further, four extraction layers are used to operate on the first feature set to obtain the second feature set.
本申请实施例中,4个提取层对第一特征集分别进行上采样操作、卷积操作及激活操作,其中上采样操作包括重采样和插值的操作,如预先设定一个期望图片尺寸,使用如双线性插值等方法,对所述第一特征集进行插值完成上采样操作。In the embodiment of this application, the four extraction layers respectively perform upsampling, convolution, and activation operations on the first feature set. The upsampling operation includes resampling and interpolation operations, such as pre-setting a desired image size, using For example, in a method such as bilinear interpolation, the first feature set is interpolated to complete the up-sampling operation.
当经过4个提取层后可得第二特征集,根据输出层的搭建过程知,对第二特征集先进行卷积操作及激活操作后,利用预先构建的分类函数如Softmax函数等,进行分类操作得到所述场景图片集。After 4 extraction layers, the second feature set can be obtained. According to the construction process of the output layer, the second feature set is first subjected to convolution and activation operations, and then pre-built classification functions such as Softmax functions are used for classification Operate to obtain the scene picture collection.
所述目标图片识别模块103将所述场景图片集输入至目标识别网络中进行目标识别得到目标图片。The target picture recognition module 103 inputs the scene picture set into a target recognition network for target recognition to obtain a target picture.
所述目标识别网络主要是识别场景分割集中所出现的目标,如上述包括卡车前发动机引擎盖图片、卡车轮胎图片、卡车轮胎所在的公路图片的场景图片集,若目标识别网络是为了识别卡车前发动机引擎盖,则在每个场景图片都会以识别卡车前发动机引擎盖为目的进行识别。The target recognition network is mainly to identify the targets that appear in the scene segmentation set, such as the above-mentioned scene picture set including the front engine hood picture of the truck, the picture of the truck tire, and the picture of the road where the truck tire is located. If the target recognition network is to identify the front of the truck The engine hood is identified in each scene picture for the purpose of identifying the front engine hood of the truck.
进一步地,本申请实施例还包括目标识别网络构建模块106,所述目标识别网络构建模块106用于执行:Further, the embodiment of the present application further includes a target recognition network construction module 106, and the target recognition network construction module 106 is configured to execute:
步骤Ⅰ:以所述场景分割网络中的卷积操作为基础,构建包括膨胀卷积操作的第一目标识别层;Step I: Based on the convolution operation in the scene segmentation network, construct a first target recognition layer that includes an expanded convolution operation;
详细地,所述步骤Ⅰ包括:提取所述卷积操作的卷积核尺寸并设置膨胀率,将所述卷 积核尺寸和所述膨胀率作为预构建的膨胀卷积计算公式输入参数,计算得到所述膨胀卷积操作的膨胀卷积核尺寸,结合所述卷积核尺寸及所述膨胀卷积核尺寸构建得到所述第一目标识别层。In detail, the step I includes: extracting the size of the convolution kernel of the convolution operation and setting the expansion rate, using the size of the convolution kernel and the expansion rate as input parameters of the pre-built expansion convolution calculation formula, and calculating The expanded convolution kernel size of the expanded convolution operation is obtained, and the first target recognition layer is constructed by combining the convolution kernel size and the expanded convolution kernel size.
如卷积操作中的卷积核大小(kernel_size)为3*3,膨胀率(dilation_rate)为2,根据膨胀卷积计算公式dilation_rate*(kernel_size-1)+1计算为:2*(3-1)+1=5,因此膨胀卷积核尺寸为5*5。For example, the size of the convolution kernel (kernel_size) in the convolution operation is 3*3, and the dilation rate (dilation_rate) is 2, according to the dilation_rate*(kernel_size-1)+1 calculation formula for dilation convolution, it is calculated as: 2*(3-1 )+1=5, so the size of the expanded convolution kernel is 5*5.
当得到卷积核3*3及膨胀卷积核5*5后,可根据实际应用场景构建第一目标识别层,如构建5次卷积操作、5次膨胀卷积操作的第一目标识别层等。When the convolution kernel 3*3 and the expanded convolution kernel 5*5 are obtained, the first target recognition layer can be constructed according to the actual application scenario, such as the first target recognition layer with 5 convolution operations and 5 dilated convolution operations Wait.
步骤Ⅱ:构建相似性度量分类函数,并根据所述膨胀卷积操作和所述相似性度量分类函数构建第二目标识别层;Step II: construct a similarity measure classification function, and construct a second target recognition layer according to the expanded convolution operation and the similarity measure classification function;
所述相似性度量分类函数为:The similarity measure classification function is:
Figure PCTCN2020098990-appb-000003
Figure PCTCN2020098990-appb-000003
其中,y *为所述目标图片训练集的标签值,
Figure PCTCN2020098990-appb-000004
为所述目标识别网络训练所述目标图片训练集的预测值,c为所述目标图片训练集标签值的类别,如所述目标图片训练集总共有172个标签值,则c的数量为172。
Where y * is the label value of the target image training set,
Figure PCTCN2020098990-appb-000004
Train the predicted value of the target image training set for the target recognition network, c is the label value category of the target image training set, if the target image training set has a total of 172 label values, the number of c is 172 .
第二目标识别层的构建也需要根据实际应用场景,本申请实施例中,第二目标识别层的操作主要包括先卷积操作、然后多次膨胀卷积操作,最后使用所述相似性度量分类函数输出目标结果。The construction of the second target recognition layer also needs to be based on actual application scenarios. In the embodiment of this application, the operations of the second target recognition layer mainly include first convolution operation, then multiple expansion convolution operations, and finally classification using the similarity measure The function outputs the target result.
步骤Ⅲ:组合所述第一目标识别层及所述第二目标识别层得到所述目标识别网络。Step III: Combine the first target recognition layer and the second target recognition layer to obtain the target recognition network.
与所述场景分割网络对应,当构建所述目标识别网络完成后,需要对所述目标识别网络进行训练,从而调整所述目标识别网络的内部参数。因此,优选地,本申请实施例还包括目标识别网络训练模块107。Corresponding to the scene segmentation network, after the construction of the target recognition network is completed, the target recognition network needs to be trained to adjust the internal parameters of the target recognition network. Therefore, preferably, the embodiment of the present application further includes a target recognition network training module 107.
所述目标识别网络训练模块用于执行:The target recognition network training module is used to execute:
步骤a:获取目标图片训练集,利用所述第一目标识别层对所述目标图片训练集执行第一膨胀卷积操作得到第一目标特征集;Step a: Obtain a target picture training set, and use the first target recognition layer to perform a first dilated convolution operation on the target picture training set to obtain a first target feature set;
步骤b:利用所述第二目标识别层对所述第一目标特征集执行第二膨胀卷积操作,及相似性度量计算得到第二训练值;Step b: Use the second target recognition layer to perform a second dilated convolution operation on the first target feature set, and calculate a similarity measure to obtain a second training value;
步骤c:若所述第二训练值大于所述第二训练阈值,则返回步骤Ⅰ;Step c: If the second training value is greater than the second training threshold, return to step I;
步骤d:若所述第二训练值小于或等于所述第二训练阈值,得到所述目标识别网络。Step d: If the second training value is less than or equal to the second training threshold, the target recognition network is obtained.
结合上述构建所述目标识别网络及训练所述目标识别网络的步骤后,得到训练完成的目标识别网络。After combining the above steps of constructing the target recognition network and training the target recognition network, a trained target recognition network is obtained.
进一步地,本申请实施例将所述场景图片集输入至目标识别网络中进行目标识别,可以得到目标图片。Further, in the embodiment of the present application, the scene picture set is input into the target recognition network for target recognition, and the target picture can be obtained.
例如,在其中一个应用场景中,本申请实施例利用场景分割网络和目标识别网络,将卡车前发动机引擎盖图片,输入至场景分割网络得到包括仅有卡车前发动机引擎盖的场景图片,及卡车前发动机引擎盖所在背景的场景图片,并将卡车前发动机引擎盖的场景图片输入至目标识别网络得到卡车前发动机引擎盖被高空抛物砸中的区域图片,该区域图片即为目标图片。For example, in one of the application scenarios, the embodiment of the present application uses the scene segmentation network and the target recognition network to input a picture of the front engine hood of a truck into the scene segmentation network to obtain a scene picture including only the front engine hood of the truck, and the truck The scene picture of the background where the front engine hood is located, and the scene picture of the front engine hood of the truck is input to the target recognition network to obtain a picture of the area where the front engine hood of the truck is hit by a high-altitude projectile. This area picture is the target picture.
本申请优选实施例中,所述原始图片及所述目标图片可以存储于区块链节点中。In a preferred embodiment of the present application, the original picture and the target picture may be stored in a blockchain node.
如图3所示,是本申请实现基于图片的目标识别方法的电子设备的结构示意图。As shown in FIG. 3, it is a schematic diagram of the structure of an electronic device that implements the image-based target recognition method according to the present application.
所述电子设备1可以包括处理器10、存储器11和总线,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如基于图片的目标识别程序12。The electronic device 1 may include a processor 10, a memory 11, and a bus, and may also include a computer program stored in the memory 11 and running on the processor 10, such as a picture-based target recognition program 12.
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质可以是非易失性,也可以是易失性,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储 器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备1的移动硬盘。所述存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例如电子设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(Secure Digital,SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如基于图片的目标识别的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。The memory 11 includes at least one type of readable storage medium. The readable storage medium may be non-volatile or volatile. The readable storage medium includes flash memory, mobile hard disk, and multimedia card. , Card-type memory (for example: SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, for example, a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart media card (SMC), and a secure digital (Secure Digital) equipped on the electronic device 1. , SD) card, flash card (Flash Card), etc. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can be used not only to store application software and various data installed in the electronic device 1, such as a code for target recognition based on pictures, etc., but also to temporarily store data that has been output or will be output.
进一步地,所述可读存储介质可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据区块链节点的使用所创建的数据等。Further, the readable storage medium may mainly include a storage program area and a storage data area, where the storage program area may store an operating system, an application program required by at least one function, etc.; the storage data area may store a block chain node Use the created data, etc.
所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子设备的控制核心(Control Unit),利用各种接口和线路连接整个电子设备的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如执行基于图片的目标识别等),以及调用存储在所述存储器11内的数据,以执行电子设备1的各种功能和处理数据。The processor 10 may be composed of integrated circuits in some embodiments, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same function or different functions, including one or more Combinations of central processing unit (CPU), microprocessor, digital processing chip, graphics processor, and various control chips, etc. The processor 10 is the control unit of the electronic device, which uses various interfaces and lines to connect the various components of the entire electronic device, and runs or executes programs or modules stored in the memory 11 (for example, executing Target recognition based on pictures, etc.), and call data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
所述总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。The bus may be a peripheral component interconnect standard (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus and so on. The bus is configured to implement connection and communication between the memory 11 and at least one processor 10 and the like.
图3仅示出了具有部件的电子设备,本领域技术人员可以理解的是,图3示出的结构并不构成对所述电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。FIG. 3 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 3 does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure. Components, or a combination of certain components, or different component arrangements.
例如,尽管未示出,所述电子设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, thereby controlling power The device implements functions such as charge management, discharge management, and power consumption management. The power supply may also include any components such as one or more DC or AC power supplies, recharging devices, power failure detection circuits, power converters or inverters, and power status indicators. The electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
进一步地,所述电子设备1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子设备1与其他电子设备之间建立通信连接。Further, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
可选地,该电子设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。Optionally, the electronic device 1 may also include a user interface. The user interface may be a display (Display) and an input unit (such as a keyboard (Keyboard)). Optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display can also be appropriately called a display screen or a display unit, which is used to display the information processed in the electronic device 1 and to display a visualized user interface.
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。It should be understood that the embodiments are only for illustrative purposes, and are not limited by this structure in the scope of the patent application.
所述电子设备1中的所述存储器11存储的基于图片的目标识别12是多个指令的组合,在所述处理器10中运行时,可以实现:The picture-based target recognition 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can realize:
利用场景分割网络,对原始图片执行卷积操作、激活操作及池化操作得到第一特征集;Use the scene segmentation network to perform convolution, activation, and pooling operations on the original image to obtain the first feature set;
在所述场景分割网络内,对所述第一特征集执行上采样操作、所述卷积操作及所述激 活操作,得到第二特征集,并根据预先构建的分类函数,对所述第二特征集进行分类操作得到场景图片集;In the scene segmentation network, perform an upsampling operation, the convolution operation, and the activation operation on the first feature set to obtain a second feature set, and according to the pre-built classification function, the second feature set is Perform a classification operation on the feature set to obtain a scene picture set;
将所述场景图片集输入至目标识别网络中进行目标识别得到目标图片。The scene picture set is input into a target recognition network for target recognition to obtain a target picture.
具体地,所述处理器10对上述指令的具体实现方法可参考图1对应实施例中相关步骤的描述,在此不赘述。Specifically, for the specific implementation method of the above-mentioned instructions by the processor 10, reference may be made to the description of the relevant steps in the embodiment corresponding to FIG. 1, which will not be repeated here.
进一步地,所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个非易失性或易失性计算机可读取存储介质中。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。Further, if the integrated module/unit of the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile or volatile computer readable storage medium . The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) .
在本申请所提供的几个实施例中,应该理解到,所揭露的设备,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the several embodiments provided in this application, it should be understood that the disclosed equipment, device, and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, the functional modules in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional modules.
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。For those skilled in the art, it is obvious that the present application is not limited to the details of the foregoing exemplary embodiments, and the present application can be implemented in other specific forms without departing from the spirit or basic characteristics of the application.
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of this application is defined by the appended claims rather than the above description, and therefore it is intended to fall into the claims. All changes in the meaning and scope of the equivalent elements of are included in this application. Any associated diagram marks in the claims should not be regarded as limiting the claims involved.
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。In addition, it is obvious that the word "including" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claims can also be implemented by one unit or device through software or hardware. The second class words are used to indicate names, and do not indicate any specific order.
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the application and not to limit them. Although the application has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the application can be Make modifications or equivalent replacements without departing from the spirit and scope of the technical solution of the present application.

Claims (20)

  1. 一种基于图片的目标识别方法,其中,所述方法包括:A picture-based target recognition method, wherein the method includes:
    利用场景分割网络,对原始图片执行卷积操作、激活操作及池化操作得到第一特征集;Use the scene segmentation network to perform convolution, activation, and pooling operations on the original image to obtain the first feature set;
    在所述场景分割网络内,对所述第一特征集执行上采样操作、所述卷积操作及所述激活操作,得到第二特征集,并根据预先构建的分类函数,对所述第二特征集进行分类操作得到场景图片集;In the scene segmentation network, perform an upsampling operation, the convolution operation, and the activation operation on the first feature set to obtain a second feature set, and according to a pre-built classification function, perform an upsampling operation, the convolution operation and the activation operation on the second feature set. Perform a classification operation on the feature set to obtain a scene picture set;
    将所述场景图片集输入至目标识别网络中进行目标识别得到目标图片。The scene picture set is input into a target recognition network for target recognition to obtain a target picture.
  2. 如权利要求1所述的基于图片的目标识别方法,其中,该方法还包括构建所述场景分割网络,所述构建包括:The image-based target recognition method of claim 1, wherein the method further comprises constructing the scene segmentation network, and the constructing comprises:
    构建执行所述卷积操作、所述激活操作及所述池化操作的分割层;Constructing a segmentation layer that performs the convolution operation, the activation operation, and the pooling operation;
    构建执行所述上采样操作、所述卷积操作及所述激活操作的提取层;及Construct an extraction layer that performs the upsampling operation, the convolution operation, and the activation operation; and
    构建执行所述卷积操作、所述激活操作及所述分类操作的输出层;Constructing an output layer that performs the convolution operation, the activation operation, and the classification operation;
    根据所述分割层、所述提取层及所述输出层,构建所述场景分割网络。The scene segmentation network is constructed according to the segmentation layer, the extraction layer, and the output layer.
  3. 如权利要求2所述的基于图片的目标识别方法,其中,该方法还包括:训练所述场景分割网络,其中,所述训练包括:3. The image-based target recognition method of claim 2, wherein the method further comprises: training the scene segmentation network, wherein the training comprises:
    步骤A:获取场景图片训练集,利用所述分割层对所述场景图片训练集执行第一特征提取,得到第一场景特征集;Step A: Obtain a scene picture training set, and use the segmentation layer to perform first feature extraction on the scene picture training set to obtain a first scene feature set;
    步骤B:利用所述提取层在所述第一场景特征集中执行第二特征提取,得到第二场景特征集;Step B: Use the extraction layer to perform second feature extraction in the first scene feature set to obtain a second scene feature set;
    步骤C:利用所述输出层在所述第二场景特征集中执行第三特征提取和所述分类操作,得到并输出第一训练值;Step C: Use the output layer to perform the third feature extraction and the classification operation in the second scene feature set to obtain and output the first training value;
    步骤D:在所述第一训练值大于预设的第一训练阈值时,返回步骤A;Step D: When the first training value is greater than the preset first training threshold, return to step A;
    步骤E:在所述第一训练值小于或等于所述第一训练阈值时,得到训练完成的场景分割网络。Step E: When the first training value is less than or equal to the first training threshold, a trained scene segmentation network is obtained.
  4. 如权利要求1所述的基于图片的目标识别方法,其中,该方法还包括构建所述目标识别网络,所述构建包括:The image-based target recognition method according to claim 1, wherein the method further comprises constructing the target recognition network, and the constructing comprises:
    提取所述场景分割网络中卷积操作的卷积核尺寸并设置膨胀率;Extracting the size of the convolution kernel of the convolution operation in the scene segmentation network and setting the expansion rate;
    根据所述卷积核尺寸和所述膨胀率以及预构建的膨胀卷积计算公式,计算得到所述膨胀卷积操作的膨胀卷积核尺寸;Calculate the expanded convolution kernel size of the expanded convolution operation according to the size of the convolution kernel, the expansion ratio, and a pre-built expanded convolution calculation formula;
    根据所述卷积核尺寸及所述膨胀卷积核尺寸构建得到所述第一目标识别层;Constructing and obtaining the first target recognition layer according to the size of the convolution kernel and the size of the expanded convolution kernel;
    构建相似性度量分类函数,并根据所述膨胀卷积操作和所述相似性度量分类函数构建第二目标识别层;Construct a similarity measure classification function, and construct a second target recognition layer according to the dilated convolution operation and the similarity measure classification function;
    根据所述第一目标识别层及所述第二目标识别层,构建所述目标识别网络。According to the first target recognition layer and the second target recognition layer, the target recognition network is constructed.
  5. 如权利要求4所述的基于图片的目标识别方法,其中,该方法还包括:训练所述目标识别网络,其中,所述训练包括:5. The image-based target recognition method of claim 4, wherein the method further comprises: training the target recognition network, wherein the training comprises:
    步骤a:获取目标图片训练集,利用所述第一目标识别层对所述目标图片训练集执行第一膨胀卷积操作,得到第一目标特征集;Step a: Obtain a target picture training set, and use the first target recognition layer to perform a first dilated convolution operation on the target picture training set to obtain a first target feature set;
    步骤b:利用所述第二目标识别层对所述第一目标特征集执行第二膨胀卷积操作及相似性度量计算,得到并输出第二训练值;Step b: Use the second target recognition layer to perform a second dilated convolution operation and similarity metric calculation on the first target feature set to obtain and output a second training value;
    步骤c:若所述第二训练值大于所述第二训练阈值,则返回步骤a;Step c: If the second training value is greater than the second training threshold, return to step a;
    步骤d:若所述第二训练值小于或等于所述第二训练阈值,得到所述目标识别网络。Step d: If the second training value is less than or equal to the second training threshold, the target recognition network is obtained.
  6. 如权利要求5所述的基于图片的目标识别方法,其中,所述相似性度量分类函数采用如下构建方法:8. The image-based target recognition method of claim 5, wherein the similarity metric classification function adopts the following construction method:
    Figure PCTCN2020098990-appb-100001
    Figure PCTCN2020098990-appb-100001
    其中,y *为所述目标图片训练集的标签值,
    Figure PCTCN2020098990-appb-100002
    为所述目标识别网络训练所述目标图片训练集的训练值,c为所述目标图片训练集标签值的类别。
    Where y * is the label value of the target image training set,
    Figure PCTCN2020098990-appb-100002
    The training value of the target picture training set is trained for the target recognition network, and c is the category of the label value of the target picture training set.
  7. 一种基于图片的目标识别装置,其中,所述装置包括:A picture-based target recognition device, wherein the device includes:
    第一特征获取模块,用于利用场景分割网络,对原始图片执行卷积操作、激活操作及池化操作得到第一特征集;The first feature acquisition module is configured to use the scene segmentation network to perform convolution, activation, and pooling operations on the original image to obtain the first feature set;
    场景图片提取模块,用于在所述场景分割网络内,对所述第一特征集执行上采样操作、所述卷积操作及所述激活操作,得到第二特征集,并根据预先构建的分类函数,对所述第二特征集进行分类操作得到场景图片集;The scene picture extraction module is configured to perform an up-sampling operation, the convolution operation, and the activation operation on the first feature set in the scene segmentation network to obtain a second feature set, which is based on a pre-built classification Function to perform a classification operation on the second feature set to obtain a scene picture set;
    目标图片识别模块,用于将所述场景图片集输入至目标识别网络中进行目标识别得到目标图片。The target picture recognition module is used to input the scene picture set into the target recognition network for target recognition to obtain the target picture.
  8. 如权利要求7所述的基于图片的目标识别装置,其中,所述装置还包括场景分割网络构建模块,用于:8. The picture-based target recognition device according to claim 7, wherein the device further comprises a scene segmentation network construction module for:
    构建执行所述卷积操作、所述激活操作及所述池化操作的分割层;Constructing a segmentation layer that performs the convolution operation, the activation operation, and the pooling operation;
    构建执行所述上采样操作、所述卷积操作及所述激活操作的提取层;及Construct an extraction layer that performs the upsampling operation, the convolution operation, and the activation operation; and
    构建执行所述卷积操作、所述激活操作及所述分类操作的输出层;Constructing an output layer that performs the convolution operation, the activation operation, and the classification operation;
    根据所述分割层、所述提取层及所述输出层,构建所述场景分割网络。The scene segmentation network is constructed according to the segmentation layer, the extraction layer, and the output layer.
  9. 一种电子设备,其中,所述电子设备包括:An electronic device, wherein the electronic device includes:
    至少一个处理器;以及,At least one processor; and,
    与所述至少一个处理器通信连接的存储器;其中,A memory communicatively connected with the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行时实现如下步骤:The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the following steps are implemented:
    利用场景分割网络,对原始图片执行卷积操作、激活操作及池化操作得到第一特征集;Use the scene segmentation network to perform convolution, activation, and pooling operations on the original image to obtain the first feature set;
    在所述场景分割网络内,对所述第一特征集执行上采样操作、所述卷积操作及所述激活操作,得到第二特征集,并根据预先构建的分类函数,对所述第二特征集进行分类操作得到场景图片集;In the scene segmentation network, perform an upsampling operation, the convolution operation, and the activation operation on the first feature set to obtain a second feature set, and according to a pre-built classification function, perform an upsampling operation, the convolution operation and the activation operation on the second feature set. Perform a classification operation on the feature set to obtain a scene picture set;
    将所述场景图片集输入至目标识别网络中进行目标识别得到目标图片。The scene picture set is input into a target recognition network for target recognition to obtain a target picture.
  10. 如权利要求9所述的电子设备,其中,所述指令被所述至少一个处理器执行时还实现构建所述场景分割网络,所述构建包括:9. The electronic device according to claim 9, wherein, when the instructions are executed by the at least one processor, the construction of the scene segmentation network is further implemented, and the construction comprises:
    构建执行所述卷积操作、所述激活操作及所述池化操作的分割层;Constructing a segmentation layer that performs the convolution operation, the activation operation, and the pooling operation;
    构建执行所述上采样操作、所述卷积操作及所述激活操作的提取层;及Construct an extraction layer that performs the upsampling operation, the convolution operation, and the activation operation; and
    构建执行所述卷积操作、所述激活操作及所述分类操作的输出层;Constructing an output layer that performs the convolution operation, the activation operation, and the classification operation;
    根据所述分割层、所述提取层及所述输出层,构建所述场景分割网络。The scene segmentation network is constructed according to the segmentation layer, the extraction layer, and the output layer.
  11. 如权利要求10所述的电子设备,其中,所述指令被所述至少一个处理器执行时还实现训练所述场景分割网络,其中,所述训练包括:11. The electronic device according to claim 10, wherein, when the instructions are executed by the at least one processor, training the scene segmentation network is further implemented, wherein the training comprises:
    步骤A:获取场景图片训练集,利用所述分割层对所述场景图片训练集执行第一特征提取,得到第一场景特征集;Step A: Obtain a scene picture training set, and use the segmentation layer to perform first feature extraction on the scene picture training set to obtain a first scene feature set;
    步骤B:利用所述提取层在所述第一场景特征集中执行第二特征提取,得到第二场景特征集;Step B: Use the extraction layer to perform second feature extraction in the first scene feature set to obtain a second scene feature set;
    步骤C:利用所述输出层在所述第二场景特征集中执行第三特征提取和所述分类操作,得到并输出第一训练值;Step C: Use the output layer to perform the third feature extraction and the classification operation in the second scene feature set to obtain and output the first training value;
    步骤D:在所述第一训练值大于预设的第一训练阈值时,返回步骤A;Step D: When the first training value is greater than the preset first training threshold, return to step A;
    步骤E:在所述第一训练值小于或等于所述第一训练阈值时,得到训练完成的场景分割网络。Step E: When the first training value is less than or equal to the first training threshold, a trained scene segmentation network is obtained.
  12. 如权利要求9所述的电子设备,其中,所述指令被所述至少一个处理器执行时还实现构建所述目标识别网络,所述构建包括:9. The electronic device according to claim 9, wherein the instruction is executed by the at least one processor to further realize the construction of the target recognition network, and the construction comprises:
    提取所述场景分割网络中卷积操作的卷积核尺寸并设置膨胀率;Extracting the size of the convolution kernel of the convolution operation in the scene segmentation network and setting the expansion rate;
    根据所述卷积核尺寸和所述膨胀率以及预构建的膨胀卷积计算公式,计算得到所述膨胀卷积操作的膨胀卷积核尺寸;Calculate the expanded convolution kernel size of the expanded convolution operation according to the size of the convolution kernel, the expansion ratio, and a pre-built expanded convolution calculation formula;
    根据所述卷积核尺寸及所述膨胀卷积核尺寸构建得到所述第一目标识别层;Constructing and obtaining the first target recognition layer according to the size of the convolution kernel and the size of the expanded convolution kernel;
    构建相似性度量分类函数,并根据所述膨胀卷积操作和所述相似性度量分类函数构建第二目标识别层;Construct a similarity measure classification function, and construct a second target recognition layer according to the dilated convolution operation and the similarity measure classification function;
    根据所述第一目标识别层及所述第二目标识别层,构建所述目标识别网络。According to the first target recognition layer and the second target recognition layer, the target recognition network is constructed.
  13. 如权利要求12所述的电子设备,其中,所述指令被所述至少一个处理器执行时还实现训练所述目标识别网络,其中,所述训练包括:The electronic device according to claim 12, wherein, when the instructions are executed by the at least one processor, training the target recognition network is also implemented, wherein the training comprises:
    步骤a:获取目标图片训练集,利用所述第一目标识别层对所述目标图片训练集执行第一膨胀卷积操作,得到第一目标特征集;Step a: Obtain a target picture training set, and use the first target recognition layer to perform a first dilated convolution operation on the target picture training set to obtain a first target feature set;
    步骤b:利用所述第二目标识别层对所述第一目标特征集执行第二膨胀卷积操作及相似性度量计算,得到并输出第二训练值;Step b: Use the second target recognition layer to perform a second dilated convolution operation and similarity metric calculation on the first target feature set to obtain and output a second training value;
    步骤c:若所述第二训练值大于所述第二训练阈值,则返回步骤a;Step c: If the second training value is greater than the second training threshold, return to step a;
    步骤d:若所述第二训练值小于或等于所述第二训练阈值,得到所述目标识别网络。Step d: If the second training value is less than or equal to the second training threshold, the target recognition network is obtained.
  14. 如权利要求13所述的电子设备,其中,所述相似性度量分类函数采用如下构建方法:The electronic device according to claim 13, wherein the similarity measure classification function adopts the following construction method:
    Figure PCTCN2020098990-appb-100003
    Figure PCTCN2020098990-appb-100003
    其中,y *为所述目标图片训练集的标签值,
    Figure PCTCN2020098990-appb-100004
    为所述目标识别网络训练所述目标图片训练集的训练值,c为所述目标图片训练集标签值的类别。
    Where y * is the label value of the target image training set,
    Figure PCTCN2020098990-appb-100004
    The training value of the target picture training set is trained for the target recognition network, and c is the category of the label value of the target picture training set.
  15. 一种计算机可读存储介质,存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下步骤:A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the following steps:
    利用场景分割网络,对原始图片执行卷积操作、激活操作及池化操作得到第一特征集;Use the scene segmentation network to perform convolution, activation, and pooling operations on the original image to obtain the first feature set;
    在所述场景分割网络内,对所述第一特征集执行上采样操作、所述卷积操作及所述激活操作,得到第二特征集,并根据预先构建的分类函数,对所述第二特征集进行分类操作得到场景图片集;In the scene segmentation network, perform an upsampling operation, the convolution operation, and the activation operation on the first feature set to obtain a second feature set, and according to a pre-built classification function, perform an upsampling operation, the convolution operation and the activation operation on the second feature set. Perform a classification operation on the feature set to obtain a scene picture set;
    将所述场景图片集输入至目标识别网络中进行目标识别得到目标图片。The scene picture set is input into a target recognition network for target recognition to obtain a target picture.
  16. 如权利要求15所述的计算机可读存储介质,其中,所述计算机程序被处理器执行时还实现构建所述场景分割网络,所述构建包括:15. The computer-readable storage medium according to claim 15, wherein when the computer program is executed by the processor, the scene segmentation network is constructed, and the construction includes:
    构建执行所述卷积操作、所述激活操作及所述池化操作的分割层;Constructing a segmentation layer that performs the convolution operation, the activation operation, and the pooling operation;
    构建执行所述上采样操作、所述卷积操作及所述激活操作的提取层;及Construct an extraction layer that performs the upsampling operation, the convolution operation, and the activation operation; and
    构建执行所述卷积操作、所述激活操作及所述分类操作的输出层;Constructing an output layer that performs the convolution operation, the activation operation, and the classification operation;
    根据所述分割层、所述提取层及所述输出层,构建所述场景分割网络。The scene segmentation network is constructed according to the segmentation layer, the extraction layer, and the output layer.
  17. 如权利要求16所述的计算机可读存储介质,其中,所述计算机程序被处理器执行时还实现训练所述场景分割网络,其中,所述训练包括:15. The computer-readable storage medium according to claim 16, wherein the computer program further realizes training of the scene segmentation network when the computer program is executed by the processor, wherein the training comprises:
    步骤A:获取场景图片训练集,利用所述分割层对所述场景图片训练集执行第一特征提取,得到第一场景特征集;Step A: Obtain a scene picture training set, and use the segmentation layer to perform first feature extraction on the scene picture training set to obtain a first scene feature set;
    步骤B:利用所述提取层在所述第一场景特征集中执行第二特征提取,得到第二场景特征集;Step B: Use the extraction layer to perform second feature extraction in the first scene feature set to obtain a second scene feature set;
    步骤C:利用所述输出层在所述第二场景特征集中执行第三特征提取和所述分类操作,得到并输出第一训练值;Step C: Use the output layer to perform the third feature extraction and the classification operation in the second scene feature set to obtain and output the first training value;
    步骤D:在所述第一训练值大于预设的第一训练阈值时,返回步骤A;Step D: When the first training value is greater than the preset first training threshold, return to step A;
    步骤E:在所述第一训练值小于或等于所述第一训练阈值时,得到训练完成的场景分割网络。Step E: When the first training value is less than or equal to the first training threshold, a trained scene segmentation network is obtained.
  18. 如权利要求15所述的计算机可读存储介质,其中,所述计算机程序被处理器执行时还实现构建所述目标识别网络,所述构建包括:15. The computer-readable storage medium according to claim 15, wherein when the computer program is executed by the processor, the target recognition network is constructed, and the construction includes:
    提取所述场景分割网络中卷积操作的卷积核尺寸并设置膨胀率;Extracting the size of the convolution kernel of the convolution operation in the scene segmentation network and setting the expansion rate;
    根据所述卷积核尺寸和所述膨胀率以及预构建的膨胀卷积计算公式,计算得到所述膨胀卷积操作的膨胀卷积核尺寸;Calculate the expanded convolution kernel size of the expanded convolution operation according to the size of the convolution kernel, the expansion ratio, and a pre-built expanded convolution calculation formula;
    根据所述卷积核尺寸及所述膨胀卷积核尺寸构建得到所述第一目标识别层;Constructing and obtaining the first target recognition layer according to the size of the convolution kernel and the size of the expanded convolution kernel;
    构建相似性度量分类函数,并根据所述膨胀卷积操作和所述相似性度量分类函数构建第二目标识别层;Construct a similarity measure classification function, and construct a second target recognition layer according to the dilated convolution operation and the similarity measure classification function;
    根据所述第一目标识别层及所述第二目标识别层,构建所述目标识别网络。According to the first target recognition layer and the second target recognition layer, the target recognition network is constructed.
  19. 如权利要求18所述的计算机可读存储介质,其中,所述计算机程序被处理器执行时还实现训练所述目标识别网络,其中,所述训练包括:18. The computer-readable storage medium of claim 18, wherein the computer program, when executed by the processor, further implements training of the target recognition network, wherein the training includes:
    步骤a:获取目标图片训练集,利用所述第一目标识别层对所述目标图片训练集执行第一膨胀卷积操作,得到第一目标特征集;Step a: Obtain a target picture training set, and use the first target recognition layer to perform a first dilated convolution operation on the target picture training set to obtain a first target feature set;
    步骤b:利用所述第二目标识别层对所述第一目标特征集执行第二膨胀卷积操作及相似性度量计算,得到并输出第二训练值;Step b: Use the second target recognition layer to perform a second dilated convolution operation and similarity measure calculation on the first target feature set to obtain and output a second training value;
    步骤c:若所述第二训练值大于所述第二训练阈值,则返回步骤a;Step c: If the second training value is greater than the second training threshold, return to step a;
    步骤d:若所述第二训练值小于或等于所述第二训练阈值,得到所述目标识别网络。Step d: If the second training value is less than or equal to the second training threshold, the target recognition network is obtained.
  20. 如权利要求19所述的计算机可读存储介质,其中,所述相似性度量分类函数采用如下构建方法:19. The computer-readable storage medium of claim 19, wherein the similarity metric classification function adopts the following construction method:
    Figure PCTCN2020098990-appb-100005
    Figure PCTCN2020098990-appb-100005
    其中,y *为所述目标图片训练集的标签值,
    Figure PCTCN2020098990-appb-100006
    为所述目标识别网络训练所述目标图片训练集的训练值,c为所述目标图片训练集标签值的类别。
    Where y * is the label value of the target image training set,
    Figure PCTCN2020098990-appb-100006
    The training value of the target picture training set is trained for the target recognition network, and c is the category of the label value of the target picture training set.
PCT/CN2020/098990 2020-04-30 2020-06-29 Target identification method and apparatus based on picture, and electronic device and readable storage medium WO2021217858A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010360752.4A CN111652226B (en) 2020-04-30 2020-04-30 Picture-based target identification method and device and readable storage medium
CN202010360752.4 2020-04-30

Publications (1)

Publication Number Publication Date
WO2021217858A1 true WO2021217858A1 (en) 2021-11-04

Family

ID=72352245

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/098990 WO2021217858A1 (en) 2020-04-30 2020-06-29 Target identification method and apparatus based on picture, and electronic device and readable storage medium

Country Status (2)

Country Link
CN (1) CN111652226B (en)
WO (1) WO2021217858A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118134115A (en) * 2024-05-06 2024-06-04 深圳市众翔奕精密科技有限公司 Safety management method and system applied to electronic auxiliary material processing

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106295139A (en) * 2016-07-29 2017-01-04 姹ゅ钩 A kind of tongue body autodiagnosis health cloud service system based on degree of depth convolutional neural networks
CN106339591A (en) * 2016-08-25 2017-01-18 汤平 Breast cancer prevention self-service health cloud service system based on deep convolutional neural network
CN106372390A (en) * 2016-08-25 2017-02-01 姹ゅ钩 Deep convolutional neural network-based lung cancer preventing self-service health cloud service system
CN110135421A (en) * 2019-05-17 2019-08-16 梧州学院 Licence plate recognition method, device, computer equipment and computer readable storage medium
US20200057935A1 (en) * 2017-03-23 2020-02-20 Peking University Shenzhen Graduate School Video action detection method based on convolutional neural network

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110232394B (en) * 2018-03-06 2021-08-10 华南理工大学 Multi-scale image semantic segmentation method
CN110473195B (en) * 2019-08-13 2023-04-18 中山大学 Medical focus detection framework and method capable of being customized automatically

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106295139A (en) * 2016-07-29 2017-01-04 姹ゅ钩 A kind of tongue body autodiagnosis health cloud service system based on degree of depth convolutional neural networks
CN106339591A (en) * 2016-08-25 2017-01-18 汤平 Breast cancer prevention self-service health cloud service system based on deep convolutional neural network
CN106372390A (en) * 2016-08-25 2017-02-01 姹ゅ钩 Deep convolutional neural network-based lung cancer preventing self-service health cloud service system
US20200057935A1 (en) * 2017-03-23 2020-02-20 Peking University Shenzhen Graduate School Video action detection method based on convolutional neural network
CN110135421A (en) * 2019-05-17 2019-08-16 梧州学院 Licence plate recognition method, device, computer equipment and computer readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118134115A (en) * 2024-05-06 2024-06-04 深圳市众翔奕精密科技有限公司 Safety management method and system applied to electronic auxiliary material processing

Also Published As

Publication number Publication date
CN111652226B (en) 2024-05-10
CN111652226A (en) 2020-09-11

Similar Documents

Publication Publication Date Title
CN111652845B (en) Automatic labeling method and device for abnormal cells, electronic equipment and storage medium
WO2021189912A1 (en) Method and apparatus for detecting target object in image, and electronic device and storage medium
WO2022121156A1 (en) Method and apparatus for detecting target object in image, electronic device and readable storage medium
CN112446544B (en) Traffic flow prediction model training method and device, electronic equipment and storage medium
WO2021169173A1 (en) Data clustering storage method and apparatus, computer device, and storage medium
WO2021151338A1 (en) Medical imagery analysis method, apparatus, electronic device and readable storage medium
WO2022141858A1 (en) Pedestrian detection method and apparatus, electronic device, and storage medium
WO2022141859A1 (en) Image detection method and apparatus, and electronic device and storage medium
CN112699775A (en) Certificate identification method, device and equipment based on deep learning and storage medium
CN113487621B (en) Medical image grading method, device, electronic equipment and readable storage medium
CN112418216A (en) Method for detecting characters in complex natural scene image
CN112541902B (en) Similar region searching method, device, electronic equipment and medium
WO2021189827A1 (en) Method and apparatus for recognizing blurred image, and device and computer-readable storage medium
CN111476225B (en) In-vehicle human face identification method, device, equipment and medium based on artificial intelligence
CN113157739B (en) Cross-modal retrieval method and device, electronic equipment and storage medium
WO2021189856A1 (en) Certificate check method and apparatus, and electronic device and medium
CN114708461A (en) Multi-modal learning model-based classification method, device, equipment and storage medium
CN111931729B (en) Pedestrian detection method, device, equipment and medium based on artificial intelligence
CN111985449A (en) Rescue scene image identification method, device, equipment and computer medium
WO2021217858A1 (en) Target identification method and apparatus based on picture, and electronic device and readable storage medium
WO2023178798A1 (en) Image classification method and apparatus, and device and medium
CN112528903B (en) Face image acquisition method and device, electronic equipment and medium
CN112434601B (en) Vehicle illegal detection method, device, equipment and medium based on driving video
CN112905817B (en) Image retrieval method and device based on sorting algorithm and related equipment
CN112561893B (en) Picture matching method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20934098

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20934098

Country of ref document: EP

Kind code of ref document: A1