Movatterモバイル変換


[0]ホーム

URL:


CN108229379A - Image recognition method and device, computer equipment and storage medium - Google Patents

Image recognition method and device, computer equipment and storage medium
Download PDF

Info

Publication number
CN108229379A
CN108229379ACN201711479546.XACN201711479546ACN108229379ACN 108229379 ACN108229379 ACN 108229379ACN 201711479546 ACN201711479546 ACN 201711479546ACN 108229379 ACN108229379 ACN 108229379A
Authority
CN
China
Prior art keywords
image
neural network
convolutional neural
features
network model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711479546.XA
Other languages
Chinese (zh)
Inventor
张弓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp LtdfiledCriticalGuangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711479546.XApriorityCriticalpatent/CN108229379A/en
Publication of CN108229379ApublicationCriticalpatent/CN108229379A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The invention provides an image identification method, an image identification device, computer equipment and a storage medium, wherein the method comprises the following steps: the method comprises the steps of obtaining an image to be recognized, and performing image recognition on the image to be recognized by adopting a trained first convolution neural network model to determine an object shown in the image to be recognized, wherein the first convolution neural network model comprises a first convolution neural network for extracting image global features and a second convolution neural network for extracting image local features. Through the trained first convolution neural network model, the image to be recognized is recognized, the accuracy of image recognition is improved, and the problems that in the prior art, the image recognition is extracted by adopting manually designed features and the accuracy of the image recognition is low are solved.

Description

Translated fromChinese
图像识别方法、装置、计算机设备和存储介质Image recognition method, device, computer equipment and storage medium

技术领域technical field

本申请涉及图像识别技术领域,尤其涉及一种图像识别方法、装置、计算机设备和存储介质。The present application relates to the technical field of image recognition, and in particular to an image recognition method, device, computer equipment and storage medium.

背景技术Background technique

随着物联网、人工智能技术的蓬勃发展,智能化大潮已经席卷整个家电业,从智能手机、智能电视,到如今的智能冰箱、智能空调等等,智能正成为影响并改变人们生活的主导力量。智能手机作为智能家居的重要组成部分,通过它我们可以实现食品的智能管理、远程操控、语音留言、甚至是互联网娱乐等。而在智能食品管理中,其核心技术是食品识别技术。With the vigorous development of the Internet of Things and artificial intelligence technology, the tide of intelligence has swept the entire home appliance industry. From smart phones, smart TVs, to today's smart refrigerators, smart air conditioners, etc., intelligence is becoming the dominant force that affects and changes people's lives. Smartphones are an important part of smart homes, through which we can realize intelligent food management, remote control, voice messages, and even Internet entertainment. In intelligent food management, its core technology is food identification technology.

相关技术中,食品识别的方式目前主要有手动录入、条码扫描、图像识别等。其中,手动录入添加操作繁琐,而条码扫描涉及食品的电子标签、天线、读卡器的设计,设计周期较长,同时,也需要人为预先手动贴上电子标签,操作也较繁琐。而传统的图像识别方法主要通过人工设计的特征进行特征提取,对于大量不同物体的识别鲁棒性较差,识别准确度低的问题。In related technologies, food identification methods currently mainly include manual entry, barcode scanning, and image recognition. Among them, manual input and addition operations are cumbersome, while barcode scanning involves the design of food electronic labels, antennas, and card readers, and the design cycle is long. However, the traditional image recognition method mainly uses artificially designed features for feature extraction, which has poor recognition robustness and low recognition accuracy for a large number of different objects.

发明内容Contents of the invention

本发明旨在至少在一定程度上解决相关技术中的技术问题之一。The present invention aims to solve one of the technical problems in the related art at least to a certain extent.

为此,本发明提出一种图像识别方法,以实现通过训练好的第一卷积神经网络模型对待识别图像进行图像识别,提高了图像识别的准确度。For this reason, the present invention proposes an image recognition method to realize image recognition of the image to be recognized through the trained first convolutional neural network model, thereby improving the accuracy of image recognition.

本发明提出一种图像识别装置。The invention provides an image recognition device.

本发明提出一种计算机设备。The invention proposes a computer device.

本发明提出一种计算机可读存储介质。The present invention proposes a computer-readable storage medium.

为达上述目的,本发明第一方面实施例提出了一种图像识别方法,包括:In order to achieve the above purpose, the embodiment of the first aspect of the present invention proposes an image recognition method, including:

获取待识别的图像;Obtain the image to be recognized;

采用训练后的第一卷积神经网络模型,对所述待识别图像进行图像识别,以确定所述待识别的图像中所展示的对象;其中,所述第一卷积神经网络模型包括用于提取图像全局特征的第一路卷积神经网络和用于提取图像局部特征的第二路卷积神经网络。Using the trained first convolutional neural network model to perform image recognition on the image to be recognized to determine the object shown in the image to be recognized; wherein the first convolutional neural network model includes The first convolutional neural network for extracting the global features of the image and the second convolutional neural network for extracting the local features of the image.

本发明实施例的图像识别方法中,获取待识别的图像,采用训练后的第一卷积神经网络模型,对待识别图像进行图像识别,以确定待识别的图像中所展示的对象,其中,第一卷积神经网络模型包括用于提取图像全局特征的第一路卷积神经网络和用于提取图像局部特征的第二路卷积神经网络。通过训练好的卷积神经网络模型对图像进行识别,提高了图像识别的准确度,解决了相关技术中,图像识别采用人工设计的特征进行提取,操作复杂,对于大量不同的对象识别鲁棒性较差,造成图像识别的准确度低的问题。In the image recognition method of the embodiment of the present invention, the image to be recognized is obtained, and the trained first convolutional neural network model is used to perform image recognition on the image to be recognized, so as to determine the object displayed in the image to be recognized, wherein, the first A convolutional neural network model includes a first convolutional neural network for extracting global features of an image and a second convolutional neural network for extracting local features of an image. Recognize images through the trained convolutional neural network model, which improves the accuracy of image recognition and solves the problem that in related technologies, image recognition uses artificially designed features for extraction, complex operations, and robustness for a large number of different object recognition. Poor, causing the problem of low accuracy of image recognition.

为达上述目的,本发明第二方面实施例提出了一种图像识别装置,包括:In order to achieve the above purpose, the embodiment of the second aspect of the present invention proposes an image recognition device, including:

获取模块,用于获取待识别的图像;An acquisition module, configured to acquire an image to be identified;

识别模块,用于采用训练后的第一卷积神经网络模型,对所述待识别图像进行图像识别,以确定所述待识别的图像中所展示的对象;其中,所述第一卷积神经网络模型包括用于提取图像全局特征的第一路卷积神经网络和用于提取图像局部特征的第二路卷积神经网络。A recognition module, configured to use the trained first convolutional neural network model to perform image recognition on the image to be recognized, so as to determine the object displayed in the image to be recognized; wherein, the first convolutional neural network The network model includes a first convolutional neural network for extracting global image features and a second convolutional neural network for extracting local image features.

本发明实施例的图像识别装置中,获取模块,用于获取待识别的图像,识别模块,用于采用训练后的第一卷积神经网络模型,对待识别图像进行图像识别,以确定待识别的图像中所展示的对象,其中,第一卷积神经网络模型包括用于提取图像全局特征的第一路卷积神经网络和用于提取图像局部特征的第二路卷积神经网络。通过训练好的第一卷积神经网络模型对待识别图像进行识别,操作简单,对于不同对象识别的鲁棒性好,同时第一卷积神经网络模型中包含的可用于提取图像全局特征的第一路卷积神经网络和用于提取图像局部特征的第二路卷积神经网络,提高了图像识别的准确度和精细度。。In the image recognition device of the embodiment of the present invention, the acquisition module is used to obtain the image to be recognized, and the recognition module is used to perform image recognition on the image to be recognized by using the trained first convolutional neural network model to determine the image to be recognized The object shown in the image, wherein the first convolutional neural network model includes a first-pass convolutional neural network for extracting global features of the image and a second-pass convolutional neural network for extracting local features of the image. The image to be recognized is recognized by the trained first convolutional neural network model, which is easy to operate and has good robustness for different object recognition. The first convolutional neural network and the second convolutional neural network for extracting local features of the image improve the accuracy and fineness of image recognition. .

为达上述目的,本发明第三方面实施例提出了一种计算机设备,该计算机设备包括移动终端,具体包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现如第一方面所述的图像识别方法。To achieve the above purpose, the embodiment of the third aspect of the present invention proposes a computer device, the computer device includes a mobile terminal, specifically includes a memory, a processor, and a computer program stored on the memory and operable on the processor. When the processor executes the program, the image recognition method according to the first aspect is realized.

为达上述目的,本发明第四方面实施例提出了一种计算机可读存储介质,其上存储有计算机程序,当该程序被处理器执行时实现如第一方面所述的图像识别方法。To achieve the above purpose, the embodiment of the fourth aspect of the present invention provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the image recognition method as described in the first aspect is implemented.

本发明附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.

附图说明Description of drawings

本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and easy to understand from the following description of the embodiments in conjunction with the accompanying drawings, wherein:

图1为本发明实施例所提供的一种图像识别方法的流程示意图;FIG. 1 is a schematic flow chart of an image recognition method provided by an embodiment of the present invention;

图2为采用手机进行对象识别的示意图;Fig. 2 is a schematic diagram of using a mobile phone for object recognition;

图3为本发明实施例所提供的第一卷积神经网络模型训练的方法的流程示意图;FIG. 3 is a schematic flowchart of a method for training a first convolutional neural network model provided by an embodiment of the present invention;

图4为本发明实施例所提供的一种图像去雾方法的流程示意图;FIG. 4 is a schematic flowchart of an image defogging method provided by an embodiment of the present invention;

图5为本发明实施例所提供的另一种图像识别方法的流程示意图;FIG. 5 is a schematic flowchart of another image recognition method provided by an embodiment of the present invention;

图6为本发明实施例所提供的第二卷积神经网络模型训练方法的流程示意图;6 is a schematic flowchart of a second convolutional neural network model training method provided by an embodiment of the present invention;

图7为本发明实施例所提供的又一种图像识别方法的流程示意图;FIG. 7 is a schematic flowchart of another image recognition method provided by an embodiment of the present invention;

图8为本发明实施例提供的一种图像识别装置的结构示意图;FIG. 8 is a schematic structural diagram of an image recognition device provided by an embodiment of the present invention;

图9为本发明实施例所提供的另一种图像识别装置的结构示意图;FIG. 9 is a schematic structural diagram of another image recognition device provided by an embodiment of the present invention;

图10为本发明实施例所提供的识别模块72的结构示意图之一;以及FIG. 10 is one of the structural schematic diagrams of the identification module 72 provided by the embodiment of the present invention; and

图11为本发明实施例所提供的识别模块72的结构示意图之二。FIG. 11 is the second structural diagram of the identification module 72 provided by the embodiment of the present invention.

具体实施方式Detailed ways

下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本发明,而不能理解为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary and are intended to explain the present invention and should not be construed as limiting the present invention.

下面参考附图描述本发明实施例的图像识别方法、装置、计算机设备和存储介质。The image recognition method, device, computer equipment, and storage medium of the embodiments of the present invention are described below with reference to the accompanying drawings.

本发明实施例的图像识别方法,可以用于对各种对象的图像进行识别,本实施例的执行终端具体可以为手机,本领域技术人员可以知晓,执行终端还可以为其它移动终端,均可以参考本实施例中提供的方法进行图像识别,同时以下实施例中的对象以食材为例,进行具体说明,对于其他种类的对象,其实现原理一样,在本发明实施例中不再赘述。The image recognition method of the embodiment of the present invention can be used to recognize images of various objects. The execution terminal of this embodiment can be a mobile phone. Those skilled in the art can know that the execution terminal can also be other mobile terminals. Refer to the method provided in this embodiment for image recognition, and at the same time, the objects in the following embodiments will be described in detail by taking food as an example. For other types of objects, the implementation principle is the same, and will not be repeated in the embodiments of the present invention.

图1为本发明实施例所提供的一种图像识别方法的流程示意图。FIG. 1 is a schematic flowchart of an image recognition method provided by an embodiment of the present invention.

如图1所示,该方法包括如下步骤:As shown in Figure 1, the method includes the following steps:

步骤101,获取待识别的图像。Step 101, acquire an image to be recognized.

具体地,获取待识别的图像,该图像可以为食材在多种状态下的图像,每个图像中仅包含一种食材,其中,食材的图像可以通过拍照设备直接拍摄获取,也可以在网上下载拍摄的食材的图像,又或者从现有的食材图像库中提取。Specifically, the image to be recognized is obtained, which can be images of ingredients in various states, and each image contains only one kind of ingredient, where the image of the ingredient can be directly captured by a camera device, or can be downloaded from the Internet The images of the ingredients are taken, or extracted from the existing image library of ingredients.

步骤102,采用训练后的第一卷积神经网络模型,对待识别图像进行图像识别,以确定待识别的图像中所展示的对象。Step 102, using the trained first convolutional neural network model to perform image recognition on the image to be recognized, so as to determine the object shown in the image to be recognized.

具体地,第一卷积神经网络模型包括用于提取图像全局特征的第一路卷积神经网络和用于提取图像局部特征的第二路卷积神经网络。其中,第一路卷积神经网络用于提取图像全局特征,如图像样本中食材的位置、轮廓等全局信息。第二路卷积神经网络用于提取图像局部特征,如图像样本中食材的形状、颜色、表面等的局部特征。将食材的待识别图像输入到已经训练好的第一卷积神经网络模型中,对待识别图像进行图像识别,以确定待识别的图像中所展示的对象。Specifically, the first convolutional neural network model includes a first convolutional neural network for extracting global features of an image and a second convolutional neural network for extracting local features of an image. Among them, the first convolutional neural network is used to extract the global features of the image, such as global information such as the position and outline of the ingredients in the image sample. The second convolutional neural network is used to extract local features of the image, such as the local features of the shape, color, surface, etc. of the ingredients in the image sample. Inputting the image to be recognized of the food material into the trained first convolutional neural network model, performing image recognition on the image to be recognized to determine the object shown in the image to be recognized.

例如,待识别图像中的食材为一个包装袋中的苹果,则采用第一卷积神经网络模型进行识别后,识别出苹果,图2为采用手机进行对象识别的示意图,如图2所示,通过手机对待识别图像中的对象进行识别后,得到识别结果为苹果。For example, if the food material in the image to be recognized is an apple in a packaging bag, the first convolutional neural network model is used for recognition, and the apple is recognized. Figure 2 is a schematic diagram of object recognition using a mobile phone, as shown in Figure 2. After the object in the image to be recognized is recognized by the mobile phone, the recognition result is apple.

本发明实施例的图像识别方法中,获取待识别的图像,采用训练后的第一卷积神经网络模型,对待识别图像进行图像识别,以确定待识别的图像中所展示的对象,其中,第一卷积神经网络模型包括用于提取图像全局特征的第一路卷积神经网络和用于提取图像局部特征的第二路卷积神经网络。通过训练后的第一卷积神经网络模型,对待识别图像进行识别,提高了图像识别的准确度,解决了现有技术中,图像识别采用人工设计的特征进行提取,图像识别的准确度低的问题。In the image recognition method of the embodiment of the present invention, the image to be recognized is obtained, and the trained first convolutional neural network model is used to perform image recognition on the image to be recognized, so as to determine the object displayed in the image to be recognized, wherein, the first A convolutional neural network model includes a first convolutional neural network for extracting global features of an image and a second convolutional neural network for extracting local features of an image. Through the first convolutional neural network model after training, the image to be recognized is recognized, which improves the accuracy of image recognition and solves the problem of low image recognition accuracy in the prior art where image recognition uses artificially designed features for extraction. question.

基于上述实施例,在利用第一卷积神经网络模型进行图像识别之前,需要先对第一卷积神经网络模型进行训练,训练完成后,对第一卷积神经网络模型进行待识别图像的识别,为此,本实施例提出了一种对第一卷积神经网络模型进行训练的方法可能的实现方式,图3为本发明实施例所提供的第一卷积神经网络模型训练的方法的流程示意图,如图3所示,该方法包括如下步骤:Based on the above embodiments, before using the first convolutional neural network model for image recognition, the first convolutional neural network model needs to be trained, and after the training is completed, the first convolutional neural network model is used to identify the image to be recognized For this reason, this embodiment proposes a possible implementation of the method for training the first convolutional neural network model, and FIG. 3 is a flow chart of the method for training the first convolutional neural network model provided by the embodiment of the present invention Schematic diagram, as shown in Figure 3, the method comprises the steps:

步骤201,采集图像样本。Step 201, collecting image samples.

具体地,图像样本,是从预先建立的图像库中得到的。其中,预先建立图像库时,图像库中的图像的获取方式有很多种,其中一种可能的实现方式,是对多种对象拍摄得到的,对多种对象进行拍摄获取图像时,图像分辨率不进行限定;另一种可能的实现方式,是从网上或者本地的图片库中下载图像得到的。获取图像样本后,还需要对获取到的图像样本中的对象进行标注,其中,标注是指每张图像中都对应单一对象,对每个单一对象的真实名称进行标注,作为图像识别的标签。同时采集的图像样本包括多种对象在各种不同状态下的图像,如正常清晰状态下的图像,包装袋包裹状态下的图像以及冰箱内雾气包裹状态下的图像等。例如,对于食材苹果,采集到的图像样本可以为正常清晰状态下的苹果,可以为放置于包装袋中的苹果,还可以为放置于冰镇中表面被冰箱中雾气包裹状态下的苹果。Specifically, the image samples are obtained from a pre-established image library. Among them, when the image library is pre-established, there are many ways to acquire the images in the image library. One of the possible implementation methods is to obtain images from various objects. When capturing images from various objects, the image resolution It is not limited; another possible implementation is to download images from the Internet or a local image library. After obtaining the image samples, it is also necessary to label the objects in the obtained image samples. The labeling means that each image corresponds to a single object, and the real name of each single object is marked as a label for image recognition. The image samples collected at the same time include images of various objects in various states, such as images in the normal and clear state, images in the state of packaging bags, and images in the state of fog in the refrigerator. For example, for apples as an ingredient, the collected image samples can be apples in a normal and clear state, apples placed in a packaging bag, or apples placed in a chilled state covered by fog in the refrigerator.

对于通过拍摄方式获取图像库中的图像样本时,对于采用拍摄方式时所拍摄图像的像素不进行限定,作为一种可能,为了便于统一,可将所有的图像归一化到一个统一的分辨率,如分辨率为448x448,或者为分辨率224*224。但对于图像的分辨率本实施例中并不做限定。When the image samples in the image library are obtained by shooting, the pixels of the captured images are not limited. As a possibility, in order to facilitate unification, all images can be normalized to a uniform resolution , such as the resolution is 448x448, or the resolution is 224*224. However, the resolution of the image is not limited in this embodiment.

步骤202,利用第一路卷积神经网络进行特征提取。Step 202, using the first convolutional neural network to perform feature extraction.

具体地,第一卷积神经网络模型包括第一路卷积神经网络,第一路卷积神经网络用于提取图像全局特征,如图像训练样本中食材的位置、轮廓等全局信息。将图像样本中获取的图像训练样本集定义为X,对应的标签为Y,将训练样本输入第一路卷积神经网络中,进行特征提取,作为一种可能的实现方式,第一路卷积神经网络可采用已经训练好的深度卷积神经网络模型,如视觉几何组(Visual Geometry Group,VGG)21-layer net,生成特征图,记为f1Specifically, the first convolutional neural network model includes a first convolutional neural network, and the first convolutional neural network is used to extract global features of images, such as global information such as positions and contours of ingredients in image training samples. The image training sample set obtained in the image sample is defined as X, and the corresponding label is Y, and the training samples are input into the first convolutional neural network for feature extraction. As a possible implementation method, the first convolutional neural network The neural network can use a well-trained deep convolutional neural network model, such as Visual Geometry Group (VGG) 21-layer net, to generate a feature map, denoted as f1 .

步骤203,利用第二路卷积神经网络进行特征提取。Step 203, using the second convolutional neural network for feature extraction.

具体地,第一卷积神经网络模型还包括第二路卷积神经网络,第二路卷积神经网络用于提取图像局部特征,如图像样本中食材的形状、颜色、表面等的局部特征。将图像训练样本输入到第二路卷积神经网络中,进行特征提取,作为一种可能的实现方式,可采用比第一路卷积神经网络层数少的卷积神经网络,如已训练好的深度卷积神经网络模型,如VGG16-layer net,生成的特征图,记为f2Specifically, the first convolutional neural network model also includes a second convolutional neural network, and the second convolutional neural network is used to extract local features of the image, such as the local features of the shape, color, surface, etc. of the food in the image sample. Input image training samples into the second convolutional neural network for feature extraction. As a possible implementation, a convolutional neural network with fewer layers than the first convolutional neural network can be used. If it has been trained The feature map generated by the deep convolutional neural network model, such as VGG16-layer net, is denoted as f2 .

需要说明的是,步骤202和步骤203的执行时序可以分为4种情况,具体如下:It should be noted that the execution timing of step 202 and step 203 can be divided into four situations, as follows:

一、先执行步骤202,再执行步骤203。1. Step 202 is executed first, and then step 203 is executed.

二、先执行步骤203,再执行步骤202。2. Step 203 is executed first, and then step 202 is executed.

三、步骤202执行的同时,并行执行步骤203。3. While step 202 is being executed, step 203 is executed in parallel.

四、根据对象所属的类别,确定采用步骤202和步骤203,分别对待识别的图像进行特征提取的顺序,具体地,作为一种可能的实现方式,可根据待识别对象的全局特征较明显还是局部特征较明显,进行特征提取,若局部特征较明显,如对象的颜色较鲜艳,则优先提取局部特征,再提取全局特征,即先执行步骤203,再执行步骤202;反之,则先执行步骤202,再执行步骤203。4. According to the category to which the object belongs, determine the sequence of feature extraction of the image to be recognized by step 202 and step 203 respectively. Specifically, as a possible implementation, it can be based on whether the global feature of the object to be recognized is more obvious or local If the feature is more obvious, perform feature extraction. If the local feature is more obvious, such as the color of the object is brighter, then extract the local feature first, and then extract the global feature, that is, first execute step 203, and then execute step 202; otherwise, first execute step 202 , and then execute step 203.

步骤204,输入外积层,进行外积计算,得到各像素点的特征。Step 204, input the outer product layer, and perform outer product calculation to obtain the feature of each pixel.

具体地,将特征图f1和特征图f2,输入外积层,以像素为单位进行外积运算,得到各像素点的特征,记为fbi,计算公式为:Specifically, the feature map f1 and feature map f2 are input into the outer product layer, and the outer product operation is performed in units of pixels to obtain the feature of each pixel, denoted as fbi , and the calculation formula is:

步骤205,采用池化层对各像素点的特征进行加和,得到图像的双线性特征向量,并由归一化层进行归一化处理。Step 205, using the pooling layer to sum the features of each pixel to obtain the bilinear feature vector of the image, and performing normalization processing by the normalization layer.

具体地,采用池化层对各像素点的特征进行加和,即利用加和池化层得到图像的双线性特征向量,记为y,其中,x为特征图中的像素点,并由归一化层进行归一化处理,公式为:Specifically, the pooling layer is used to sum the features of each pixel point, that is, the bilinear feature vector of the image is obtained by using the summing pooling layer, which is denoted as y, Among them, x is the pixel in the feature map, and is normalized by the normalization layer, the formula is:

步骤206,采用全连接层将归一化的多种特征进行特征融合并输入分类器,确定识别出的对象。In step 206, the fully connected layer is used to fuse the normalized multiple features and input them into the classifier to determine the recognized object.

可选地,将池化层的输出值输入到全连接层,全连接层使用softmax激励函数作为输出层的多层感知器(Multi-Layer Perceptron),通过全连接层进行特征融合并分类,具体地,通过全连接层的Softmax激励函数,使得全连接层的输出概率之和为1,即Softmax函数把食材的名称对应的任意实值的向量转变成元素取值为0~1且和为1的向量,根据输出的食材名称所对应的概率,其名称概率最高的,即为识别出的食材名称。Optionally, the output value of the pooling layer is input to the fully connected layer, and the fully connected layer uses the softmax activation function as the multi-layer perceptron (Multi-Layer Perceptron) of the output layer, and performs feature fusion and classification through the fully connected layer, specifically Specifically, through the Softmax activation function of the fully connected layer, the sum of the output probabilities of the fully connected layer is 1, that is, the Softmax function converts any real-valued vector corresponding to the name of the ingredient into an element with a value of 0 to 1 and the sum is 1 The vector of , according to the probability corresponding to the name of the output ingredient, the name with the highest probability is the recognized ingredient name.

步骤207,根据各训练样本的对象识别结果以及训练样本的标注,确定损失函数的取值。Step 207: Determine the value of the loss function according to the object recognition results of each training sample and the labels of the training samples.

可选地,将各训练样本的对象识别结果定义为将训练样本的标注定义为Yi,采用L2级范数,计算和Yi之间的差异,再将差异值取平方作为损失函数的取值,以Loss代表损失函数,则损失函数的取值为Optionally, the object recognition result of each training sample is defined as Define the label of the training sample as Yi , adopt the L2 norm, and calculate and Yi , and then take the square of the difference as the value of the loss function, and use Loss to represent the loss function, then the value of the loss function is

步骤208,判断损失函数的取值与阈值的大小,若取值小于阈值,则执行步骤210,否则,执行步骤209。Step 208 , judging the value of the loss function and the size of the threshold, if the value is smaller than the threshold, go to step 210 , otherwise, go to step 209 .

具体地,根据计算得到的损失函数的取值,和阈值比对,若损失函数大于阈值,则调整第一卷积神经网络的参数;若损失函数小于阈值,则确定第一卷积神经网络模型训练完成。Specifically, according to the value of the calculated loss function, compare it with the threshold, if the loss function is greater than the threshold, then adjust the parameters of the first convolutional neural network; if the loss function is less than the threshold, then determine the first convolutional neural network model Training is complete.

步骤209,调整第一卷积神经网络模型的参数。Step 209, adjusting parameters of the first convolutional neural network model.

具体地,若损失函数的取值比阈值大,则调整第一卷积神经网络模型的参数,其中,第一卷积神经网络模型采用的是目前已经训练好的深度卷积神经网络模型,如VGG21-layer net模型和VGG 16-layer net模型,可对模型参数进行微调,得到每层的卷积核参数,如滤波器的尺寸、步长等,从而确定调整后第一卷积神经网络模型的参数,然后,返回从步骤202和步骤203重新开始执行,即通过参数调整后的第一卷积神经网络模型重新生成对象识别结果,并重新确定损失函数的取值,直至损失函数取值小于阈值,第一卷积神经网络模型训练完成。Specifically, if the value of the loss function is greater than the threshold, then adjust the parameters of the first convolutional neural network model, wherein the first convolutional neural network model uses a deep convolutional neural network model that has been trained so far, such as The VGG21-layer net model and the VGG 16-layer net model can fine-tune the model parameters to obtain the convolution kernel parameters of each layer, such as the filter size, step size, etc., so as to determine the adjusted first convolutional neural network model Then, return to step 202 and step 203 to restart execution, that is, regenerate the object recognition result through the parameter-adjusted first convolutional neural network model, and re-determine the value of the loss function until the value of the loss function is less than threshold, the training of the first convolutional neural network model is completed.

步骤210,确定第一卷积神经网络模型训练完成。In step 210, it is determined that the training of the first convolutional neural network model is completed.

步骤211,从图像样本中获取测试样本,并通过测试样本对训练后的第一卷积神经网络模型准确度进行验证,确定第一卷积神经网络模型的准确度高于阈值。In step 211, test samples are obtained from image samples, and the accuracy of the trained first convolutional neural network model is verified through the test samples, and it is determined that the accuracy of the first convolutional neural network model is higher than a threshold.

具体地,从图像样本中获取测试样本,其中,测试样本和训练样本的数量存在比例关系,按照该比例关系,从图像样本中获取测试样本,并将测试样本输入到训练后的第一卷积神经网络模型中,以得到测试样本所展示的对象。将每一个测试样本识别得到的对象和测试样本的标注进行比对,判断该测试样本的识别结果是否正确,从而,统计得到所有测试样本中识别出的对象是正确的测试样本的个数,将识别结果为正确的测试样本数除以总的测试样本数,则得到第一卷积神经网络模型的准确度,将该准确度和阈值比较,若高于阈值,则模型识别的准确度高,训练的效果较好;若准确度低于阈值,则模型识别的准确度低,训练的效果较差,则需要调整模型的训练样本数量对模型重新进行训练,即返回步骤201重新进行训练和验证。Specifically, test samples are obtained from image samples, wherein there is a proportional relationship between the number of test samples and training samples, according to this proportional relationship, test samples are obtained from image samples, and the test samples are input to the first convolution after training In the neural network model, to get the object shown by the test sample. Comparing the object identified by each test sample with the label of the test sample, judging whether the recognition result of the test sample is correct, and then counting the number of test samples for which the objects identified in all test samples are correct. The recognition result is the number of correct test samples divided by the total number of test samples, then the accuracy of the first convolutional neural network model is obtained, and the accuracy is compared with the threshold value. If it is higher than the threshold value, the accuracy of model recognition is high. The effect of training is better; if the accuracy is lower than the threshold, the accuracy of model recognition is low, and the effect of training is poor, then it is necessary to adjust the number of training samples of the model to retrain the model, that is, return to step 201 for retraining and verification .

本发明实施例的第一卷积神经网络模型的训练方法中,采集图像样本,从中获取训练样本,并将训练样本输入到第一卷积神经网络模型中进行图像识别,以得到所有对象识别结果,根据所有训练样本的对象识别结果以及训练样本的标注,确定损失函数的取值,根据损失函数的取值,对第一卷积神经网络模型进行参数调整,重新生成对象识别结果,并重新确定损失函数的取值,直至损失函数的取值小于阈值时,确定第一卷积神经网络模型训练完成,训练完成后对模型的训练效果进行验证。通过采集的图像样本中选取一定比例的训练样本对第一卷积神经网络模型进行训练,并将训练好的卷积神经网络模型通过测试样本进行验证,通过对双路卷积神经网络模型进行训练和验证,可以提高模型识别的准确度,而通过样本中训练样本和测试样本的比例值的控制,可以提升训练程度与识别的准确度。In the training method of the first convolutional neural network model in the embodiment of the present invention, image samples are collected, training samples are obtained therefrom, and the training samples are input into the first convolutional neural network model for image recognition to obtain all object recognition results , according to the object recognition results of all training samples and the labels of the training samples, determine the value of the loss function, adjust the parameters of the first convolutional neural network model according to the value of the loss function, regenerate the object recognition results, and re-determine The value of the loss function, until the value of the loss function is less than the threshold, it is determined that the training of the first convolutional neural network model is completed, and the training effect of the model is verified after the training is completed. The first convolutional neural network model is trained by selecting a certain proportion of training samples from the collected image samples, and the trained convolutional neural network model is verified by the test sample, and the two-way convolutional neural network model is trained. And verification can improve the accuracy of model recognition, and through the control of the ratio of training samples and test samples in the sample, the training degree and recognition accuracy can be improved.

实际应用中,食材对象所处的状态有多种情况,如包装袋包裹状态或者是在冰箱中有雾气包裹的状态,这种情况下采集到的食材图像,存在食材图像特征不明显的问题,需要通过对食材进行预处理,来提高后续食材识别的准确度,针对这一问题,本发明实施例提供了一种图像去雾的方法,具体说明了对模型训练过程中采集到的图像和图像识别过程中获取的待识别图像进行去雾预处理的流程,基于上述实施例,图4为本发明实施例所提供的一种图像去雾方法的流程示意图,如图4所示,该方法包括以下步骤:In practical applications, there are many situations in which the food object is in a state, such as the state of being wrapped in a packaging bag or the state of being wrapped in fog in the refrigerator. In this case, the collected food image has the problem that the characteristics of the food image are not obvious. It is necessary to preprocess the ingredients to improve the accuracy of subsequent ingredient recognition. To solve this problem, the embodiment of the present invention provides an image defogging method, specifically illustrating the image and image collected during the model training process. The flow of defogging preprocessing of the image to be recognized obtained during the recognition process, based on the above-mentioned embodiment, FIG. 4 is a schematic flow diagram of an image defogging method provided by the embodiment of the present invention. As shown in FIG. 4 , the method includes The following steps:

步骤301,获取待去雾的图像。Step 301, acquire an image to be defogged.

具体地,对于用于训练的图像样本和用于进行图像识别的图像,均作为待去雾的图像。Specifically, the image samples used for training and the images used for image recognition are both used as images to be defogged.

步骤302,对待去雾的图像进行去雾处理。Step 302, performing defogging processing on the image to be defogged.

针对每一个待去雾的图像进行去雾处理,具体为:第一步,对待去雾图像采用最小值滤波算法进行滤波,得到暗通道图,记为Jdark,计算公式为:其中,Jc表示彩色图像的各个通道红(R)、绿(G)和蓝(B),Ω(x)表示以像素x为中心的窗口。For each image to be defogged, the defogging process is carried out, specifically: the first step, the image to be defogged is filtered by the minimum value filtering algorithm, and the dark channel map is obtained, which is denoted as Jdark , and the calculation formula is: Among them,Jc represents each channel red (R), green (G) and blue (B) of the color image, and Ω(x) represents the window centered on pixel x.

第二步,设定阈值,从暗通道图中确定亮度高于阈值的目标像素,根据从暗通道图中确定的目标像素,在待去雾图像中确定和目标像素对应的对应像素,将对应像素的最大亮度作为大气亮度,记为大气亮度A。The second step is to set the threshold, determine the target pixel whose brightness is higher than the threshold from the dark channel map, and determine the corresponding pixel corresponding to the target pixel in the image to be defogged according to the target pixel determined from the dark channel map, and the corresponding The maximum brightness of the pixel is taken as the atmospheric brightness, which is recorded as the atmospheric brightness A.

第三步,根据大气亮度和预设的去雾因子,对待去雾图像进行计算,得到透射率图,透射率图记为T,作为一种可能的实现方式,计算公式为:其中,I(x)为待去雾图像,ω为去雾因子,ω取经验值0.95。The third step is to calculate the image to be defogged according to the atmospheric brightness and the preset defogging factor to obtain the transmittance map, which is marked as T. As a possible implementation method, the calculation formula is: Among them, I(x) is the image to be defogged, ω is the defogging factor, and ω is an empirical value of 0.95.

最后,根据获取到的待去雾图像的暗通道图、大气亮度和透射率图,对图像样本进行去雾处理,得到去雾处理后的图像,记为W(x)。作为一种可能的实现方式,计算公式为:W(x)=(I(x)-A)/T(x)+AFinally, according to the obtained dark channel map, atmospheric brightness and transmittance map of the image to be defogged, the image sample is dehazed, and the dehazed image is obtained, which is denoted as W(x). As a possible implementation, the calculation formula is: W(x)=(I(x)-A)/T(x)+A

本发明实施例的图像去雾方法中,对采集到的用于模型训练的图像样本,以及图像识别过程中的待识别图像,均进行去雾的预处理,通过对图像样本进行去雾处理,降低了由于雾气和食品包装袋导致的识别准确度低的问题。In the image defogging method of the embodiment of the present invention, the image samples collected for model training and the image to be recognized in the image recognition process are all subjected to preprocessing for defogging, and by performing defogging processing on the image samples, The problem of low recognition accuracy caused by fog and food packaging bags has been reduced.

基于上述实施例,为了进一步清楚的解释图像识别的方法,本实施例提供了另一种图像识别方法的可能的实现方式,更加清楚的解释了图像识别的整个过程,图5为本发明实施例所提供的另一种图像识别方法的流程示意图,如图5所示,该方法包括如下步骤:Based on the above embodiments, in order to further clearly explain the image recognition method, this embodiment provides another possible implementation of the image recognition method, which explains the entire process of image recognition more clearly. Figure 5 is an embodiment of the present invention A schematic flow chart of another image recognition method provided, as shown in Figure 5, the method includes the following steps:

步骤401,获取待识别的图像。Step 401, acquire an image to be recognized.

具体地,对于待识别图像的获取方式有很多种,一种可能的方式是,利用手机的摄像装置采集待识别对象的图像;另一种可能的方式是,从手机的存储单元中获取待识别对象的图像;又一种可能的方式是,从网上下载的待识别对象的图像。对于待识别图像的获取方式,本实施例中不做限定。Specifically, there are many ways to obtain the image to be recognized. One possible way is to use the camera device of the mobile phone to capture the image of the object to be recognized; another possible way is to obtain the image to be recognized from the storage unit of the mobile phone. An image of the object; another possible way is to download an image of the object to be recognized from the Internet. The manner of acquiring the image to be recognized is not limited in this embodiment.

步骤402,对待识别的图像进行去雾处理。Step 402, performing defogging processing on the image to be recognized.

具体地,可参照图4对应实施例中的步骤302,实现原理相同,此处不再赘述。Specifically, reference may be made to FIG. 4 corresponding to step 302 in the embodiment, and the implementation principles are the same, so details are not repeated here.

步骤403,利用第一路卷积神经网络进行特征提取。Step 403, using the first convolutional neural network to perform feature extraction.

步骤404,利用第二路卷积神经网络进行特征提取。Step 404, using the second convolutional neural network to perform feature extraction.

步骤405,输入外积层,进行外积计算,得到各像素点的特征。Step 405, input the outer product layer, and perform outer product calculation to obtain the feature of each pixel.

步骤406,采用池化层对各像素点的特征进行加和,得到图像的双线性特征向量,并由归一化层进行归一化处理。In step 406, the feature of each pixel is summed by using the pooling layer to obtain the bilinear feature vector of the image, which is then normalized by the normalization layer.

步骤407,采用全连接层将归一化的特征进行特征融合并输入到分类器,以确定待识别图像中的对象。In step 407, the fully connected layer is used to perform feature fusion on the normalized features and input them to the classifier, so as to determine the object in the image to be recognized.

本实施例中的步骤403~步骤407,可参照图3对应实施例中的步骤202~步骤206,实现原理相同,此处不再一一赘述。Steps 403 to 407 in this embodiment may refer to FIG. 3 corresponding to steps 202 to 206 in the embodiment, and the implementation principles are the same, so details will not be repeated here.

本发明实施例的图像识别方法中,获取待识别的图像,对待识别的图像进行去雾预处理,并采用训练后的第一路卷积神经网络和第二路卷积神经网络对待识别图像进行图像识别,以确定待识别的图像中所展示的对象,解决了相关的图像识别技术中,图像识别采用人工设计的特征进行提取,操作繁琐,设计周期长,用户体验差,识别准确低的问题。In the image recognition method of the embodiment of the present invention, the image to be recognized is obtained, the image to be recognized is subjected to dehazing preprocessing, and the trained first convolutional neural network and the second convolutional neural network are used to conduct Image recognition, to determine the object displayed in the image to be recognized, solves the problems of related image recognition technology, image recognition uses artificially designed features to extract, cumbersome operation, long design cycle, poor user experience, and low recognition accuracy .

上一实施例中,采用的是第一卷积神经网络模型进行图像识别,作为另一种可能的实现方式,还可以采用第二卷积神经网络模型进行图像识别,第二卷积神经网络是在第一卷积神经网络模型训练完成的基础上,将全连接层进行替换,使得第二卷积神经网络不仅可以识别出图像中对象的名称,还可以识别得到图像中对象的位置,从而提高图像识别的精细程度,在采用第二卷积神经网络模型进行识别之前需要先对第二卷积神经网络模型进行训练,基于上述实施例,本发明还提出了一种对第二卷积神经网络模型训练的可能的实现方式,图6为本发明实施例所提供的第二卷积神经网络模型训练方法的流程示意图,如图6所示,对第二卷积神经网络模型进行训练的步骤包括:In the previous embodiment, the first convolutional neural network model was used for image recognition. As another possible implementation, the second convolutional neural network model can also be used for image recognition. The second convolutional neural network is On the basis of the completion of the training of the first convolutional neural network model, the fully connected layer is replaced, so that the second convolutional neural network can not only recognize the name of the object in the image, but also recognize the position of the object in the image, thereby improving For the fineness of image recognition, it is necessary to train the second convolutional neural network model before using the second convolutional neural network model for recognition. Based on the above-mentioned embodiments, the present invention also proposes a A possible implementation of model training. FIG. 6 is a schematic flowchart of a second convolutional neural network model training method provided by an embodiment of the present invention. As shown in FIG. 6 , the steps for training the second convolutional neural network model include :

步骤501,采集图像样本。Step 501, collecting image samples.

可参照图3对应实施例中的步骤201,实现原理相同,此处不再赘述。Reference may be made to FIG. 3 corresponding to step 201 in the embodiment, and the implementation principle is the same, so details are not repeated here.

需要说明的是,在对第二卷积神经网络模型进行训练之前,对采集的图像样本中的对象进行标注时,不仅要标注对象的名称作为对象的标识,还要标注对象在图像中的位置,共同作为对象识别的标签。It should be noted that, before training the second convolutional neural network model, when labeling the objects in the collected image samples, not only the name of the object should be marked as the identification of the object, but also the position of the object in the image should be marked , collectively as labels for object recognition.

步骤502,对采集到的图像样本进行去雾处理。Step 502, performing defogging processing on the collected image samples.

可参照图4对应的实施例中的步骤302,实现原理相同,此处不再赘述。Reference may be made to step 302 in the embodiment corresponding to FIG. 4 , the implementation principle is the same, and details are not repeated here.

步骤503,利用第一路卷积神经网络进行特征提取。Step 503, using the first convolutional neural network to perform feature extraction.

步骤504,利用第二路卷积神经网络进行特征提取。Step 504, using the second convolutional neural network to perform feature extraction.

步骤505,将特征值输入外积层,进行外积计算,得到各像素点的特征。Step 505, input the feature value into the outer product layer, and perform outer product calculation to obtain the feature of each pixel.

步骤506,采用池化层对各像素点的特征进行加和,得到图像的双线性特征向量,并由归一化层进行归一化处理。Step 506, using the pooling layer to sum the features of each pixel to obtain the bilinear feature vector of the image, and performing normalization processing by the normalization layer.

本实施例中的步骤503~步骤506,可参照图3对应实施例中的步骤202~步骤205,可使用上一实施例中第一卷积神经网络模型训练完成后,步骤202~步骤205确定的模型的参数,从而提高第二卷积神经网络模型的训练速度。Steps 503 to 506 in this embodiment can refer to steps 202 to 205 in the corresponding embodiment in FIG. 3 , and can be determined by using the first convolutional neural network model in the previous embodiment after training is completed, and steps 202 to 205 are determined The parameters of the model, thereby improving the training speed of the second convolutional neural network model.

步骤507,采用卷积层将归一化的多种特征进行特征融合,得到特征图。Step 507, using the convolutional layer to perform feature fusion on the normalized multiple features to obtain a feature map.

可选地,卷积层可采用3*3的滤波器,步长为1,对归一化的多种特征对应的特征向量进行特征融合,得到对应的卷积特征图。Optionally, the convolutional layer may use a 3*3 filter with a step size of 1 to perform feature fusion on the feature vectors corresponding to the normalized multiple features to obtain the corresponding convolutional feature map.

步骤508,利用反卷积层根据卷积特征图进行上采样,上采样后的特征图中各像素点对应输入图像中的各像素点。Step 508, using the deconvolution layer to perform upsampling according to the convolutional feature map, and each pixel in the upsampled feature map corresponds to each pixel in the input image.

具体地,反卷积层操作相当于是对得到的卷积特征图进行插值,将输入特征图插值到一个更大的特征图然后进行卷积,使的卷积后其恢复到和输入图片大小相同的特征图,且上采样后的特征图中各像素点对应输入图像中的各像素点,通过上采样获取得到的特征图,不仅可以识别对象的种类,还可以识别对象的位置,提高了对象识别的精细程度。Specifically, the deconvolution layer operation is equivalent to interpolating the obtained convolution feature map, interpolating the input feature map to a larger feature map and then performing convolution, so that after convolution, it is restored to the same size as the input image The feature map, and each pixel in the upsampled feature map corresponds to each pixel in the input image. The feature map obtained by upsampling can not only identify the type of object, but also identify the position of the object, which improves the accuracy of the object. The fineness of recognition.

例如,输入图片尺寸是78*24的图片,78和24分别对应特征图的高和宽,经过卷积网络之后得到的输出是39*12的特征图,将这个输出特征图上采样到原始输入图像大小,即78*24,选择的卷积核的大小是4*4,步长为[1,2,2,1]。具体地,首先将39*12的特征图插值得到高*宽(H*W)的大小,使的这个H*W的特征图在经过4*4,步长为2的卷积核之后能够得到一个78*24的特征图,根据卷积公式推导出差值得到的特征图高度应为4+2*(78-1)和宽度为4+2*(24-1)的特征图,其中的4表示卷积核的宽和高,2是步长。然后在插值得到的这个特征图上进行4*4的卷积就能够得到78*24的特征图,至此上采样完成。For example, if the input image size is 78*24, 78 and 24 correspond to the height and width of the feature map respectively, and the output obtained after the convolutional network is a 39*12 feature map, and the output feature map is upsampled to the original input The image size is 78*24, the size of the selected convolution kernel is 4*4, and the step size is [1,2,2,1]. Specifically, first interpolate the feature map of 39*12 to obtain the size of height*width (H*W), so that the feature map of H*W can be obtained after a convolution kernel of 4*4 with a step size of 2 A 78*24 feature map, according to the convolution formula to derive the difference, the feature map height should be 4+2*(78-1) and the feature map width is 4+2*(24-1), of which 4 Indicates the width and height of the convolution kernel, and 2 is the step size. Then, a 4*4 convolution is performed on the interpolated feature map to obtain a 78*24 feature map, and the upsampling is completed.

步骤509,根据第一路卷积神经网络提取的特征和/或第二路卷积神经网络提取的特征,对上采样后提取的特征图继续进行上采样。Step 509 , according to the features extracted by the first convolutional neural network and/or the features extracted by the second convolutional neural network, continue upsampling the feature map extracted after upsampling.

可选地,将步骤503得到的第一路卷积神经网络提取到的特征,和/或步骤504中得到的第二路卷积神经网络提取得到的特征,对步骤508中上采样得到的特征图,以较小的卷积核尺寸和步长,进行进一步上采样,从而使得上采样后得到的特征图中,各像素点的信息更加准确,进一步提高对象的标识和位置识别的准确度。Optionally, the features extracted by the first convolutional neural network obtained in step 503, and/or the features extracted by the second convolutional neural network obtained in step 504, are compared to the features obtained by upsampling in step 508 The image is further upsampled with a smaller convolution kernel size and step size, so that the information of each pixel in the feature map obtained after upsampling is more accurate, and the accuracy of object identification and position recognition is further improved.

步骤510,根据上采样后的特征图中各像素点的特征信息进行分类,确定对象标识和对象位置。Step 510, classify according to the feature information of each pixel in the up-sampled feature map, and determine the object identifier and object position.

具体地,根据上采样后的特征图中各像素点的特征信息进行分类,确定各像素点对应的对象标识,识别对应同一对象标识的像素点所在区域,根据区域在特征图中的位置,确定对象在输入图像中的位置。Specifically, classify according to the feature information of each pixel in the upsampled feature map, determine the object identifier corresponding to each pixel, identify the area where the pixel corresponding to the same object identifier is located, and determine according to the position of the region in the feature map The position of the object in the input image.

步骤511,根据各训练样本的对象识别结果以及训练样本的标识和位置,确定标识损失函数的取值和位置损失函数的取值。Step 511, according to the object recognition result of each training sample and the label and location of the training sample, determine the value of the label loss function and the value of the position loss function.

具体地,标识即训练样本的对象的名称,定义为Yi’,位置定义为Yi”,各训练样本中的对象识别结果中的名称信息定义为位置信息定义为根据各训练样本的对象识别结果,以及训练样本的标识和位置信息,计算标识损失函数的取值和位置损失函数的取值,作为一种可能的实现方式,采用L2级范数,分别计算Yi’和以及Yi”和之间的差异,再将差异值取平方作为标识损失函数取值,以及位置损失函数取值。Specifically, the identifier is the name of the object of the training sample, which is defined as Yi ', and the position is defined as Yi ", and the name information in the object recognition results in each training sample is defined as Location information is defined as According to the object recognition results of each training sample, as well as the identification and location information of the training samples, calculate the value of the identification loss function and the value of the location loss function. As a possible implementation, use the L2 norm to calculate Y respectively.i ' and and Yi ” and The difference between them, and then take the square of the difference value as the value of the identification loss function and the value of the position loss function.

步骤512,判断标识损失函数的取值和位置损失函数的取值是否均小于阈值,若是,执行步骤514,若否,则执行步骤513。Step 512, judge whether the value of the identity loss function and the value of the position loss function are both smaller than the threshold, if yes, execute step 514, if not, execute step 513.

具体地,判断标识损失函数的取值小于阈值,且位置损失函数的取值也小于阈值时,模型训练完成,否则,调整模型参数,重新进行训练。Specifically, when it is judged that the value of the identification loss function is less than the threshold, and the value of the position loss function is also less than the threshold, the model training is completed; otherwise, the model parameters are adjusted and the training is performed again.

步骤513,调整第二卷积神经网络模型的参数。Step 513, adjusting parameters of the second convolutional neural network model.

具体地,步骤513可参照图3对应的实施例中的步骤209,实现原理相同,此处不再赘述Specifically, step 513 can refer to step 209 in the embodiment corresponding to FIG.

步骤514,确定第二卷积神经网络模型训练完成。In step 514, it is determined that the training of the second convolutional neural network model is completed.

具体地,步骤514可参照图3对应的实施例中的步骤210,实现原理相同,此处不再赘述。Specifically, for step 514, reference may be made to step 210 in the embodiment corresponding to FIG. 3 , and the implementation principle is the same, so details are not repeated here.

步骤515,从图像样本中获取测试样本,并通过测试样本对训练后的第二卷积神经网络模型准确度进行验证,确定第二卷积神经网络模型的准确度高于阈值。Step 515, acquire test samples from the image samples, and verify the accuracy of the trained second convolutional neural network model through the test samples, and determine that the accuracy of the second convolutional neural network model is higher than a threshold.

具体地,步骤515可参照图3对应的实施例中的步骤211,实现原理相同,此处不再赘述。Specifically, for step 515, reference may be made to step 211 in the embodiment corresponding to FIG. 3 , and the realization principle is the same, so details are not repeated here.

本发明实施例的第二卷积神经网络模型训练方法中,将第一卷积神经网络模型中的全连接层替换成卷积层和反卷积层,从而得到第二卷积神经网络模型,采集图像样本,将图像样本预先进行去雾处理,并从去雾处理后的图像样本中选取训练样本,利用去雾处理后的训练样本对第二卷积神经网络模型进行训练。通过对图像样本进行去雾处理,降低了由于雾气和食品包装袋导致的识别准确度低的问题,利用将训练好的第一卷积神经网络模型进行全连接层的替换得到第二卷积神经网络模型,对第二卷积神经网络模型进行训练,第二卷积神经网络模型不仅可以识别得到对象的名称还可以识别得到对象的位置,提高了图像识别的准确度和精细度,解决了传统图像识别技术中采用人工设计的特征进行提取,对于大量不同的对象识别鲁棒性较差,图像识别准确度低的问题。In the second convolutional neural network model training method of the embodiment of the present invention, the fully connected layer in the first convolutional neural network model is replaced with a convolutional layer and a deconvolution layer, thereby obtaining a second convolutional neural network model, Collect image samples, pre-dehaze the image samples, select training samples from the dehazed image samples, and use the dehazed training samples to train the second convolutional neural network model. By dehazing the image samples, the problem of low recognition accuracy caused by fog and food packaging bags is reduced, and the second convolutional neural network model is obtained by replacing the fully connected layer with the trained first convolutional neural network model. The network model trains the second convolutional neural network model. The second convolutional neural network model can not only recognize the name of the object but also the location of the object, which improves the accuracy and fineness of image recognition and solves the problem of traditional In the image recognition technology, artificially designed features are used for extraction, and the robustness of recognition for a large number of different objects is poor, and the accuracy of image recognition is low.

基于上述实施例,在第二卷积神经网络模型训练完成以后,可用第二卷积神经网络模型对图像进行识别,为此本发明实施例还提出了又一种可能的图像识别的方法,图7为本发明实施例所提供的又一种图像识别方法的流程示意图,如图7所示,利用第二卷积神经网络模型进行图像识别的方法包括如下步骤:Based on the above-mentioned embodiment, after the training of the second convolutional neural network model is completed, the second convolutional neural network model can be used to recognize the image. For this reason, the embodiment of the present invention also proposes another possible image recognition method, as shown in Fig. 7 is a schematic flowchart of another image recognition method provided by the embodiment of the present invention. As shown in FIG. 7, the method for image recognition using the second convolutional neural network model includes the following steps:

步骤601,获取待识别的图像。Step 601, acquire an image to be recognized.

可参照图5对应实施例中的步骤401,原理相同,此处不再赘述。Refer to FIG. 5 corresponding to step 401 in the embodiment, the principle is the same, and will not be repeated here.

步骤602,对待识别的图像进行去雾处理。Step 602, performing defogging processing on the image to be recognized.

步骤603,利用第一路卷积神经网络进行特征提取。Step 603, using the first convolutional neural network to perform feature extraction.

步骤604,利用第二路卷积神经网络进行特征提取。Step 604, using the second convolutional neural network to perform feature extraction.

步骤605,输入外积层,进行外积计算,得到各像素点的特征。Step 605, input the outer product layer, and perform outer product calculation to obtain the feature of each pixel.

步骤606,采用池化层对各像素点的特征进行加和,得到图像的双线性特征向量,并由归一化层进行归一化处理。Step 606, using the pooling layer to sum the features of each pixel point to obtain the bilinear feature vector of the image, and performing normalization processing by the normalization layer.

步骤607,采用卷积层将归一化的多种特征进行特征融合,得到特征图。Step 607, using the convolutional layer to perform feature fusion on the normalized multiple features to obtain a feature map.

步骤608,利用反卷积层根据特征图进行上采样,上采样后的特征图中各像素点对应输入图像中各像素点。Step 608, use the deconvolution layer to perform up-sampling according to the feature map, and each pixel in the up-sampled feature map corresponds to each pixel in the input image.

步骤609,根据第一路卷积神经网络提取的特征和/或第二路卷积神经网络提取的特征,对上采样后提取的特征图继续进行上采样。Step 609 , according to the features extracted by the first convolutional neural network and/or the features extracted by the second convolutional neural network, continue to perform upsampling on the extracted feature map after upsampling.

步骤610,根据上采样后的特征图中各像素点的特征信息进行分类,确定对象标识和对象位置。Step 610, classify according to the feature information of each pixel in the up-sampled feature map, and determine the object identifier and object position.

本实施例中的步骤602~步骤610可参照上一实施例中的步骤502~510,实现原理相同,此处不再赘述。Steps 602 to 610 in this embodiment may refer to steps 502 to 510 in the previous embodiment, and the implementation principles are the same, so details are not repeated here.

本发明实施例的图像识别方法中,对待识别的图像预先进行去雾处理,利用训练好的第二卷积神经网络模型进行图像识别。通过对图像样本进行去雾处理,降低了由于雾气和食品包装袋导致的识别准确度低的问题,利用将训练好的第二卷积神经网络模型对待识别图像进行识别,不仅可以识别得到对象的名称还可以识别得到对象的位置,提高了图像识别的准确度和精细度,解决了传统图像识别技术中采用人工设计的特征进行提取,对于大量不同的对象识别鲁棒性较差,图像识别准确度低的问题。In the image recognition method of the embodiment of the present invention, the image to be recognized is pre-dehazed, and the trained second convolutional neural network model is used for image recognition. By dehazing the image samples, the problem of low recognition accuracy caused by fog and food packaging bags is reduced. Using the trained second convolutional neural network model to recognize the image to be recognized, not only can the recognition of the object be obtained The name can also identify the position of the object, which improves the accuracy and fineness of image recognition, and solves the problem of extracting artificially designed features in traditional image recognition technology. The robustness of recognition for a large number of different objects is poor, and image recognition is accurate. low degree problem.

为了实现上述实施例,本发明还提出一种图像识别装置。In order to realize the above embodiments, the present invention also proposes an image recognition device.

图8为本发明实施例提供的一种图像识别装置的结构示意图。FIG. 8 is a schematic structural diagram of an image recognition device provided by an embodiment of the present invention.

如图8所示,该装置包括:获取模块71和识别模块72。As shown in FIG. 8 , the device includes: an acquisition module 71 and an identification module 72 .

获取模块71,用于获取待识别的图像。An acquisition module 71, configured to acquire an image to be recognized.

识别模块72,用于采用训练后的第一卷积神经网络模型,对待识别图像进行图像识别,以确定待识别的图像中所展示的对象,其中,第一卷积神经网络模型包括用于提取图像全局特征的第一路卷积神经网络和用于提取图像局部特征的第二路卷积神经网络。The recognition module 72 is configured to use the trained first convolutional neural network model to perform image recognition on the image to be recognized, so as to determine the object displayed in the image to be recognized, wherein the first convolutional neural network model includes a method for extracting The first-pass convolutional neural network for image global features and the second-pass convolutional neural network for extracting image local features.

需要说明的是,前述对方法实施例的解释说明也适用于该实施例的装置,此处不再赘述。It should be noted that the foregoing explanations of the method embodiment are also applicable to the device of this embodiment, and details are not repeated here.

本发明实施例的图像识别装置中,获取模块,用于获取待识别的图像,识别模块,用于采用训练后的第一卷积神经网络模型,对待识别图像进行图像识别,以确定待识别的图像中所展示的对象,其中,第一卷积神经网络模型包括用于提取图像全局特征的第一路卷积神经网络和用于提取图像局部特征的第二路卷积神经网络。通过训练好的第一卷积神经网络模型对待识别图像进行识别,操作简单,对于不同对象识别的鲁棒性好,同时第一卷积神经网络模型中包含的可用于提取图像全局特征的第一路卷积神经网络和用于提取图像局部特征的第二路卷积神经网络,提高了图像识别的准确度和精细度。In the image recognition device of the embodiment of the present invention, the acquisition module is used to obtain the image to be recognized, and the recognition module is used to perform image recognition on the image to be recognized by using the trained first convolutional neural network model to determine the image to be recognized The object shown in the image, wherein the first convolutional neural network model includes a first-pass convolutional neural network for extracting global features of the image and a second-pass convolutional neural network for extracting local features of the image. The image to be recognized is recognized by the trained first convolutional neural network model, which is easy to operate and has good robustness for different object recognition. The first convolutional neural network and the second convolutional neural network for extracting local features of the image improve the accuracy and fineness of image recognition.

基于上述实施例,本发明实施例还提供了一种图像识别装置的可能的实现方式,图9为本发明实施例所提供的另一种图像识别装置的结构示意图,如图9所示,在上一实施例的基础上,该装置还包括:采集模块73、训练模块74、去雾模块75和验证模块76。Based on the above-mentioned embodiments, this embodiment of the present invention also provides a possible implementation of an image recognition device. FIG. 9 is a schematic structural diagram of another image recognition device provided by an embodiment of the present invention. As shown in FIG. 9 , in On the basis of the previous embodiment, the device further includes: an acquisition module 73 , a training module 74 , a defogging module 75 and a verification module 76 .

采集模块73,用于采集图像样本,其中,图像样本从预先建立的图像库得到,并根据图像样本中的对象进行标注。The collection module 73 is configured to collect image samples, wherein the image samples are obtained from a pre-established image library, and are marked according to objects in the image samples.

训练模块74,用于从图像样本中获取训练样本,并将训练样本输入到第一卷积神经网络模型中,采用第一卷积神经网络模型进行图像识别,以确定训练样本所展示的对象,其中,第一卷积神经网络模型包括用于提取图像全局特征的第一路卷积神经网络和用于提取图像局部特征的第二路卷积神经网络,根据各训练样本所展示的对象以及训练样本的标注,确定损失函数的取值,根据损失函数的取值,对第一卷积神经网络进行参数调整,以根据参数调整后的第一卷积神经网络重新确定训练样本所展示的对象,并重新确定损失函数的取值,直至损失函数的取值小于阈值时,确定第一卷积神经网络模型训练完成。The training module 74 is used to obtain training samples from the image samples, and input the training samples into the first convolutional neural network model, and use the first convolutional neural network model to perform image recognition to determine the objects displayed by the training samples, Among them, the first convolutional neural network model includes the first convolutional neural network for extracting the global features of the image and the second convolutional neural network for extracting the local features of the image. According to the objects displayed by each training sample and the training Marking the sample, determining the value of the loss function, and adjusting the parameters of the first convolutional neural network according to the value of the loss function, so as to re-determine the object displayed by the training sample according to the parameter-adjusted first convolutional neural network, And re-determining the value of the loss function until the value of the loss function is less than the threshold, it is determined that the training of the first convolutional neural network model is completed.

去雾模块75,用于对图像样本采用最小值滤波算法进行滤波,得到暗通道图,从暗通道图中确定亮度高于阈值的目标像素,根据暗通道图中的目标像素,确定在图像样本中的对应像素,将对应像素的最大亮度作为大气亮度,根据大气亮度和预设的去雾因子,对图像样本进行计算,得到透射率图,根据暗通道图、大气亮度和透射率图,对图像样本进行去雾处理。The defogging module 75 is used to filter the image samples using the minimum filtering algorithm to obtain a dark channel map, determine the target pixels whose brightness is higher than the threshold from the dark channel map, and determine the target pixels in the image sample according to the target pixels in the dark channel map. For the corresponding pixel in , the maximum brightness of the corresponding pixel is taken as the atmospheric brightness, and the image sample is calculated according to the atmospheric brightness and the preset dehazing factor to obtain the transmittance map. According to the dark channel map, atmospheric brightness and transmittance map, the The image samples are dehazed.

验证模块76,用于从图像样本中获取测试样本,并将测试样本输入到训练后的第一卷积神经网络模型中,识别得到测试样本所展示的对象,根据识别得到的对象和测试样本的标注,计算第一卷积神经网络模型的准确度,确定第一卷积神经网络模型的准确度高于阈值。The verification module 76 is used to obtain a test sample from the image sample, and input the test sample into the first convolutional neural network model after training, identify the object displayed by the test sample, and obtain the object according to the identified object and the test sample. Annotate, calculate the accuracy of the first convolutional neural network model, and determine that the accuracy of the first convolutional neural network model is higher than a threshold.

作为一种可能的实现方式,验证模块76在从图像样本中获取测试样本时,可根据测试样本与训练样本的数量比例关系,从图像样本中获取测试样本。As a possible implementation manner, when the verification module 76 obtains test samples from image samples, it may obtain test samples from image samples according to the proportional relationship between the number of test samples and training samples.

需要说明的是,前述对方法实施例的解释说明也适用于该实施例的装置,此处不再赘述。It should be noted that the foregoing explanations of the method embodiment are also applicable to the device of this embodiment, and details are not repeated here.

本发明实施例的图像识别装置中,采集模块用于采集图像样本,训练模块用于从图像样本中获取训练样本,并将训练样本输入到第一卷积神经网络模型中进行图像识别,以确定训练样本所展示的对象,根据各训练样本所展示的对象以及训练样本的标注,确定损失函数的取值,根据损失函数的取值,对第一卷积神经网络进行参数调整,重新确定训练样本所展示的对象,并重新确定损失函数的取值,直至损失函数的取值小于阈值时,确定第一卷积神经网络模型训练完成,识别模块采用训练后的第一卷积神经网络模型进行图像识别,得到待识别图像中所展示的对象。通过采集的图像样本对第一卷积神经网络模型进行训练,并通过训练好的第一卷积神经网络模型对待识别图像进行识别,提高了图像识别的准确度,同时通过对采集到的图像进行去雾预处理,降低了对象所处的含有雾气或者被包装袋包裹导致的不易识别的问题,进一步提高了图像识别的准确度。In the image recognition device of the embodiment of the present invention, the collection module is used to collect image samples, and the training module is used to obtain training samples from the image samples, and input the training samples into the first convolutional neural network model for image recognition to determine The objects displayed by the training samples, according to the objects displayed by each training sample and the labels of the training samples, determine the value of the loss function, adjust the parameters of the first convolutional neural network according to the value of the loss function, and re-determine the training samples The displayed object, and re-determine the value of the loss function, until the value of the loss function is less than the threshold, it is determined that the training of the first convolutional neural network model is completed, and the recognition module uses the trained first convolutional neural network model for image processing. Recognition, to obtain the object shown in the image to be recognized. The first convolutional neural network model is trained through the collected image samples, and the image to be recognized is recognized through the trained first convolutional neural network model, which improves the accuracy of image recognition. Defog preprocessing reduces the problem of difficult identification caused by objects containing fog or being wrapped in packaging bags, and further improves the accuracy of image recognition.

基于上述实施例,本发明还提出了识别模块72的一种可能的实现方式,图10为本发明实施例所提供的识别模块72的结构示意图之一,如图10所示,识别模块72,可以包括:第一提取单元721、第一计算单元722和第一确定单元723。Based on the above embodiments, the present invention also proposes a possible implementation of the identification module 72. FIG. 10 is one of the structural schematic diagrams of the identification module 72 provided by the embodiment of the present invention. As shown in FIG. 10, the identification module 72, It may include: a first extraction unit 721 , a first calculation unit 722 and a first determination unit 723 .

第一提取单元721,用于采用第一路卷积神经网络和第二路卷积神经网络,对待识别的图像进行特征提取。The first extraction unit 721 is configured to extract features of the image to be recognized by using the first convolutional neural network and the second convolutional neural network.

第一计算单元722,用于将第一路卷积神经网络和第二路卷积神经网络提取的特征,输入外积层,以使外积层根据图像局部特征和图像全局特征进行外积计算,得到各像素点的特征。采用池化层对各像素点的特征进行加和,得到图像的双线性特征向量,并由归一化层进行归一化处理。The first calculation unit 722 is configured to input the features extracted by the first convolutional neural network and the second convolutional neural network into the outer product layer, so that the outer product layer performs outer product calculation according to the local features of the image and the global features of the image , get the features of each pixel. The pooling layer is used to sum the features of each pixel to obtain the bilinear feature vector of the image, which is normalized by the normalization layer.

第一确定单元723,用于采用全连接层将归一化的特征进行特征融合并输入到分类器,识别目标对象。The first determining unit 723 is configured to use a fully connected layer to perform feature fusion on the normalized features and input them to the classifier to identify the target object.

需要说明的是,前述对方法实施例的解释说明也适用于该实施例的装置,此处不再赘述。It should be noted that the foregoing explanations of the method embodiment are also applicable to the device of this embodiment, and details are not repeated here.

本发明实施例的图像识别装置中,通过训练好的包含双路神经网络的第一卷积神经网络模型对待识别图像进行识别,提高了图像识别的准确度。In the image recognition device of the embodiment of the present invention, the image to be recognized is recognized by the trained first convolutional neural network model including a two-way neural network, thereby improving the accuracy of image recognition.

基于上述实施例,本发明还提出了识别模块72的另一种可能的实现方式,图11为本发明实施例所提供的识别模块72的结构示意图之二,如图11所示,识别模块72,还可以包括:第二提取单元724、第二计算单元725、融合单元726、上采样单元727和第二确定单元728。Based on the above-mentioned embodiments, the present invention also proposes another possible implementation of the identification module 72. FIG. 11 is the second structural diagram of the identification module 72 provided by the embodiment of the present invention. As shown in FIG. 11, the identification module 72 , may further include: a second extraction unit 724 , a second calculation unit 725 , a fusion unit 726 , an upsampling unit 727 and a second determination unit 728 .

第二提取单元724,用于采用第一路卷积神经网络和第二路卷积神经网络,对输入图像进行特征提取。The second extraction unit 724 is configured to extract features of the input image by using the first convolutional neural network and the second convolutional neural network.

第二计算单元725,用于将第一路卷积神经网络和第二路卷积神经网络提取的特征,输入外积层,以使外积层根据所述图像局部特征和图像全局特征进行外积计算,得到各像素点的特征,采用池化层对各像素点的特征进行加和,得到图像的双线性特征向量,并采用归一化层进行归一化处理。The second calculation unit 725 is configured to input the features extracted by the first convolutional neural network and the second convolutional neural network into the outer product layer, so that the outer product layer performs outer product according to the image local features and the image global features. Calculate the product to obtain the features of each pixel, and use the pooling layer to sum the features of each pixel to obtain the bilinear feature vector of the image, and use the normalization layer for normalization.

融合单元726,用于采用卷积层将归一化的多种特征进行特征融合,得到特征图。The fusion unit 726 is configured to perform feature fusion of various normalized features by using a convolutional layer to obtain a feature map.

上采样单元727,用于根据所述特征图采用反卷积层进行上采样,上采样后的特征图中各像素点对应输入图像中的各像素点,对根据上采样后的特征图中各像素点的特征信息进行分类,确定各像素点对应的对象标识。The up-sampling unit 727 is configured to perform up-sampling by using a deconvolution layer according to the feature map, each pixel in the up-sampled feature map corresponds to each pixel in the input image, and each pixel in the up-sampled feature map corresponds to each The feature information of the pixel points is classified to determine the object identification corresponding to each pixel point.

第二确定单元728,用于识别对应同一对象标识的像素点所在区域,根据所述区域在特征图中的位置,确定对象在输入图像中的位置。The second determination unit 728 is configured to identify the region where the pixel points corresponding to the same object identifier are located, and determine the position of the object in the input image according to the position of the region in the feature map.

作为一种可能的实现方式,上采样单元727,还用于根据第一路卷积神经网络提取的特征和/或第二路卷积神经网络提取的特征,对上采样后的特征图继续进行上采样。As a possible implementation, the upsampling unit 727 is also configured to continue to perform the upsampling feature map according to the features extracted by the first convolutional neural network and/or the features extracted by the second convolutional neural network. upsampling.

需要说明的是,前述对方法实施例的解释说明也适用于该实施例的装置,此处不再赘述。It should be noted that the foregoing explanations of the method embodiment are also applicable to the device of this embodiment, and details are not repeated here.

本发明实施例的图像识别装置中,通过将训练完成后的第一卷积神经网络模型中的全连接层,替换为卷积层,并在卷积层后增加反卷积层,得到第二卷积神经网络。而通过采用包含双路神经网络模型的第二卷积神经网络模型,对图像进行识别,不仅可以识别出对象的名称还可以识别出对象的位置,提高了图像识别的精细度。In the image recognition device of the embodiment of the present invention, by replacing the fully connected layer in the first convolutional neural network model after training with a convolutional layer, and adding a deconvolutional layer after the convolutional layer, the second convolutional neural network model is obtained. Convolutional neural network. By adopting the second convolutional neural network model including the two-way neural network model to recognize the image, not only the name of the object but also the position of the object can be recognized, which improves the fineness of image recognition.

为了实现上述实施例,本发明还提出一种计算机设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现如前述方法实施例所述的图像识别方法。In order to achieve the above embodiments, the present invention also proposes a computer device, including: a memory, a processor, and a computer program stored on the memory and operable on the processor. When the processor executes the program, the aforementioned The image recognition method described in the method embodiment.

为了实现上述实施例,本发明还提出一种计算机设备,该计算机设备包括移动终端。In order to realize the above embodiments, the present invention also proposes a computer device, which includes a mobile terminal.

为了实现上述实施例,本发明还提出一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时,实现如前述方法实施例所述的图像识别方法。In order to realize the above-mentioned embodiments, the present invention also proposes a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the image recognition method as described in the foregoing method embodiments is implemented.

在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or characteristic is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the described specific features, structures, materials or characteristics may be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine different embodiments or examples and features of different embodiments or examples described in this specification without conflicting with each other.

此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本发明的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of these features. In the description of the present invention, "plurality" means at least two, such as two, three, etc., unless specifically defined otherwise.

流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现定制逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。Any process or method descriptions in flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing custom logical functions or steps of a process , and the scope of preferred embodiments of the invention includes alternative implementations in which functions may be performed out of the order shown or discussed, including substantially concurrently or in reverse order depending on the functions involved, which shall It is understood by those skilled in the art to which the embodiments of the present invention pertain.

在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。The logic and/or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium, For use with instruction execution systems, devices, or devices (such as computer-based systems, systems including processors, or other systems that can fetch instructions from instruction execution systems, devices, or devices and execute instructions), or in conjunction with these instruction execution systems, devices or equipment used. For the purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use in or in conjunction with an instruction execution system, device or device. More specific examples (non-exhaustive list) of computer-readable media include the following: electrical connection with one or more wires (electronic device), portable computer disk case (magnetic device), random access memory (RAM), Read Only Memory (ROM), Erasable and Editable Read Only Memory (EPROM or Flash Memory), Fiber Optic Devices, and Portable Compact Disc Read Only Memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program can be printed, since the program can be read, for example, by optically scanning the paper or other medium, followed by editing, interpretation or other suitable processing if necessary. The program is processed electronically and stored in computer memory.

应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。如,如果用硬件来实现和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that various parts of the present invention can be realized by hardware, software, firmware or their combination. In the embodiments described above, various steps or methods may be implemented by software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented by any one or a combination of the following techniques known in the art: a discrete Logic circuits, ASICs with suitable combinational logic gates, Programmable Gate Arrays (PGA), Field Programmable Gate Arrays (FPGA), etc.

本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。Those of ordinary skill in the art can understand that all or part of the steps carried by the methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. During execution, one or a combination of the steps of the method embodiments is included.

此外,在本发明各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, each unit may exist separately physically, or two or more units may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium.

上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention, those skilled in the art can make the above-mentioned The embodiments are subject to changes, modifications, substitutions and variations.

Claims (19)

Translated fromChinese
1.一种图像识别方法,其特征在于,所述方法包括以下步骤:1. an image recognition method, is characterized in that, described method comprises the following steps:获取待识别的图像;Obtain the image to be recognized;采用训练后的第一卷积神经网络模型,对所述待识别图像进行图像识别,以确定所述待识别的图像中所展示的对象;其中,所述第一卷积神经网络模型包括用于提取图像全局特征的第一路卷积神经网络和用于提取图像局部特征的第二路卷积神经网络。Using the trained first convolutional neural network model to perform image recognition on the image to be recognized to determine the object shown in the image to be recognized; wherein the first convolutional neural network model includes The first convolutional neural network for extracting the global features of the image and the second convolutional neural network for extracting the local features of the image.2.根据权利要求1所述的图像识别方法,其特征在于,所述采用训练后的第一卷积神经网络模型,对所述待识别图像进行图像识别之前,还包括:2. image recognition method according to claim 1, is characterized in that, described adopting the first convolutional neural network model after training, before carrying out image recognition to described image to be recognized, also comprises:采集图像样本;所述图像样本,从预先建立的图像库得到,并根据图像样本中的对象进行标注;collecting image samples; the image samples are obtained from a pre-established image library, and marked according to objects in the image samples;从所述图像样本中获取训练样本,并将所述训练样本输入到第一卷积神经网络模型中,采用所述第一卷积神经网络模型进行图像识别,以确定所述训练样本所展示的对象;Obtain a training sample from the image sample, and input the training sample into the first convolutional neural network model, and use the first convolutional neural network model to perform image recognition to determine the information displayed by the training sample. object;根据各训练样本所展示的对象以及训练样本的标注,确定损失函数的取值;Determine the value of the loss function according to the objects displayed by each training sample and the labels of the training samples;根据所述损失函数的取值,对所述第一卷积神经网络模型进行参数调整,以根据参数调整后的第一卷积神经网络模型重新确定训练样本所展示的对象,并重新确定所述损失函数的取值,直至所述损失函数的取值小于阈值时,确定所述第一卷积神经网络模型训练完成。According to the value of the loss function, adjust the parameters of the first convolutional neural network model, so as to re-determine the object displayed by the training sample according to the parameter-adjusted first convolutional neural network model, and re-determine the The value of the loss function, until the value of the loss function is less than a threshold, it is determined that the training of the first convolutional neural network model is completed.3.根据权利要求1所述的图像识别方法,其特征在于,所述采用训练后的第一卷积神经网络模型,对所述待识别图像进行图像识别,以确定所述待识别的图像中所展示的对象,包括:3. The image recognition method according to claim 1, wherein the first convolutional neural network model after the training is used to carry out image recognition on the image to be recognized, so as to determine the Objects shown include:采用所述第一路卷积神经网络和所述第二路卷积神经网络,分别对待识别的图像进行特征提取;Using the first convolutional neural network and the second convolutional neural network to extract features from the image to be recognized;将所述第一路卷积神经网络和所述第二路卷积神经网络提取的特征,输入到外积层,使所述外积层根据所述图像局部特征和所述图像全局特征进行外积计算,得到各像素点的特征;The features extracted by the first convolutional neural network and the second convolutional neural network are input to the outer product layer, so that the outer product layer performs outer product according to the local features of the image and the global features of the image. Calculate the product to get the feature of each pixel;采用池化层对各像素点的特征进行加和,得到图像的双线性特征向量,并由归一化层进行归一化处理;The pooling layer is used to sum the features of each pixel point to obtain the bilinear feature vector of the image, and the normalization layer is used for normalization processing;采用全连接层将归一化的特征进行特征融合并输入到分类器,识别目标对象。The fully connected layer is used to fuse the normalized features and input them to the classifier to identify the target object.4.根据权利要求3所述的图像识别方法,其特征在于,所述采用所述第一路卷积神经网络和所述第二路卷积神经网络,分别对待识别的图像进行特征提取,包括:4. The image recognition method according to claim 3, characterized in that, using the first convolutional neural network and the second convolutional neural network to perform feature extraction on images to be identified respectively, including :采用所述第一路卷积神经网络提取全局特征后,采用所述第二路卷积神经网络提取局部特征;After using the first convolutional neural network to extract global features, use the second convolutional neural network to extract local features;或者,采用所述第二路卷积神经网络提取局部特征后,采用所述第一路卷积神经网络提取全局特征;Or, after using the second convolutional neural network to extract local features, use the first convolutional neural network to extract global features;或者,采用所述第一路卷积神经网络提取全局特征的同时,并行采用所述第二路卷积神经网络提取局部特征;Or, while using the first convolutional neural network to extract global features, parallel use the second convolutional neural network to extract local features;或者,根据对象所属的类别,确定采用所述第一路卷积神经网络和所述第二路卷积神经网络,分别对待识别的图像进行特征提取的顺序。Or, according to the category to which the object belongs, determine the sequence of feature extraction of the image to be recognized by using the first convolutional neural network and the second convolutional neural network.5.根据权利要求2所述的图像识别方法,其特征在于,所述采集图像样本之后,还包括将所述图像样本作为待去雾图像,进行去雾处理;5. The image recognition method according to claim 2, characterized in that, after the image sample is collected, further comprising using the image sample as an image to be defogged, and performing defogging processing;所述获取待识别的图像之后,还包括将所述待识别的图像作为待去雾图像,进行去雾处理。After the acquiring the image to be recognized, further includes taking the image to be recognized as the image to be defogged and performing defogging processing.6.根据权利要求5所述的图像识别方法,其特征在于,所述进行去雾处理,包括:6. The image recognition method according to claim 5, wherein said performing defogging processing comprises:对所述待去雾图像采用最小值滤波算法进行滤波,得到暗通道图;Filtering the image to be defogged using a minimum filter algorithm to obtain a dark channel map;从所述暗通道图中确定亮度高于阈值的目标像素;Determining target pixels with brightness higher than a threshold from the dark channel map;根据所述暗通道图中的所述目标像素,确定与所述待去雾图像中的对应像素;According to the target pixel in the dark channel map, determine the corresponding pixel in the image to be defogged;将所述对应像素的最大亮度作为大气亮度;Using the maximum brightness of the corresponding pixel as the atmospheric brightness;根据所述大气亮度和预设的去雾因子,对所述图像样本进行计算,得到透射率图;calculating the image sample according to the atmospheric brightness and a preset defogging factor to obtain a transmittance map;根据暗通道图、大气亮度和透射率图,对所述待去雾图像进行去雾处理。Dehazing is performed on the image to be defogged according to the dark channel map, the atmospheric brightness and the transmittance map.7.根据权利要求2所述的图像识别方法,其特征在于,所述确定所述第一卷积神经网络模型训练完成之后,还包括:7. The image recognition method according to claim 2, wherein, after said determining that the first convolutional neural network model training is completed, it also includes:从所述图像样本中获取测试样本,并将所述测试样本输入到训练后的第一卷积神经网络模型中,识别得到所述测试样本所展示的对象;Obtain a test sample from the image sample, and input the test sample into the trained first convolutional neural network model, and identify the object displayed by the test sample;根据识别得到的对象和所述测试样本的标注,计算所述第一卷积神经网络模型的准确度;calculating the accuracy of the first convolutional neural network model according to the identified object and the label of the test sample;确定所述第一卷积神经网络模型的准确度高于阈值。It is determined that the accuracy of the first convolutional neural network model is higher than a threshold.8.根据权利要求7所述的图像识别方法,其特征在于,所述从所述图像样本中获取测试样本,包括:8. The image recognition method according to claim 7, wherein said obtaining a test sample from said image sample comprises:根据测试样本与训练样本的数量比例关系,从所述图像样本中获取测试样本。According to the proportional relationship between the number of test samples and the training samples, the test samples are obtained from the image samples.9.根据权利要求3所述的图像识别方法,其特征在于,确定所述第一卷积神经网络模型训练完成之后,还包括:9. The image recognition method according to claim 3, wherein, after determining that the first convolutional neural network model training is completed, it also includes:采用卷积层替换所述第一卷积神经网络模型的全连接层,并在所述卷积层之后增加反卷积层,以得到第二卷积神经网络模型;A convolutional layer is used to replace the fully connected layer of the first convolutional neural network model, and a deconvolution layer is added after the convolutional layer to obtain a second convolutional neural network model;根据经过标注的所述训练样本对所述第二卷积神经网络模型进行训练;training the second convolutional neural network model according to the labeled training samples;采用经过训练的第二卷积神经网络模型进行图像识别,得到对象标识和对象位置。Image recognition is performed using the trained second convolutional neural network model to obtain object identification and object location.10.根据权利要求9所述的图像识别方法,其特征在于,采用所述经过训练的第二卷积神经网络模型进行图像识别,包括:10. The image recognition method according to claim 9, characterized in that, using the trained second convolutional neural network model to carry out image recognition comprises:采用所述第一路卷积神经网络和所述第二路卷积神经网络,对输入图像进行特征提取;Using the first convolutional neural network and the second convolutional neural network to extract features from the input image;将所述第一路卷积神经网络和所述第二路卷积神经网络提取的特征,输入外积层,以使所述外积层根据所述图像局部特征和所述图像全局特征进行外积计算,得到各像素点的特征;The features extracted by the first convolutional neural network and the second convolutional neural network are input into the outer product layer, so that the outer product layer performs outer product according to the local features of the image and the global features of the image. Calculate the product to get the feature of each pixel;采用池化层对各像素点的特征进行加和,得到图像的双线性特征向量,并采用归一化层进行归一化处理;The pooling layer is used to sum the features of each pixel point to obtain the bilinear feature vector of the image, and the normalization layer is used for normalization processing;采用卷积层将归一化的多种特征进行特征融合,得到特征图;The convolutional layer is used to fuse the normalized multiple features to obtain a feature map;根据所述特征图采用反卷积层进行上采样,上采样后的特征图中各像素点对应输入图像中的各像素点;对根据上采样后的特征图中各像素点的特征信息进行分类,确定各像素点对应的对象标识;识别对应同一对象标识的像素点所在区域,根据所述区域在所述特征图中的位置,确定所述对象在输入图像中的位置。According to the feature map, the deconvolution layer is used to perform upsampling, and each pixel point in the feature map after the upsampling corresponds to each pixel point in the input image; according to the feature information of each pixel point in the feature map after the upsampling, classify , determine the object identifier corresponding to each pixel; identify the region where the pixel corresponding to the same object identifier is located, and determine the position of the object in the input image according to the position of the region in the feature map.11.根据权利要求10所述的图像识别方法,其特征在于,根据所述特征图采用反卷积层进行上采样之后,还包括:11. image recognition method according to claim 10, is characterized in that, after adopting deconvolution layer to carry out upsampling according to described feature map, also comprises:根据所述第一路卷积神经网络提取的特征和/或所述第二路卷积神经网络提取的特征,对所述上采样后的特征图继续进行上采样。Continue to perform upsampling on the upsampled feature map according to the features extracted by the first convolutional neural network and/or the features extracted by the second convolutional neural network.12.一种图像识别装置,其特征在于,包括:12. An image recognition device, characterized in that it comprises:获取模块,用于获取待识别的图像;An acquisition module, configured to acquire an image to be identified;识别模块,用于采用训练后的第一卷积神经网络模型,对所述待识别图像进行图像识别,以确定所述待识别的图像中所展示的对象;其中,所述第一卷积神经网络模型包括用于提取图像全局特征的第一路卷积神经网络和用于提取图像局部特征的第二路卷积神经网络。A recognition module, configured to use the trained first convolutional neural network model to perform image recognition on the image to be recognized, so as to determine the object displayed in the image to be recognized; wherein, the first convolutional neural network The network model includes a first convolutional neural network for extracting global image features and a second convolutional neural network for extracting local image features.13.根据权利要求12所述的图像识别装置,其特征在于,所述装置,还包括:13. The image recognition device according to claim 12, wherein the device further comprises:采集模块,用于采集图像样本;所述图像样本,从预先建立的图像库得到;The collection module is used to collect image samples; the image samples are obtained from a pre-established image library;训练模块,用于从所述图像样本中获取训练样本,并将所述训练样本输入到第一卷积神经网络模型中,采用所述第一卷积神经网络模型进行图像识别,以确定所述训练样本所展示的对象;其中,所述第一卷积神经网络模型包括用于提取图像全局特征的第一路卷积神经网络和用于提取图像局部特征的第二路卷积神经网络;根据各训练样本所展示的对象以及训练样本的标注,确定损失函数的取值;根据所述损失函数的取值,对所述第一卷积神经网络模型进行参数调整,以根据参数调整后的第一卷积神经网络模型重新生成对象识别结果,并重新确定所述损失函数的取值,直至所述损失函数的取值小于阈值时,确定所述第一卷积神经网络模型训练完成。A training module, configured to obtain training samples from the image samples, and input the training samples into the first convolutional neural network model, and use the first convolutional neural network model to perform image recognition to determine the The object shown in the training sample; wherein, the first convolutional neural network model includes a first convolutional neural network for extracting global features of an image and a second convolutional neural network for extracting local features of an image; according to The objects displayed by each training sample and the labels of the training samples are used to determine the value of the loss function; according to the value of the loss function, the parameters of the first convolutional neural network model are adjusted to adjust the parameters according to the first convolutional neural network model. A convolutional neural network model regenerates the object recognition result, and re-determines the value of the loss function, until the value of the loss function is less than a threshold, it is determined that the training of the first convolutional neural network model is completed.14.根据权利要求12所述的图像识别装置,其特征在于,所述装置还包括:14. The image recognition device according to claim 12, wherein the device further comprises:去雾模块,用于采集图像样本之后,将所述图像样本作为待去雾图像,进行去雾处理;以及获取待识别的图像之后,将所述待识别的图像作为待去雾图像,进行去雾处理。The defogging module is configured to use the image sample as the image to be defogged after collecting the image sample, and perform defogging processing; and after acquiring the image to be recognized, use the image to be recognized as the image to be defogged to perform defogging fog treatment.15.根据权利要求12所述的图像识别装置,其特征在于,所述识别模块,包括:15. The image recognition device according to claim 12, wherein the recognition module comprises:第一提取单元,用于采用所述第一路卷积神经网络和所述第二路卷积神经网络,分别对待识别的图像进行特征提取;The first extraction unit is used to use the first convolutional neural network and the second convolutional neural network to extract features of the image to be recognized respectively;第一计算单元,用于将所述第一路卷积神经网络和所述第二路卷积神经网络提取的特征,输入到外积层,使所述外积层根据所述图像局部特征和所述图像全局特征进行外积计算,得到各像素点的特征;采用池化层对各像素点的特征进行加和,得到图像的双线性特征向量,并由归一化层进行归一化处理;The first computing unit is configured to input the features extracted by the first convolutional neural network and the second convolutional neural network into the outer product layer, so that the outer product layer is based on the image local features and The outer product calculation is performed on the global features of the image to obtain the features of each pixel; the pooling layer is used to sum the features of each pixel to obtain the bilinear feature vector of the image, and normalized by the normalization layer deal with;第一确定单元,用于采用全连接层将归一化的特征进行特征融合并输入到分类器,识别目标对象。The first determining unit is configured to use the fully connected layer to perform feature fusion on the normalized features and input them to the classifier to identify the target object.16.根据权利要求12所述的图像识别装置,其特征在于,所述识别模块,包括:16. The image recognition device according to claim 12, wherein the recognition module comprises:第二提取单元,用于采用所述第一路卷积神经网络和所述第二路卷积神经网络,对输入图像进行特征提取;The second extraction unit is used to extract features from the input image by using the first convolutional neural network and the second convolutional neural network;第二计算单元,用于将所述第一路卷积神经网络和所述第二路卷积神经网络提取的特征,输入外积层,以使所述外积层根据所述图像局部特征和所述图像全局特征进行外积计算,得到各像素点的特征;采用池化层对各像素点的特征进行加和,得到图像的双线性特征向量,并采用归一化层进行归一化处理;The second calculation unit is used to input the features extracted by the first convolutional neural network and the second convolutional neural network into the outer product layer, so that the outer product layer can be based on the image local features and The outer product calculation is performed on the global features of the image to obtain the features of each pixel; the pooling layer is used to sum the features of each pixel to obtain the bilinear feature vector of the image, and the normalization layer is used for normalization deal with;融合单元,用于采用卷积层将归一化的多种特征进行特征融合,得到特征图;The fusion unit is used to perform feature fusion of multiple normalized features using a convolutional layer to obtain a feature map;上采样单元,用于根据所述特征图采用反卷积层进行上采样,上采样后的特征图中各像素点对应输入图像中的各像素点;对根据上采样后的特征图中各像素点的特征信息进行分类,确定各像素点对应的对象标识;An upsampling unit is used to perform upsampling using a deconvolution layer according to the feature map, and each pixel point in the feature map after the upsampling corresponds to each pixel point in the input image; for each pixel in the feature map according to the upsampling Classify the feature information of the points to determine the object identification corresponding to each pixel point;第二确定单元,用于识别对应同一对象标识的像素点所在区域,根据所述区域在所述特征图中的位置,确定所述对象在输入图像中的位置。The second determination unit is configured to identify the area where the pixel points corresponding to the same object identifier are located, and determine the position of the object in the input image according to the position of the area in the feature map.17.一种计算机设备,其特征在于,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,实现如权利要求1-11中任一所述的图像识别方法。17. A computer device, characterized in that it comprises: a memory, a processor, and a computer program stored on the memory and operable on the processor, when the processor executes the program, it realizes claims 1-11 Any one of the image recognition methods.18.根据权利要求17所述的计算机设备,其特征在于,所述计算机设备包括移动终端。18. The computer device of claim 17, wherein the computer device comprises a mobile terminal.19.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-11中任一所述的图像识别方法。19. A computer-readable storage medium, on which a computer program is stored, wherein when the program is executed by a processor, the image recognition method according to any one of claims 1-11 is realized.
CN201711479546.XA2017-12-292017-12-29Image recognition method and device, computer equipment and storage mediumPendingCN108229379A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201711479546.XACN108229379A (en)2017-12-292017-12-29Image recognition method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201711479546.XACN108229379A (en)2017-12-292017-12-29Image recognition method and device, computer equipment and storage medium

Publications (1)

Publication NumberPublication Date
CN108229379Atrue CN108229379A (en)2018-06-29

Family

ID=62646049

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201711479546.XAPendingCN108229379A (en)2017-12-292017-12-29Image recognition method and device, computer equipment and storage medium

Country Status (1)

CountryLink
CN (1)CN108229379A (en)

Cited By (49)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109063742A (en)*2018-07-062018-12-21平安科技(深圳)有限公司Butterfly identifies network establishing method, device, computer equipment and storage medium
CN109166141A (en)*2018-08-102019-01-08Oppo广东移动通信有限公司Danger reminding method and device, storage medium and mobile terminal
CN109522939A (en)*2018-10-262019-03-26平安科技(深圳)有限公司Image classification method, terminal device and computer readable storage medium
CN109598267A (en)*2018-11-152019-04-09北京天融信网络安全技术有限公司Image data leakage prevention method, device and equipment
CN109635805A (en)*2018-12-112019-04-16上海智臻智能网络科技股份有限公司Image text location method and device, image text recognition methods and device
CN109977826A (en)*2019-03-152019-07-05百度在线网络技术(北京)有限公司The classification recognition methods of object and device
CN110147252A (en)*2019-04-282019-08-20深兰科技(上海)有限公司A kind of parallel calculating method and device of convolutional neural networks
CN110163260A (en)*2019-04-262019-08-23平安科技(深圳)有限公司Image-recognizing method, device, equipment and storage medium based on residual error network
CN110197143A (en)*2019-05-172019-09-03深兰科技(上海)有限公司A kind of checkout station item identification method, device and electronic equipment
CN110245611A (en)*2019-06-142019-09-17腾讯科技(深圳)有限公司Image-recognizing method, device, computer equipment and storage medium
CN110276345A (en)*2019-06-052019-09-24北京字节跳动网络技术有限公司Convolutional neural networks model training method, device and computer readable storage medium
CN110378254A (en)*2019-07-032019-10-25中科软科技股份有限公司Recognition methods, system, electronic equipment and the storage medium of vehicle damage amending image trace
CN110390350A (en)*2019-06-242019-10-29西北大学 A Hierarchical Classification Method Based on Bilinear Structure
CN110427898A (en)*2019-08-072019-11-08广东工业大学Wrap up safety check recognition methods, system, device and computer readable storage medium
CN110458079A (en)*2019-08-052019-11-15黑龙江电力调度实业有限公司A kind of Image Acquisition and target identification method based on FPGA and convolutional neural networks
CN110555855A (en)*2019-09-062019-12-10聚好看科技股份有限公司GrabCont algorithm-based image segmentation method and display device
CN110705564A (en)*2019-09-092020-01-17华为技术有限公司 Method and device for image recognition
CN110751163A (en)*2018-07-242020-02-04杭州海康威视数字技术股份有限公司 Target positioning method and device, computer-readable storage medium and electronic device
WO2020041962A1 (en)*2018-08-282020-03-05深圳鲲云信息科技有限公司Parallel deconvolutional calculation method, single-engine calculation method and related product
CN110874099A (en)*2018-08-132020-03-10格力电器(武汉)有限公司Target image identification method and device and movable air conditioner
CN110889428A (en)*2019-10-212020-03-17浙江大搜车软件技术有限公司Image recognition method and device, computer equipment and storage medium
CN110956190A (en)*2018-09-272020-04-03深圳云天励飞技术有限公司 Image recognition method and device, computer device, and computer-readable storage medium
CN110969047A (en)*2018-09-282020-04-07珠海格力电器股份有限公司Method and device for identifying food materials and refrigerator
CN110992725A (en)*2019-10-242020-04-10合肥讯图信息科技有限公司Method, system and storage medium for detecting traffic signal lamp fault
CN111079575A (en)*2019-11-292020-04-28拉货宝网络科技有限责任公司Material identification method and system based on packaging image characteristics
CN111126388A (en)*2019-12-202020-05-08维沃移动通信有限公司 Image recognition method and electronic device
CN111144408A (en)*2019-12-242020-05-12Oppo广东移动通信有限公司 Image recognition method, image recognition device, electronic device and storage medium
CN111291694A (en)*2020-02-182020-06-16苏州大学Dish image identification method and device
CN111435432A (en)*2019-01-152020-07-21北京市商汤科技开发有限公司 Network optimization method and device, image processing method and device, and storage medium
CN111553420A (en)*2020-04-282020-08-18北京邮电大学 A kind of X-ray image recognition method and device based on neural network
CN111652678A (en)*2020-05-272020-09-11腾讯科技(深圳)有限公司Article information display method, device, terminal, server and readable storage medium
CN111814534A (en)*2020-05-182020-10-23北京迈格威科技有限公司 Method, device and electronic system for processing vision tasks
CN111860533A (en)*2019-04-302020-10-30深圳数字生命研究院 Image recognition method and device, storage medium and electronic device
CN111967515A (en)*2020-08-142020-11-20Oppo广东移动通信有限公司Image information extraction method, training method and device, medium and electronic equipment
WO2021012508A1 (en)*2019-07-192021-01-28平安科技(深圳)有限公司Ai image recognition method, apparatus and device, and storage medium
CN112396123A (en)*2020-11-302021-02-23上海交通大学Image recognition method, system, terminal and medium based on convolutional neural network
CN112513878A (en)*2018-08-032021-03-16罗伯特·博世有限公司Method and device for determining interpretation graph
CN113076889A (en)*2021-04-092021-07-06上海西井信息科技有限公司Container lead seal identification method and device, electronic equipment and storage medium
CN113205054A (en)*2021-05-102021-08-03江苏硕世生物科技股份有限公司Hypha microscopic image identification method and system, equipment and readable medium
CN113269276A (en)*2021-06-282021-08-17深圳市英威诺科技有限公司Image recognition method, device, equipment and storage medium
CN113424197A (en)*2018-09-212021-09-21定位成像有限公司Machine learning assisted self-improving object recognition system and method
CN113515983A (en)*2020-06-192021-10-19阿里巴巴集团控股有限公司Model training method, mobile object identification method, device and equipment
CN114092840A (en)*2021-11-242022-02-25四川大学锦江学院Brain-like intelligent image identification method and device applied to unmanned aerial vehicle
CN114169952A (en)*2020-09-112022-03-11京东方科技集团股份有限公司 A product recommendation method, server, shopping cart and shopping system
CN114299294A (en)*2021-11-152022-04-08北京小来无限科技有限公司Prediction method, recommendation method and related equipment thereof
CN114595352A (en)*2022-02-252022-06-07北京爱奇艺科技有限公司 Image recognition method, device, electronic device and readable storage medium
CN115909329A (en)*2023-01-102023-04-04深圳前海量子云码科技有限公司Microscopic target identification method and device, electronic equipment and storage medium
CN111401521B (en)*2020-03-112023-10-31北京迈格威科技有限公司Neural network model training method and device, and image recognition method and device
WO2024077781A1 (en)*2022-10-132024-04-18深圳云天励飞技术股份有限公司Convolutional neural network model-based image recognition method and apparatus, and terminal device

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106446782A (en)*2016-08-292017-02-22北京小米移动软件有限公司Image identification method and device
CN106548145A (en)*2016-10-312017-03-29北京小米移动软件有限公司Image-recognizing method and device
CN106982359A (en)*2017-04-262017-07-25深圳先进技术研究院A kind of binocular video monitoring method, system and computer-readable recording medium
CN107516102A (en)*2016-06-162017-12-26北京市商汤科技开发有限公司View data is classified and establishes disaggregated model method, apparatus and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107516102A (en)*2016-06-162017-12-26北京市商汤科技开发有限公司View data is classified and establishes disaggregated model method, apparatus and system
CN106446782A (en)*2016-08-292017-02-22北京小米移动软件有限公司Image identification method and device
CN106548145A (en)*2016-10-312017-03-29北京小米移动软件有限公司Image-recognizing method and device
CN106982359A (en)*2017-04-262017-07-25深圳先进技术研究院A kind of binocular video monitoring method, system and computer-readable recording medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
乔渭阳: "《航空发动机气动声学》", 30 June 2010*
罗建豪等: "《基于深度卷积特征的细粒度图像分类研究综述》", 《自动化学报》*

Cited By (71)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109063742B (en)*2018-07-062023-04-18平安科技(深圳)有限公司Butterfly identification network construction method and device, computer equipment and storage medium
CN109063742A (en)*2018-07-062018-12-21平安科技(深圳)有限公司Butterfly identifies network establishing method, device, computer equipment and storage medium
CN110751163A (en)*2018-07-242020-02-04杭州海康威视数字技术股份有限公司 Target positioning method and device, computer-readable storage medium and electronic device
CN112513878A (en)*2018-08-032021-03-16罗伯特·博世有限公司Method and device for determining interpretation graph
CN109166141A (en)*2018-08-102019-01-08Oppo广东移动通信有限公司Danger reminding method and device, storage medium and mobile terminal
CN110874099A (en)*2018-08-132020-03-10格力电器(武汉)有限公司Target image identification method and device and movable air conditioner
WO2020041962A1 (en)*2018-08-282020-03-05深圳鲲云信息科技有限公司Parallel deconvolutional calculation method, single-engine calculation method and related product
US11961279B2 (en)2018-09-212024-04-16Position Imaging, Inc.Machine-learning-assisted self-improving object-identification system and method
CN113424197A (en)*2018-09-212021-09-21定位成像有限公司Machine learning assisted self-improving object recognition system and method
CN110956190A (en)*2018-09-272020-04-03深圳云天励飞技术有限公司 Image recognition method and device, computer device, and computer-readable storage medium
CN110969047A (en)*2018-09-282020-04-07珠海格力电器股份有限公司Method and device for identifying food materials and refrigerator
CN109522939B (en)*2018-10-262024-05-07平安科技(深圳)有限公司Image classification method, terminal device and computer readable storage medium
CN109522939A (en)*2018-10-262019-03-26平安科技(深圳)有限公司Image classification method, terminal device and computer readable storage medium
CN109598267A (en)*2018-11-152019-04-09北京天融信网络安全技术有限公司Image data leakage prevention method, device and equipment
CN109635805A (en)*2018-12-112019-04-16上海智臻智能网络科技股份有限公司Image text location method and device, image text recognition methods and device
CN111435432B (en)*2019-01-152023-05-26北京市商汤科技开发有限公司 Network optimization method and device, image processing method and device, storage medium
CN111435432A (en)*2019-01-152020-07-21北京市商汤科技开发有限公司 Network optimization method and device, image processing method and device, and storage medium
CN109977826A (en)*2019-03-152019-07-05百度在线网络技术(北京)有限公司The classification recognition methods of object and device
CN110163260B (en)*2019-04-262024-05-28平安科技(深圳)有限公司Residual network-based image identification method, device, equipment and storage medium
CN110163260A (en)*2019-04-262019-08-23平安科技(深圳)有限公司Image-recognizing method, device, equipment and storage medium based on residual error network
CN110147252A (en)*2019-04-282019-08-20深兰科技(上海)有限公司A kind of parallel calculating method and device of convolutional neural networks
CN111860533A (en)*2019-04-302020-10-30深圳数字生命研究院 Image recognition method and device, storage medium and electronic device
CN111860533B (en)*2019-04-302023-12-12深圳数字生命研究院Image recognition method and device, storage medium and electronic device
CN110197143A (en)*2019-05-172019-09-03深兰科技(上海)有限公司A kind of checkout station item identification method, device and electronic equipment
CN110197143B (en)*2019-05-172021-09-24深兰科技(上海)有限公司 A method, device and electronic device for identifying items in a settlement station
CN110276345B (en)*2019-06-052021-09-17北京字节跳动网络技术有限公司Convolutional neural network model training method and device and computer readable storage medium
CN110276345A (en)*2019-06-052019-09-24北京字节跳动网络技术有限公司Convolutional neural networks model training method, device and computer readable storage medium
CN110245611B (en)*2019-06-142021-06-15腾讯科技(深圳)有限公司Image recognition method and device, computer equipment and storage medium
CN110245611A (en)*2019-06-142019-09-17腾讯科技(深圳)有限公司Image-recognizing method, device, computer equipment and storage medium
CN110390350A (en)*2019-06-242019-10-29西北大学 A Hierarchical Classification Method Based on Bilinear Structure
CN110390350B (en)*2019-06-242021-06-15西北大学 A Hierarchical Classification Method Based on Bilinear Structure
CN110378254B (en)*2019-07-032022-04-19中科软科技股份有限公司Method and system for identifying vehicle damage image modification trace, electronic device and storage medium
CN110378254A (en)*2019-07-032019-10-25中科软科技股份有限公司Recognition methods, system, electronic equipment and the storage medium of vehicle damage amending image trace
WO2021012508A1 (en)*2019-07-192021-01-28平安科技(深圳)有限公司Ai image recognition method, apparatus and device, and storage medium
CN110458079A (en)*2019-08-052019-11-15黑龙江电力调度实业有限公司A kind of Image Acquisition and target identification method based on FPGA and convolutional neural networks
CN110427898A (en)*2019-08-072019-11-08广东工业大学Wrap up safety check recognition methods, system, device and computer readable storage medium
CN110427898B (en)*2019-08-072022-07-29广东工业大学Package security check identification method, system, device and computer readable storage medium
CN110555855A (en)*2019-09-062019-12-10聚好看科技股份有限公司GrabCont algorithm-based image segmentation method and display device
CN110705564B (en)*2019-09-092023-04-18华为技术有限公司Image recognition method and device
CN110705564A (en)*2019-09-092020-01-17华为技术有限公司 Method and device for image recognition
CN110889428A (en)*2019-10-212020-03-17浙江大搜车软件技术有限公司Image recognition method and device, computer equipment and storage medium
CN110992725A (en)*2019-10-242020-04-10合肥讯图信息科技有限公司Method, system and storage medium for detecting traffic signal lamp fault
CN111079575A (en)*2019-11-292020-04-28拉货宝网络科技有限责任公司Material identification method and system based on packaging image characteristics
CN111126388B (en)*2019-12-202024-03-29维沃移动通信有限公司Image recognition method and electronic equipment
CN111126388A (en)*2019-12-202020-05-08维沃移动通信有限公司 Image recognition method and electronic device
CN111144408A (en)*2019-12-242020-05-12Oppo广东移动通信有限公司 Image recognition method, image recognition device, electronic device and storage medium
CN111291694B (en)*2020-02-182023-12-01苏州大学Dish image recognition method and device
CN111291694A (en)*2020-02-182020-06-16苏州大学Dish image identification method and device
CN111401521B (en)*2020-03-112023-10-31北京迈格威科技有限公司Neural network model training method and device, and image recognition method and device
CN111553420A (en)*2020-04-282020-08-18北京邮电大学 A kind of X-ray image recognition method and device based on neural network
CN111553420B (en)*2020-04-282023-08-15北京邮电大学X-ray image identification method and device based on neural network
CN111814534A (en)*2020-05-182020-10-23北京迈格威科技有限公司 Method, device and electronic system for processing vision tasks
US12088887B2 (en)2020-05-272024-09-10Tencent Technology (Shenzhen) Company LimitedDisplay method and apparatus for item information, device, and computer-readable storage medium
CN111652678B (en)*2020-05-272023-11-14腾讯科技(深圳)有限公司Method, device, terminal, server and readable storage medium for displaying article information
CN111652678A (en)*2020-05-272020-09-11腾讯科技(深圳)有限公司Article information display method, device, terminal, server and readable storage medium
CN113515983A (en)*2020-06-192021-10-19阿里巴巴集团控股有限公司Model training method, mobile object identification method, device and equipment
CN111967515A (en)*2020-08-142020-11-20Oppo广东移动通信有限公司Image information extraction method, training method and device, medium and electronic equipment
US12125093B2 (en)2020-09-112024-10-22Beijing Boe Optoelectronics Technology Co., Ltd.Commodity recommendation method, server, shopping cart and shopping system
CN114169952A (en)*2020-09-112022-03-11京东方科技集团股份有限公司 A product recommendation method, server, shopping cart and shopping system
CN112396123A (en)*2020-11-302021-02-23上海交通大学Image recognition method, system, terminal and medium based on convolutional neural network
CN113076889B (en)*2021-04-092023-06-30上海西井信息科技有限公司Container lead seal identification method, device, electronic equipment and storage medium
CN113076889A (en)*2021-04-092021-07-06上海西井信息科技有限公司Container lead seal identification method and device, electronic equipment and storage medium
CN113205054A (en)*2021-05-102021-08-03江苏硕世生物科技股份有限公司Hypha microscopic image identification method and system, equipment and readable medium
CN113269276A (en)*2021-06-282021-08-17深圳市英威诺科技有限公司Image recognition method, device, equipment and storage medium
CN113269276B (en)*2021-06-282024-10-01陕西谦亿智能科技有限责任公司Image recognition method, device, equipment and storage medium
CN114299294A (en)*2021-11-152022-04-08北京小来无限科技有限公司Prediction method, recommendation method and related equipment thereof
CN114092840A (en)*2021-11-242022-02-25四川大学锦江学院Brain-like intelligent image identification method and device applied to unmanned aerial vehicle
CN114092840B (en)*2021-11-242024-07-23四川大学锦江学院Brain-like intelligent image recognition method and device applied to unmanned aerial vehicle
CN114595352A (en)*2022-02-252022-06-07北京爱奇艺科技有限公司 Image recognition method, device, electronic device and readable storage medium
WO2024077781A1 (en)*2022-10-132024-04-18深圳云天励飞技术股份有限公司Convolutional neural network model-based image recognition method and apparatus, and terminal device
CN115909329A (en)*2023-01-102023-04-04深圳前海量子云码科技有限公司Microscopic target identification method and device, electronic equipment and storage medium

Similar Documents

PublicationPublication DateTitle
CN108229379A (en)Image recognition method and device, computer equipment and storage medium
CN108710847A (en)Scene recognition method, device and electronic equipment
WO2017079522A1 (en)Subcategory-aware convolutional neural networks for object detection
CN104061748B (en)Food storage position recording method, device, terminal and refrigerator in a kind of refrigerator
CN110880172A (en)Video face tampering detection method and system based on cyclic convolution neural network
CN104061749B (en)Refrigerator food storage position recording method, device and terminal and refrigerator
US20210383166A1 (en)Method and apparatus for context-embedding and region-based object detection
CN105654066A (en)Vehicle identification method and device
CN103871077B (en)A kind of extraction method of key frame in road vehicles monitoring video
CN109376580B (en) A deep learning-based identification method for power tower components
CN109815884A (en)Unsafe driving behavioral value method and device based on deep learning
CN111210417B (en)Cloth defect detection method based on convolutional neural network
CN109934216A (en) Image processing method, apparatus, and computer-readable storage medium
CN111814754A (en)Single-frame image pedestrian detection method and device for night scene
CN119027970B (en)Identification method of two-dimensional drawing of transformer substation
CN114175093A (en)Detection device and detection method for display panel, electronic device and readable medium
CN113486856A (en)Driver irregular behavior detection method based on semantic segmentation and convolutional neural network
CN118392875A (en) A nondestructive testing system and method for shaft parts surface
CN110363171A (en) Method for training sky region prediction model and method for identifying sky region
CN114511702A (en)Remote sensing image segmentation method and system based on multi-scale weighted attention
CN114549968A (en)Target detection method and device and electronic equipment
CN116630828B (en)Unmanned aerial vehicle remote sensing information acquisition system and method based on terrain environment adaptation
CN112580589A (en)Behavior identification method, medium and equipment considering unbalanced data based on double-flow method
CN110298210B (en)Method and device for judging abnormity based on vision
CN116453043A (en) A Kitchen Mouse Detection Method Based on Background Modeling and Object Detection

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication

Application publication date:20180629

RJ01Rejection of invention patent application after publication

[8]ページ先頭

©2009-2025 Movatter.jp