WO2019205375A1 - 牲畜识别方法、装置及存储介质 - Google Patents

牲畜识别方法、装置及存储介质 Download PDF

Info

Publication number
WO2019205375A1
WO2019205375A1 PCT/CN2018/102117 CN2018102117W WO2019205375A1 WO 2019205375 A1 WO2019205375 A1 WO 2019205375A1 CN 2018102117 W CN2018102117 W CN 2018102117W WO 2019205375 A1 WO2019205375 A1 WO 2019205375A1
Authority
WO
WIPO (PCT)
Prior art keywords
facial
photo
preset
preset type
recognition model
Prior art date
Application number
PCT/CN2018/102117
Other languages
English (en)
French (fr)
Inventor
刘奡智
王健宗
肖京
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2019205375A1 publication Critical patent/WO2019205375A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification

Definitions

  • the present application relates to the field of image recognition technologies, and in particular, to a livestock identification method, apparatus, and storage medium.
  • animal husbandry is one of the important sources of human access to food.
  • livestock death is a frequent occurrence.
  • livestock death it will usually cause huge economic losses for these farmers. It may less inhibit the enthusiasm of potential farmers to join the animal husbandry, and cause potential obstacles to the development of animal husbandry; on the other hand, increase the probability that farmers will reduce the probability of livestock sickness through abnormal routes (for example, drug control) to provide livestock survival.
  • abnormal routes for example, drug control
  • the present application provides a livestock identification method, apparatus and storage medium, the main purpose of which is to remotely identify livestock, and reduce the recognition cost and improve the recognition efficiency.
  • the present application provides a livestock identification method, the method comprising:
  • Receiving step receiving a photo of the face of the animal to be identified and a corresponding identity to be verified;
  • Extracting step extracting a feature vector of a preset type of the facial photo according to a predetermined feature vector extraction algorithm
  • a determining step determining, according to a mapping relationship between the identity identifier to be verified and the first preset type identification model, a first preset type recognition model corresponding to the identity identifier;
  • the step of identifying inputting a feature vector of a preset type of the face photo of the animal to be identified into the determined first preset type recognition model, and outputting the recognition result.
  • the present application also provides an electronic device comprising a memory and a processor, the memory including a livestock identification program, the livestock identification program being executed by the processor to implement the following steps:
  • Receiving step receiving a photo of the face of the animal to be identified and a corresponding identity to be verified;
  • Extracting step extracting a feature vector of a preset type of the facial photo according to a predetermined feature vector extraction algorithm
  • a determining step determining, according to a mapping relationship between the identity identifier to be verified and the first preset type identification model, a first preset type recognition model corresponding to the identity identifier;
  • the step of identifying inputting a feature vector of a preset type of the face photo of the animal to be identified into the determined first preset type recognition model, and outputting the recognition result.
  • the present application also provides a computer readable storage medium including a livestock identification program that, when executed by the processor, implements livestock identification as described above Any step in the method.
  • the livestock identification method, the electronic device and the computer readable storage medium provided by the present application determine the corresponding first preset type identification model according to the identity identifier by receiving a facial photo of the animal to be identified and a corresponding identity to be verified.
  • the feature vector extracted from the face photo is input to the first preset type recognition model, and the recognition result is output. Since the information transmission can be completed through the network without the need for field sampling, the remote batch identification of low cost and high efficiency for livestock can be realized by using the present application.
  • FIG. 1 is a schematic diagram of a preferred embodiment of an electronic device of the present application.
  • FIG. 2 is a block diagram showing the program of the livestock identification program of Figure 1;
  • FIG. 3 is a flow chart of a preferred embodiment of a livestock identification method of the present application.
  • the application provides an electronic device.
  • FIG. 1 it is a schematic diagram of a preferred embodiment of the electronic device 1 of the present application.
  • the electronic device 1 receives a facial photo of the animal to be identified and a corresponding identity to be verified, and generates a to-be-identified feature using a predetermined feature vector extraction algorithm and a first preset type recognition model corresponding to the identity identifier. Identify the recognition result of the face photo of the animal.
  • the electronic device 1 may be a terminal device having a storage and computing function, such as a server, a smart phone, a tablet computer, a portable computer, a desktop computer, or the like.
  • the server when the electronic device 1 is a server, the server may be one or more of a rack server, a blade server, a tower server, or a rack server.
  • the electronic device 1 includes a memory 11, a processor 12, a network interface 13, and a communication bus 14.
  • the memory 11 includes at least one type of readable storage medium.
  • the at least one type of readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card type memory, or the like.
  • the readable storage medium may be an internal storage unit of the electronic device 1, such as a hard disk of the electronic device 1.
  • the readable storage medium may also be an external memory 11 of the electronic device 1, such as a plug-in hard disk equipped on the electronic device 1, a smart memory card (SMC). , Secure Digital (SD) card, Flash Card, etc.
  • SMC smart memory card
  • SD Secure Digital
  • the readable storage medium of the memory 11 is generally used to store an operating system, a livestock identification program 10, a first preset type recognition model, a second preset type recognition model, and a facial photo collection of various animals. And the corresponding identity and so on.
  • the memory 11 can also be used to temporarily store data that has been output or is about to be output.
  • the processor 12 in some embodiments, may be a Central Processing Unit (CPU), microprocessor or other data processing chip for running program code or processing data stored in the memory 11, such as executing a livestock identification program. 10 and so on.
  • CPU Central Processing Unit
  • microprocessor or other data processing chip for running program code or processing data stored in the memory 11, such as executing a livestock identification program. 10 and so on.
  • the network interface 13 may include a standard wired interface, a wireless interface (such as a WI-FI interface). Typically used to establish a communication connection between the server 1 and other electronic devices or systems.
  • the communication bus 14 is used to implement connection communication between the above components.
  • FIG. 1 shows only the electronic device 1 having the components 11-14 and the livestock identification program 10, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
  • the electronic device 1 may further include a user interface
  • the user interface may include an input unit such as a keyboard, a voice input device such as a microphone, a device with a voice recognition function, a voice output device such as an audio, a headphone, and the like.
  • the user interface may also include a standard wired interface and a wireless interface.
  • the electronic device 1 may further include a display, which may also be referred to as a display screen or a display unit.
  • a display may also be referred to as a display screen or a display unit.
  • it may be an LED display, a liquid crystal display, a touch liquid crystal display, and an Organic Light-Emitting Diode (OLED) display.
  • the display is used to display information processed in the electronic device 1 and a user interface for displaying visualizations.
  • the electronic device 1 further comprises a touch sensor.
  • the area provided by the touch sensor for the user to perform a touch operation is referred to as a touch area.
  • the touch sensor described herein may be a resistive touch sensor, a capacitive touch sensor, or the like.
  • the touch sensor includes not only a contact type touch sensor but also a proximity type touch sensor or the like.
  • the touch sensor may be a single sensor or a plurality of sensors arranged, for example, in an array. The user can activate the livestock identification program 10 by touching the touch area.
  • the area of the display of the electronic device 1 may be the same as or different from the area of the touch sensor.
  • a display is stacked with the touch sensor to form a touch display. The device detects a user-triggered touch operation based on a touch screen display.
  • the electronic device 1 may further include a radio frequency (RF) circuit, a sensor, an audio circuit, and the like, and details are not described herein.
  • RF radio frequency
  • Receiving step receiving a photo of the face of the animal to be identified and a corresponding identity to be verified;
  • Extracting step extracting a feature vector of a preset type of the facial photo according to a predetermined feature vector extraction algorithm
  • a determining step determining, according to a mapping relationship between the identity identifier to be verified and the first preset type identification model, a first preset type recognition model corresponding to the identity identifier;
  • the step of identifying inputting a feature vector of a preset type of the face photo of the animal to be identified into the determined first preset type recognition model, and outputting the recognition result.
  • the animal type corresponding to the identity to be verified should be the same as the type of the animal to be identified, otherwise the direct recognition fails, and the livestock identification program 10 is not required to be executed.
  • the first preset type recognition model is a classification model, such as a Support Vector Machine (SVM) model.
  • SVM Support Vector Machine
  • an SVM model is trained for each animal, and the training process of the SVM model corresponding to the identity to be verified is as follows:
  • the facial photo collection of the livestock corresponding to the identity to be verified is a positive sample
  • the acquired other facial photo collection is a negative sample
  • the positive and negative sample facial photo collections are respectively divided into a first preset ratio (for example, 70%) a training set and a second preset ratio (for example, 30%) of the verification set, it can be understood that the sum of the first preset ratio and the second preset ratio is less than or equal to 100%;
  • the SVM model is trained by using a preset type of feature vector of each facial photo in the training set and a corresponding identity identifier to obtain an identification model of the livestock corresponding to the identity to be verified, and each of the verification sets is used.
  • the feature vector of the preset type of the face photo verifies the accuracy of the obtained recognition model;
  • the training is completed, and if the accuracy is less than or equal to the first preset threshold (eg, 98.5%), the number of the facial photo collections is increased, and based on the increased The facial photo collection re-executes the above steps.
  • the first preset threshold eg, 98.5%
  • the predetermined feature vector extraction algorithm includes:
  • a mapping relationship between the type of the animal to be identified and a second preset type recognition model for example, a convolutional neural network model
  • a second preset type recognition model for example, a convolutional neural network model
  • Normalizing the facial image region for example, uniformly mapping pixel values of the facial image region to a [0, 1] interval to eliminate the influence of uneven illumination;
  • the effect of the gradient value is to describe an edge condition of the facial image region, thereby describing a facial contour of the animal;
  • the maximum value of the gradient mode in each gradient histogram is composed of a preset type of feature vector of each face photo according to the position of the corresponding image unit in each facial image region, for example, a Histogram of Oriented Gradient (HOG) feature. vector.
  • HOG Histogram of Oriented Gradient
  • each facial image region is divided into M image units, a gradient histogram is calculated in each image unit, and the gradient modulus maximum value in the gradient histogram is extracted to obtain M maximum values, and these values are composed.
  • a histogram vector of each face image area that is, a feature vector of a preset type of each face photo.
  • predetermined gradient formula is:
  • I represents a pixel value (for example, an RGB value)
  • (i, j) is a coordinate of a pixel point.
  • the second preset type recognition model is a facial image region recognition model (for example, a convolutional neural network model), and the embodiment of the present application trains each animal with a facial image region recognition model for the same kind as the animal to be identified.
  • the training process for livestock, its facial image region recognition model is as follows:
  • the second preset type recognition model is trained by using the photo of each facial sample in the training set and the corresponding facial image area to obtain a second preset type recognition model corresponding to the livestock, and the photo samples of each facial sample in the verification set are used. And verifying the accuracy of the second preset type recognition model by the corresponding facial image area label;
  • the accuracy rate is greater than the first preset threshold (eg, 98.5%)
  • the training is completed, and if the verification rate is less than or equal to the first preset threshold (eg, 98.5%), the number of the face sample photos is increased, and based on the increased The face sample photo re-executes the above training process.
  • the first preset threshold eg, 98.5%
  • the electronic device 1 proposed in the above embodiment identifies the facial image region in which the face of the animal is located in the facial photograph of the animal by using a second preset type recognition model for each animal training, by using the first preset type for each animal training.
  • the recognition model identifies the feature vector extracted from the face image region, and outputs a recognition result for the animal.
  • the livestock identification program 10 can be partitioned into a plurality of modules that are stored in the memory 12 and executed by the processor 13 to complete the application.
  • a module as referred to in this application refers to a series of computer program instructions that are capable of performing a particular function.
  • the livestock identification program 10 can be divided into: a receiving module 110, an extracting module 120, a determining module 130, and an identifying module 140, and the functions or operating steps implemented by the modules 110-140 are the same as above. Similarly, it will not be described in detail here, by way of example, for example:
  • the receiving module 110 is configured to receive a photo of the face of the animal to be identified and a corresponding identity to be verified;
  • the extracting module 120 is configured to extract a feature vector of a preset type of the facial photo according to a predetermined feature vector extraction algorithm
  • the determining module 130 is configured to determine, according to the mapping relationship between the identity identifier to be verified and the first preset type identification model, a first preset type recognition model corresponding to the identity identifier;
  • the identification module 140 is configured to input a feature vector of a preset type of the facial photo into the determined first preset type recognition model, and output a recognition result.
  • the present application also provides a livestock identification method.
  • a flow chart of a preferred embodiment of the livestock identification method of the present application The following steps are implemented in the livestock identification method when the processor 12 of the electronic device 1 executes the livestock identification program 10 stored in the memory:
  • step S10 the receiving module 110 receives a facial photo of the animal to be identified and a corresponding identity to be verified.
  • each animal is assigned a unique identity
  • the function of the livestock identification program 10 is to identify the received facial photo and verify whether the received identity is the identity of the animal corresponding to the facial photo.
  • step S20 the extraction module 120 extracts a feature vector of a preset type of the face photo according to a predetermined feature vector extraction algorithm.
  • the predetermined feature vector extraction algorithm includes:
  • the second preset type recognition model may be a convolutional neural network (Convolutional Neural Network, CNN) model;
  • Normalizing the facial image region for example, uniformly mapping pixel values of the facial image region to a [0, 1] interval to eliminate the influence of uneven illumination;
  • the effect of the gradient value is to describe an edge condition of the facial image region, thereby describing a facial contour of the animal;
  • the maximum value of the gradient mode in each gradient histogram is composed of a preset type of feature vector of each face photo according to the position of the corresponding image unit in each facial image region, for example, a Histogram of Oriented Gradient (HOG) feature. vector.
  • HOG Histogram of Oriented Gradient
  • predetermined gradient formula is:
  • I represents a pixel value (for example, an RGB value)
  • (i, j) is a coordinate of a pixel point.
  • a second preset type identification model is trained for each animal.
  • For the training process refer to the above detailed description about the electronic device 1, and details are not described herein again.
  • step S30 the determining module 130 determines a first preset type identification model corresponding to the identity identifier according to the mapping relationship between the identity identifier to be verified and the first preset type identification model.
  • a first preset type identification model is trained for each animal, that is, the identity identifier has a one-to-one correspondence with the first preset type identification model, and the determining module 130 determines the location according to the one-to-one correspondence mapping relationship.
  • the first preset type identification model corresponding to the verification identity is described.
  • For the training process of the first preset type identification model please refer to the above detailed description about the electronic device 1, and no further details are provided herein.
  • step S40 the identification module 140 inputs the feature vector of the preset type of the face photo of the animal to be identified into the determined first preset type recognition model, and outputs the recognition result.
  • the recognition result includes the identification pass and the recognition failure. If the recognition fails, the received facial photo and the identity do not match. If the identification is passed, the received identity is the identity of the to-be-identified animal, and the received facial photo. And the identity corresponds to the same animal.
  • the livestock identification method of the present embodiment by receiving a facial photo of the animal to be identified and a corresponding identity to be verified, determining a corresponding first preset type recognition model according to the identity identifier, and the face of the animal to be identified will be
  • the feature vector of the preset type extracted in the photo is input to the first preset type recognition model, and the recognition result of the recognition pass or recognition failure is output. Since the information transmission can be completed through the network without the need for field sampling, the livestock identification method can realize remote batch identification of low cost and high efficiency for livestock.
  • the embodiment of the present application further provides a computer readable storage medium, which may be a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a read only memory (ROM), and an erasable programmable Any combination or combination of any one or more of read only memory (EPROM), portable compact disk read only memory (CD-ROM), USB memory, and the like.
  • the computer readable storage medium stores therein a livestock identification program 10 that, when executed by the processor 13, performs the following operations:
  • Receiving step receiving a photo of the face of the animal to be identified and a corresponding identity to be verified;
  • Extracting step extracting a feature vector of a preset type of the facial photo according to a predetermined feature vector extraction algorithm
  • a determining step determining, according to a mapping relationship between the identity identifier to be verified and the first preset type identification model, a first preset type recognition model corresponding to the identity identifier;
  • the step of identifying inputting a feature vector of a preset type of the face photo of the animal to be identified into the determined first preset type recognition model, and outputting the recognition result.
  • the specific embodiment of the computer readable storage medium of the present application is substantially the same as the specific embodiment of the livestock identification method and the electronic device 1 described above, and details are not described herein again.

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

一种牲畜识别方法、装置及计算机可读存储介质,该方法包括以下步骤:接收待识别牲畜的面部照片和相应的待验证的身份标识(S10);按照预先确定的特征向量提取算法,提取出所述面部照片的预设类型的特征向量(S20);根据所述待验证的身份标识与第一预设类型识别模型的映射关系,确定该身份标识对应的第一预设类型识别模型(S30);将所述面部照片的预设类型的特征向量输入确定的第一预设类型识别模型,输出识别结果(S40)。通过接收的身份标识确定对应的识别模型,利用确定的识别模型和特征向量提取算法对待识别牲畜的面部照片进行识别,可以实现对牲畜的远程批量识别。

Description

牲畜识别方法、装置及存储介质
优先权申明
本申请要求于2018年4月26日提交中国专利局、申请号为2018103860027,发明名称为“牲畜识别方法、装置及存储介质”的中国专利申请的优先权,其内容全部通过引用结合在本申请中。
技术领域
本申请涉及图像识别技术领域,尤其涉及一种牲畜识别方法、装置及存储介质。
背景技术
目前,畜牧业是人类获取食物的重要来源之一。在牲畜养殖过程中,牲畜生病死亡是一个经常发生的事件,对大多数养殖户而言,若发生牲畜生病死亡事件,则通常会造成这些养殖户巨大的经济损失,这种风险一方面或多或少抑制了潜在养殖户投身畜牧业的积极性,给畜牧业的发展造成潜在的阻碍;另一方面增加了养殖户通过非正常途径(例如,药物控制)降低牲畜生病的概率从而提供牲畜的存活率的可能性,从而该食品安全构成极大的现实威胁。
为了最大程度降低这种风险带来的影响,很多保险公司推出了牲畜险,以保险的方式为养殖户规避这种风险。为了配合牲畜险的开展,目前出现了许多识别被保牲畜身份的现有识别方案,例如,为被投保的猪植入芯片、DNA识别、打耳标等方式对被保的猪进行身份识别,但这类现有识别方案成本较高、效率低下、无法远程批量识别。
发明内容
鉴于以上原因,本申请提供一种牲畜识别方法、装置及存储介质,其主要目的在于对牲畜进行远程批量识别,并降低识别成本,提高识别效率。
为实现上述目的,本申请提供一种牲畜识别方法,该方法包括:
接收步骤:接收待识别牲畜的面部照片和相应的待验证的身份标识;
提取步骤:按照预先确定的特征向量提取算法,提取出该面部照片的预设类型的特征向量;
确定步骤:根据所述待验证的身份标识与第一预设类型识别模型的映射关系,确定该身份标识对应的第一预设类型识别模型;及
识别步骤:将所述待识别牲畜的面部照片的预设类型的特征向量输入确定的第一预设类型识别模型,输出识别结果。
本申请还提供一种电子装置,该电子装置包括存储器和处理器,所述存储器中包括牲畜识别程序,该牲畜识别程序被所述处理器执行时实现如下步骤:
接收步骤:接收待识别牲畜的面部照片和相应的待验证的身份标识;
提取步骤:按照预先确定的特征向量提取算法,提取出该面部照片的预设类型的特征向量;
确定步骤:根据所述待验证的身份标识与第一预设类型识别模型的映射关系,确定该身份标识对应的第一预设类型识别模型;及
识别步骤:将所述待识别牲畜的面部照片的预设类型的特征向量输入确定的第一预设类型识别模型,输出识别结果。
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中包括牲畜识别程序,该牲畜识别程序被所述处理器执行时实现如上所述的牲畜识别方法中的任意步骤。
本申请提出的牲畜识别方法、电子装置及计算机可读存储介质,通过接收待识别牲畜的面部照片和相应的待验证的身份标识,根据该身份标识确定对应的第一预设类型识别模型,将从所述面部照片中提取出的特征向量输入该第一预设类型识别模型,输出识别结果。因为无须实地采样,通过网络即可完成信息传递,所以利用本申请可以实现对牲畜低成本、高效率的远程批量识别。
附图说明
图1为本申请电子装置较佳实施例的示意图;
图2为图1中牲畜识别程序的程序模块图;
图3为本申请牲畜识别方法较佳实施例的流程图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
为了使本申请的目的、技术方案和优点更加清楚明白,下面将结合若干附图及实施例,对本申请进行进一步详细说明。应当理解的是,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请提供一种电子装置。参照图1所示,为本申请电子装置1较佳实施例的示意图。在该实施例中,电子装置1接收待识别牲畜的面部照片和相应的待验证的身份标识,利用预先确定的特征向量提取算法和该身份标识对应的第一预设类型识别模型生成对该待识别牲畜的面部照片的识别结果。
所述电子装置1可以是服务器、智能手机、平板电脑、便携计算机、桌上型计算机等具有存储和运算功能的终端设备。在一个实施例中,当电子装置1为服务器时,该服务器可以是机架式服务器、刀片式服务器、塔式服务器或机柜式服务器等的一种或几种。
所述电子装置1包括存储器11、处理器12、网络接口13及通信总线14。
其中,存储器11包括至少一种类型的可读存储介质。所述至少一种类型的可读存储介质可为如闪存、硬盘、多媒体卡、卡型存储器等的非易失性存储介质。在一些实施例中,所述可读存储介质可以是所述电子装置1的内部存储单元,例如该电子装置1的硬盘。在另一些实施例中,所述可读存储介质也可以是所述电子装置1的外部存储器11,例如所述电子装置1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。
在本实施例中,所述存储器11的可读存储介质通常用于存储操作系统、牲畜识别程序10、第一预设类型识别模型、第二预设类型识别模型及各种牲畜的面部照片集合和对应的身份标识等。所述存储器11还可以用于暂时地存储已经输出或者将要输出的数据。
处理器12在一些实施例中可以是一中央处理器(Central Processing Unit,CPU),微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行牲畜识别程序10等。
网络接口13可以包括标准的有线接口、无线接口(如WI-FI接口)。通常用于在该服务器1与其他电子设备或系统之间建立通信连接。
通信总线14用于实现上述组件之间的连接通信。
图1仅示出了具有组件11-14以及牲畜识别程序10的电子装置1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
可选地,该电子装置1还可以包括用户接口,用户接口可以包括输入单元比如键盘(Keyboard)、语音输入装置比如麦克风(microphone)等具有语音识别功能的设备、语音输出装置比如音响、耳机等。可选地,用户接口还可以包括标准的有线接口、无线接口。
可选地,该电子装置1还可以包括显示器,也可以称为显示屏或显示单元。在一些实施例中可以是LED显示器、液晶显示器、触控式液晶显示器以及有机发光二极管(Organic Light-Emitting Diode,OLED)显示器等。显示器用于显示在电子装置1中处理的信息以及用于显示可视化的用户界面。
可选地,该电子装置1还包括触摸传感器。所述触摸传感器所提供的供用户进行触摸操作的区域称为触控区域。此外,这里所述的触摸传感器可以为电阻式触摸传感器、电容式触摸传感器等。而且,所述触摸传感器不仅包括接触式的触摸传感器,也可包括接近式的触摸传感器等。此外,所述触摸传感器可以为单个传感器,也可以为例如阵列布置的多个传感器。用户可以通过触摸所述触控区域启动牲畜识别程序10。
此外,该电子装置1的显示器的面积可以与所述触摸传感器的面积相同,也可以不同。可选地,将显示器与所述触摸传感器层叠设置,以形成触摸显示屏。该装置基于触摸显示屏侦测用户触发的触控操作。
该电子装置1还可以包括射频(Radio Frequency,RF)电路、传感器和音频电路等等,在此不再赘述。
在上述实施例中,处理器12执行存储器11中存储的牲畜识别程序10时实现如下步骤:
接收步骤:接收待识别牲畜的面部照片和相应的待验证的身份标识;
提取步骤:按照预先确定的特征向量提取算法,提取出该面部照片的预设类型的特征向量;
确定步骤:根据所述待验证的身份标识与第一预设类型识别模型的映射关系,确定该身份标识对应的第一预设类型识别模型;及
识别步骤:将所述待识别牲畜的面部照片的预设类型的特征向量输入确定的第一预设类型识别模型,输出识别结果。
可以理解的是,所述待验证的身份标识对应的牲畜种类应该与待识别牲畜的种类相同,否则直接识别失败,无须执行牲畜识别程序10。
在一个实施例中,所述第一预设类型识别模型为分类模型,例如支持向量机(Support Vector Machine,SVM)模型。在本实施例中,为每头牲畜训练一个SVM模型,与待验证的身份标识对应的SVM模型的训练过程如下:
获取第一预设数量(例如10万个)的与待识别牲畜同种类的牲畜的面部照片集合,每头牲畜的面部照片集合包括第二预设数量(例如10张)的不同拍摄角度的面部照片,为每头牲畜分配一个唯一的身份标识,分配的身份标识中包括所述待验证的身份标识;
以该待验证的身份标识对应的牲畜的面部照片集合为正样本,以获取的其他面部照片集合为负样本,将该正、负样本面部照片集合分别分为第一预设比例(例如70%)的训练集和第二预设比例(例如30%)的验证集,可以理解的是,该第一预设比例和第二预设比例之和小于或等于100%;
按照所述预先确定的特征向量提取算法,提取出所述训练集和验证集中每张面部照片的预设类型的特征向量;
利用所述训练集中各张面部照片的预设类型的特征向量和对应的身份标识对所述SVM模型进行训练,得到该待验证的身份标识对应的牲畜的识别模型,利用所述验证集中各张面部照片的预设类型的特征向量对得到的该识别模型的准确率进行验证;
若准确率大于第一预设阈值(例如98.5%),则训练完成,若准确率小于或等于第一预设阈值(例如98.5%),则增加所述面部照片集合的数量,并基于增加的面部照片集合重新执行上述步骤。
在该实施例中,所述预先确定的特征向量提取算法包括:
根据所述待识别牲畜的种类与第二预设类型识别模型(例如卷积神经网络模型)的映射关系,确定该种类牲畜对应的第二预设类型识别模型;
利用训练好的对应的第二预设类型识别模型识别所述面部照片中牲畜面部所在的面部图像区域;
对所述面部图像区域进行归一化处理,例如,将所述面部图像区域的像素值统一映射到[0,1]区间,以消除光照不均匀的影响;
利用预先确定的梯度公式计算每个面部图像区域的梯度值,梯度值的作用是描述面部图像区域的边缘情况,从而描述牲畜面部轮廓;
将每个面部图像区域切分为第三预设数量个图像单元,这些图像单元互相连通,计算每个图像单元的梯度直方图;
将所述图像单元按照在每个面部图像区域的位置组合成第四预设数量个图像区间,对所有图像区间进行对比度归一化,以提高算法性能;
将各梯度直方图中的梯度模最大值按照对应图像单元在每个面部图像区域的位置组成每张面部照片的预设类型的特征向量,例如方向梯度直方图(Histogram of Oriented Gradient,HOG)特征向量。
例如,假设将每个面部图像区域切分成M个图像单元,在每个图像单元里计算梯度直方图,把梯度直方图中梯度模最大值提取出来,得到M个所述最大值,这些值组成了每个面部图像区域的直方图向量,即每张面部照片的预设类型的特征向量。
其中,所述预先确定的梯度公式为:
G(x,y)=dx(i,j)+dy(i,j)
dx(i,j)=I(i+1,j)-I(i,j)
dy(i,j)=I(i,j+1)-I(i,j)
其中,I代表像素值(例如RGB值),(i,j)为像素点的坐标。
所述第二预设类型识别模型为面部图像区域识别模型(例如卷积神经网络模型),本申请实施例为每种牲畜训练一个面部图像区域识别模型,针对与所述待识别牲畜同种类的牲畜,其面部图像区域识别模型的训练过程如下:
获取第五预设数量(例如10万张)的与所述待识别牲畜的种类相同的牲畜的面部样本照片,每张面部样本照片中标注有面部图像区域;
将所述面部样本照片分为第一预设比例(例如70%)的训练集和第二预 设比例(例如30%)的验证集可以理解的是,该第一预设比例和第二预设比例之和小于或等于100%;
利用训练集中各张面部样本照片和对应的面部图像区域标注对所述第二预设类型识别模型进行训练,得到该种牲畜对应的第二预设类型识别模型,利用验证集中各张面部样本照片和对应的面部图像区域标注对该第二预设类型识别模型的准确率进行验证;
若准确率大于第一预设阈值(例如98.5%),则训练完成,若验证率小于或等于第一预设阈值(例如98.5%),则增加所述面部样本照片的数量,并基于增加的面部样本照片重新执行上述训练过程。
上述实施例提出的电子装置1,通过为每种牲畜训练的第二预设类型识别模型识别该种牲畜面部照片中牲畜面部所在的面部图像区域,通过为每头牲畜训练的第一预设类型识别模型识别从所述面部图像区域提取的特征向量,输出对牲畜的识别结果。
在其他实施例中,牲畜识别程序10可以被分割为多个模块,该多个模块被存储于存储器12中,并由处理器13执行,以完成本申请。本申请所称的模块是指能够完成特定功能的一系列计算机程序指令段。
参照图2所示,为图1中牲畜识别程序10较佳实施例的程序模块图。在本实施例中,所述牲畜识别程序10可以被分割为:接收模块110、提取模块120、确定模块130及识别模块140,所述模块110-140所实现的功能或操作步骤均与上文类似,在此不再详述,实例性地,例如其中:
接收模块110,用于接收待识别牲畜的面部照片和相应的待验证的身份标识;
提取模块120,用于按照预先确定的特征向量提取算法,提取出所述面部照片的预设类型的特征向量;
确定模块130,用于根据所述待验证的身份标识与第一预设类型识别模型的映射关系,确定该身份标识对应的第一预设类型识别模型;
识别模块140,用于将所述面部照片的预设类型的特征向量输入确定的第一预设类型识别模型,输出识别结果。
此外,本申请还提供一种牲畜识别方法。参照图3所示,为本申请牲畜识别方法的较佳实施例的流程图。电子装置1的处理器12执行存储器中存储 的牲畜识别程序10时实现牲畜识别方法的如下步骤:
步骤S10,接收模块110接收待识别牲畜的面部照片和相应的待验证的身份标识。需要说明的是,本实施例中为每头牲畜分配有一个唯一的身份标识,牲畜识别程序10的作用是识别接收的面部照片,验证接收的身份标识是否为该面部照片对应牲畜的身份标识。
步骤S20,提取模块120按照预先确定的特征向量提取算法,提取出所述面部照片的预设类型的特征向量。在本实施例中,所述预先确定的特征向量提取算法包括:
根据所述待识别牲畜的种类与第二预设类型识别模型的映射关系,确定该种类牲畜对应的第二预设类型识别模型,例如所述第二预设类型识别模型可以为卷积神经网络(Convolutional Neural Network,CNN)模型;
利用训练好的对应的第二预设类型识别模型识别所述面部照片中牲畜面部所在的面部图像区域;
对所述面部图像区域进行归一化处理,例如,将所述面部图像区域的像素值统一映射到[0,1]区间,以消除光照不均匀的影响;
利用预先确定的梯度公式计算每个面部图像区域的梯度值,梯度值的作用是描述面部图像区域的边缘情况,从而描述牲畜面部轮廓;
将每个面部图像区域切分为第三预设数量个图像单元,这些图像单元互相连通,计算每个图像单元的梯度直方图;
将所述图像单元按照在每个面部图像区域的位置组合成第四预设数量个图像区间,对所有图像区间进行对比度归一化,以提高算法性能;
将各梯度直方图中的梯度模最大值按照对应图像单元在每个面部图像区域的位置组成每张面部照片的预设类型的特征向量,例如方向梯度直方图(Histogram of Oriented Gradient,HOG)特征向量。
其中,所述预先确定的梯度公式为:
G(x,y)=dx(i,j)+dy(i,j)
dx(i,j)=I(i+1,j)-I(i,j)
dy(i,j)=I(i,j+1)-I(i,j)
其中,I代表像素值(例如RGB值),(i,j)为像素点的坐标。
本申请实施例为每种牲畜训练一个第二预设类型识别模型,其训练过程 请参照上述关于电子装置1的详细介绍,在此不再赘述。
步骤S30,确定模块130根据所述待验证的身份标识与第一预设类型识别模型的映射关系,确定该身份标识对应的第一预设类型识别模型。本申请实施例为每头牲畜训练一个第一预设类型识别模型,即身份标识与第一预设类型识别模型存在一一对应的关系,确定模块130根据该一一对应的映射关系,确定所述待验证身份标识对应的第一预设类型识别模型。所述第一预设类型识别模型的训练过程请参照上述关于电子装置1的详细介绍,在此亦不做赘述。
步骤S40,识别模块140将所述待识别牲畜的面部照片的预设类型的特征向量输入确定的第一预设类型识别模型,输出识别结果。所述识别结果包括识别通过和识别失败,若识别失败,说明接收的面部照片和身份标识不匹配,若识别通过,则说明接收的身份标识为所述待识别牲畜的身份标识,接收的面部照片和身份标识对应于同一头牲畜。
本实施例提出的牲畜识别方法,通过接收待识别牲畜的面部照片和相应的待验证的身份标识,根据该身份标识确定对应的第一预设类型识别模型,将从所述待识别牲畜的面部照片中提取出的预设类型的特征向量输入该第一预设类型识别模型,输出识别通过或识别失败的识别结果。因为无须实地采样,通过网络即可完成信息传递,所以利用该牲畜识别方法可以实现对牲畜低成本、高效率的远程批量识别。
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质可以是硬盘、多媒体卡、SD卡、闪存卡、SMC、只读存储器(ROM)、可擦除可编程只读存储器(EPROM)、便携式紧致盘只读存储器(CD-ROM)、USB存储器等等中的任意一种或者几种的任意组合。所述计算机可读存储介质中存储有牲畜识别程序10,该牲畜识别程序10被所述处理器13执行时实现如下操作:
接收步骤:接收待识别牲畜的面部照片和相应的待验证的身份标识;
提取步骤:按照预先确定的特征向量提取算法,提取出该面部照片的预设类型的特征向量;
确定步骤:根据所述待验证的身份标识与第一预设类型识别模型的映射关系,确定该身份标识对应的第一预设类型识别模型;及
识别步骤:将所述待识别牲畜的面部照片的预设类型的特征向量输入确定的第一预设类型识别模型,输出识别结果。
本申请之计算机可读存储介质的具体实施方式与上述牲畜识别方法和电子装置1的具体实施方式大致相同,在此不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质中,包括若干指令用以使得服务器执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种牲畜识别方法,应用于电子装置,其特征在于,该方法包括:
    接收步骤:接收待识别牲畜的面部照片和相应的待验证的身份标识;
    提取步骤:按照预先确定的特征向量提取算法,提取出该面部照片的预设类型的特征向量;
    确定步骤:根据所述待验证的身份标识与第一预设类型识别模型的映射关系,确定该身份标识对应的第一预设类型识别模型;及
    识别步骤:将所述待识别牲畜的面部照片的预设类型的特征向量输入确定的第一预设类型识别模型,输出识别结果。
  2. 如权利要求1所述的牲畜识别方法,其特征在于,所述第一预设类型识别模型的训练过程包括如下步骤:
    A1、获取第一预设数量的某种牲畜的面部照片集合,为每头牲畜分配一个唯一的身份标识,其中,该种牲畜与所述待识别牲畜的种类相同,每头牲畜的面部照片集合包括第二预设数量的不同拍摄角度的面部照片,分配的身份标识中包括所述待验证的身份标识;
    A2、以某头牲畜的面部照片集合为正样本,其他面部照片集合为负样本,将该正、负样本面部照片集合分别分为第一预设比例的训练集和第二预设比例的验证集;
    A3、按照所述预先确定的特征向量提取算法,提取出所述训练集和验证集中每张面部照片的预设类型的特征向量;
    A4、利用训练集中各张面部照片的预设类型的特征向量和对应的身份标识对所述第一预设类型识别模型进行训练,得到该头牲畜的第一预设类型识别模型,利用验证集中各张面部照片的预设类型的特征向量和对应的身份标识对该第一预设类型识别模型的准确率进行验证;及
    A5、若准确率大于第一预设阈值,则训练完成,若准确率小于或等于第一预设阈值,则增加所述面部照片集合的数量,并基于增加的面部照片集合重新执行上述步骤。
  3. 如权利要求1所述的牲畜识别方法,其特征在于,所述预先确定的特征向量提取算法包括:
    根据所述待识别牲畜的种类与第二预设类型识别模型的映射关系,确定该种类牲畜对应的第二预设类型识别模型;
    利用训练好的对应的第二预设类型识别模型识别所述面部照片中牲畜面部所在的面部图像区域;
    对所述面部图像区域进行归一化处理;
    利用预先确定的梯度公式计算每个面部图像区域的梯度值;
    将每个面部图像区域切分为第三预设数量个图像单元,计算每个图像单元的梯度直方图;
    将所述图像单元按照在面部图像区域的位置组合成第四预设数量个图像区间,对所有图像区间进行对比度归一化;
    将各梯度直方图中的梯度模最大值按照对应图像单元在面部图像区域的位置组成每张面部照片的预设类型的特征向量。
  4. 如权利要求2所述的牲畜识别方法,其特征在于,所述预先确定的特征向量提取算法包括:
    根据所述待识别牲畜的种类与第二预设类型识别模型的映射关系,确定该种类牲畜对应的第二预设类型识别模型;
    利用训练好的对应的第二预设类型识别模型识别所述面部照片中牲畜面部所在的面部图像区域;
    对所述面部图像区域进行归一化处理;
    利用预先确定的梯度公式计算每个面部图像区域的梯度值;
    将每个面部图像区域切分为第三预设数量个图像单元,计算每个图像单元的梯度直方图;
    将所述图像单元按照在面部图像区域的位置组合成第四预设数量个图像区间,对所有图像区间进行对比度归一化;
    将各梯度直方图中的梯度模最大值按照对应图像单元在面部图像区域的位置组成每张面部照片的预设类型的特征向量。
  5. 如权利要求3或4所述的牲畜识别方法,其特征在于,所述第二预设类型识别模型的训练过程如下:
    B1、获取第五预设数量的某种牲畜的面部样本照片,每张面部样本照片中标注有面部图像区域,其中,该面部样本照片中的牲畜与所述待识别牲畜的种类相同;
    B2、将所述面部样本照片分为第一预设比例的训练集和第二预设比例的 验证集;
    B3、利用训练集中各张面部样本照片和对应的面部图像区域标注对所述第二预设类型识别模型进行训练,得到该种牲畜对应的第二预设类型识别模型,利用验证集中各张面部样本照片和对应的面部图像区域标注对该第二预设类型识别模型的准确率进行验证;
    B4、若准确率大于第一预设阈值,则训练完成,若验证率小于或等于第一预设阈值,则增加所述面部样本照片的数量,并基于增加的面部照片集合重新执行上述步骤。
  6. 如权利要求3所述的牲畜识别方法,其特征在于,所述预先确定的梯度公式为:
    G(x,y)=dx(i,j)+dy(i,j)
    dx(i,j)=I(i+1,j)-I(i,j)
    dy(i,j)=I(i,j+1)-I(i,j)
    其中,I代表像素值,(i,j)为像素点的坐标。
  7. 如权利要求4所述的牲畜识别方法,其特征在于,所述预先确定的梯度公式为:
    G(x,y)=dx(i,j)+dy(i,j)
    dx(i,j)=I(i+1,j)-I(i,j)
    dy(i,j)=I(i,j+1)-I(i,j)
    其中,I代表像素值,(i,j)为像素点的坐标。
  8. 一种电子装置,包括存储器和处理器,其特征在于,所述存储器中包括牲畜识别程序,该牲畜识别程序被所述处理器执行时实现如下步骤:
    接收步骤:接收待识别牲畜的面部照片和相应的待验证的身份标识;
    提取步骤:按照预先确定的特征向量提取算法,提取出该面部照片的预设类型的特征向量;
    确定步骤:根据所述待验证的身份标识与第一预设类型识别模型的映射关系,确定该身份标识对应的第一预设类型识别模型;及
    识别步骤:将所述待识别牲畜的面部照片的预设类型的特征向量输入确定的第一预设类型识别模型,输出识别结果。
  9. 如权利要求8所述的电子装置,其特征在于,所述第一预设类型识别 模型的训练过程包括如下步骤:
    A1、获取第一预设数量的某种牲畜的面部照片集合,为每头牲畜分配一个唯一的身份标识,其中,该种牲畜与所述待识别牲畜的种类相同,每头牲畜的面部照片集合包括第二预设数量的不同拍摄角度的面部照片,分配的身份标识中包括所述待验证的身份标识;
    A2、以某头牲畜的面部照片集合为正样本,其他面部照片集合为负样本,将该正、负样本面部照片集合分别分为第一预设比例的训练集和第二预设比例的验证集;
    A3、按照所述预先确定的特征向量提取算法,提取出所述训练集和验证集中每张面部照片的预设类型的特征向量;
    A4、利用训练集中各张面部照片的预设类型的特征向量和对应的身份标识对所述第一预设类型识别模型进行训练,得到该头牲畜的第一预设类型识别模型,利用验证集中各张面部照片的预设类型的特征向量和对应的身份标识对该第一预设类型识别模型的准确率进行验证;及
    A5、若准确率大于第一预设阈值,则训练完成,若准确率小于或等于第一预设阈值,则增加所述面部照片集合的数量,并基于增加的面部照片集合重新执行上述步骤。
  10. 如权利要求8所述的电子装置,其特征在于,所述预先确定的特征向量提取算法包括:
    根据所述待识别牲畜的种类与第二预设类型识别模型的映射关系,确定该种类牲畜对应的第二预设类型识别模型;
    利用训练好的对应的第二预设类型识别模型识别所述面部照片中牲畜面部所在的面部图像区域;
    对所述面部图像区域进行归一化处理;
    利用预先确定的梯度公式计算每个面部图像区域的梯度值;
    将每个面部图像区域切分为第三预设数量个图像单元,计算每个图像单元的梯度直方图;
    将所述图像单元按照在面部图像区域的位置组合成第四预设数量个图像区间,对所有图像区间进行对比度归一化;
    将各梯度直方图中的梯度模最大值按照对应图像单元在面部图像区域的 位置组成每张面部照片的预设类型的特征向量。
  11. 如权利要求9所述的电子装置,其特征在于,所述预先确定的特征向量提取算法包括:
    根据所述待识别牲畜的种类与第二预设类型识别模型的映射关系,确定该种类牲畜对应的第二预设类型识别模型;
    利用训练好的对应的第二预设类型识别模型识别所述面部照片中牲畜面部所在的面部图像区域;
    对所述面部图像区域进行归一化处理;
    利用预先确定的梯度公式计算每个面部图像区域的梯度值;
    将每个面部图像区域切分为第三预设数量个图像单元,计算每个图像单元的梯度直方图;
    将所述图像单元按照在面部图像区域的位置组合成第四预设数量个图像区间,对所有图像区间进行对比度归一化;
    将各梯度直方图中的梯度模最大值按照对应图像单元在面部图像区域的位置组成每张面部照片的预设类型的特征向量。
  12. 如权利要求10所述的电子装置,其特征在于,所述第二预设类型识别模型的训练过程如下:
    B1、获取第五预设数量的某种牲畜的面部样本照片,每张面部样本照片中标注有面部图像区域,其中,该面部样本照片中的牲畜与所述待识别牲畜的种类相同;
    B2、将所述面部样本照片分为第一预设比例的训练集和第二预设比例的验证集;
    B3、利用训练集中各张面部样本照片和对应的面部图像区域标注对所述第二预设类型识别模型进行训练,得到该种牲畜对应的第二预设类型识别模型,利用验证集中各张面部样本照片和对应的面部图像区域标注对该第二预设类型识别模型的准确率进行验证;
    B4、若准确率大于第一预设阈值,则训练完成,若验证率小于或等于第一预设阈值,则增加所述面部样本照片的数量,并基于增加的面部照片集合重新执行上述步骤。
  13. 如权利要求11所述的电子装置,其特征在于,所述第二预设类型识 别模型的训练过程如下:
    B1、获取第五预设数量的某种牲畜的面部样本照片,每张面部样本照片中标注有面部图像区域,其中,该面部样本照片中的牲畜与所述待识别牲畜的种类相同;
    B2、将所述面部样本照片分为第一预设比例的训练集和第二预设比例的验证集;
    B3、利用训练集中各张面部样本照片和对应的面部图像区域标注对所述第二预设类型识别模型进行训练,得到该种牲畜对应的第二预设类型识别模型,利用验证集中各张面部样本照片和对应的面部图像区域标注对该第二预设类型识别模型的准确率进行验证;
    B4、若准确率大于第一预设阈值,则训练完成,若验证率小于或等于第一预设阈值,则增加所述面部样本照片的数量,并基于增加的面部照片集合重新执行上述步骤。
  14. 如权利要求10所述的电子装置,其特征在于,所述预先确定的梯度公式为:
    G(x,y)=dx(i,j)+dy(i,j)
    dx(i,j)=I(i+1,j)-I(i,j)
    dy(i,j)=I(i,j+1)-I(i,j)
    其中,I代表像素值,(i,j)为像素点的坐标。
  15. 如权利要求11所述的电子装置,其特征在于,所述预先确定的梯度公式为:
    G(x,y)=dx(i,j)+dy(i,j)
    dx(i,j)=I(i+1,j)-I(i,j)
    dy(i,j)=I(i,j+1)-I(i,j)
    其中,I代表像素值,(i,j)为像素点的坐标。
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中包括牲畜识别程序,所述牲畜识别程序被处理器执行时,实现如下步骤:
    接收步骤:接收待识别牲畜的面部照片和相应的待验证的身份标识;
    提取步骤:按照预先确定的特征向量提取算法,提取出该面部照片的预设类型的特征向量;
    确定步骤:根据所述待验证的身份标识与第一预设类型识别模型的映射关系,确定该身份标识对应的第一预设类型识别模型;及
    识别步骤:将所述待识别牲畜的面部照片的预设类型的特征向量输入确定的第一预设类型识别模型,输出识别结果。
  17. 如权利要求16所述的计算机可读存储介质,其特征在于,所述第一预设类型识别模型的训练过程包括如下步骤:
    A1、获取第一预设数量的某种牲畜的面部照片集合,为每头牲畜分配一个唯一的身份标识,其中,该种牲畜与所述待识别牲畜的种类相同,每头牲畜的面部照片集合包括第二预设数量的不同拍摄角度的面部照片,分配的身份标识中包括所述待验证的身份标识;
    A2、以某头牲畜的面部照片集合为正样本,其他面部照片集合为负样本,将该正、负样本面部照片集合分别分为第一预设比例的训练集和第二预设比例的验证集;
    A3、按照所述预先确定的特征向量提取算法,提取出所述训练集和验证集中每张面部照片的预设类型的特征向量;
    A4、利用训练集中各张面部照片的预设类型的特征向量和对应的身份标识对所述第一预设类型识别模型进行训练,得到该头牲畜的第一预设类型识别模型,利用验证集中各张面部照片的预设类型的特征向量和对应的身份标识对该第一预设类型识别模型的准确率进行验证;及
    A5、若准确率大于第一预设阈值,则训练完成,若准确率小于或等于第一预设阈值,则增加所述面部照片集合的数量,并基于增加的面部照片集合重新执行上述步骤。
  18. 如权利要求16或17所述的计算机可读存储介质,其特征在于,所述预先确定的特征向量提取算法包括:
    根据所述待识别牲畜的种类与第二预设类型识别模型的映射关系,确定该种类牲畜对应的第二预设类型识别模型;
    利用训练好的对应的第二预设类型识别模型识别所述面部照片中牲畜面部所在的面部图像区域;
    对所述面部图像区域进行归一化处理;
    利用预先确定的梯度公式计算每个面部图像区域的梯度值;
    将每个面部图像区域切分为第三预设数量个图像单元,计算每个图像单元的梯度直方图;
    将所述图像单元按照在面部图像区域的位置组合成第四预设数量个图像区间,对所有图像区间进行对比度归一化;
    将各梯度直方图中的梯度模最大值按照对应图像单元在面部图像区域的位置组成每张面部照片的预设类型的特征向量。
  19. 如权利要求18所述的计算机可读存储介质,其特征在于,所述第二预设类型识别模型的训练过程如下:
    B1、获取第五预设数量的某种牲畜的面部样本照片,每张面部样本照片中标注有面部图像区域,其中,该面部样本照片中的牲畜与所述待识别牲畜的种类相同;
    B2、将所述面部样本照片分为第一预设比例的训练集和第二预设比例的验证集;
    B3、利用训练集中各张面部样本照片和对应的面部图像区域标注对所述第二预设类型识别模型进行训练,得到该种牲畜对应的第二预设类型识别模型,利用验证集中各张面部样本照片和对应的面部图像区域标注对该第二预设类型识别模型的准确率进行验证;
    B4、若准确率大于第一预设阈值,则训练完成,若验证率小于或等于第一预设阈值,则增加所述面部样本照片的数量,并基于增加的面部照片集合重新执行上述步骤。
  20. 如权利要求18所述的计算机可读存储介质,其特征在于,所述预先确定的梯度公式为:
    G(x,y)=dx(i,j)+dy(i,j)
    dx(i,j)=I(i+1,j)-I(i,j)
    dy(i,j)=I(i,j+1)-I(i,j)
    其中,I代表像素值,(i,j)为像素点的坐标。
PCT/CN2018/102117 2018-04-26 2018-08-24 牲畜识别方法、装置及存储介质 WO2019205375A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810386002.7 2018-04-26
CN201810386002.7A CN108830138B (zh) 2018-04-26 2018-04-26 牲畜识别方法、装置及存储介质

Publications (1)

Publication Number Publication Date
WO2019205375A1 true WO2019205375A1 (zh) 2019-10-31

Family

ID=64155595

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/102117 WO2019205375A1 (zh) 2018-04-26 2018-08-24 牲畜识别方法、装置及存储介质

Country Status (2)

Country Link
CN (1) CN108830138B (zh)
WO (1) WO2019205375A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111027754A (zh) * 2019-11-21 2020-04-17 亿利生态大数据有限公司 沙漠治理方法、装置、存储介质及电子设备
CN111028266A (zh) * 2019-12-16 2020-04-17 洛阳语音云创新研究院 畜禽盘点方法、装置、电子设备和存储介质
CN113379561A (zh) * 2021-05-28 2021-09-10 广州朗国电子科技有限公司 一种家禽数量的智能计算方法、设备及介质

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109583400A (zh) * 2018-12-05 2019-04-05 成都牧云慧视科技有限公司 一种用于牲畜身份无干预自动登记并识别的方法
CN109919005A (zh) * 2019-01-23 2019-06-21 平安科技(深圳)有限公司 牲畜身份识别方法、电子装置及可读存储介质
CN109886145B (zh) * 2019-01-29 2021-09-03 浙江泽曦科技有限公司 宠物脸部识别方法及系统
CN113128529A (zh) * 2019-12-30 2021-07-16 中移(成都)信息通信科技有限公司 牲畜身份识别模型训练方法、识别方法、系统及装置
CN111198549B (zh) * 2020-02-18 2020-11-06 湖南伟业动物营养集团股份有限公司 一种基于大数据的家禽养殖监测管理系统
RU2754095C1 (ru) * 2020-10-29 2021-08-26 Федеральное государственное бюджетное учреждение науки Институт проблем управления им. В.А. Трапезникова Российской академии наук Методика подготовки наборов фотографий для машинного анализа для персональной идентификации животных по морде
CN113052074A (zh) * 2021-03-25 2021-06-29 京东数科海益信息科技有限公司 用于记录牲畜饲喂信息的方法、装置、电子设备和介质
CN113723554B (zh) * 2021-09-07 2024-05-28 平安银行股份有限公司 模型调度方法、装置、电子设备及计算机可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101526944A (zh) * 2008-12-23 2009-09-09 广州乐庚信息科技有限公司 图像检索比对方法
CN101751565A (zh) * 2008-12-10 2010-06-23 中国科学院自动化研究所 融合二值图像与灰度图像的字符识别的方法
CN107766807A (zh) * 2017-09-30 2018-03-06 平安科技(深圳)有限公司 电子装置、投保牲畜识别方法和计算机可读存储介质
CN107766809A (zh) * 2017-10-09 2018-03-06 平安科技(深圳)有限公司 电子装置、票据信息识别方法和计算机可读存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103908219B (zh) * 2013-01-08 2016-07-06 荣晶生物科技股份有限公司 图像检测系统及获取图像的方法
KR101527801B1 (ko) * 2013-05-22 2015-06-11 주식회사 아이싸이랩 동물들의 코무늬를 이용한 동물 개체 인식 장치 및 방법
US9084411B1 (en) * 2014-04-10 2015-07-21 Animal Biotech Llc Livestock identification system and method
CN105631394B (zh) * 2015-05-29 2019-08-02 宇龙计算机通信科技(深圳)有限公司 虹膜信息采集方法、虹膜信息采集装置及终端
CN107256398B (zh) * 2017-06-13 2020-04-07 河北工业大学 基于特征融合的奶牛个体识别方法
CN107657459A (zh) * 2017-09-06 2018-02-02 翔创科技(北京)有限公司 牲畜的身份验证方法、保险理赔方法、溯源方法、存储介质和电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101751565A (zh) * 2008-12-10 2010-06-23 中国科学院自动化研究所 融合二值图像与灰度图像的字符识别的方法
CN101526944A (zh) * 2008-12-23 2009-09-09 广州乐庚信息科技有限公司 图像检索比对方法
CN107766807A (zh) * 2017-09-30 2018-03-06 平安科技(深圳)有限公司 电子装置、投保牲畜识别方法和计算机可读存储介质
CN107766809A (zh) * 2017-10-09 2018-03-06 平安科技(深圳)有限公司 电子装置、票据信息识别方法和计算机可读存储介质

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111027754A (zh) * 2019-11-21 2020-04-17 亿利生态大数据有限公司 沙漠治理方法、装置、存储介质及电子设备
CN111027754B (zh) * 2019-11-21 2023-11-17 亿利生态大数据有限公司 沙漠治理方法、装置、存储介质及电子设备
CN111028266A (zh) * 2019-12-16 2020-04-17 洛阳语音云创新研究院 畜禽盘点方法、装置、电子设备和存储介质
CN111028266B (zh) * 2019-12-16 2023-05-23 洛阳语音云创新研究院 畜禽盘点方法、装置、电子设备和存储介质
CN113379561A (zh) * 2021-05-28 2021-09-10 广州朗国电子科技有限公司 一种家禽数量的智能计算方法、设备及介质

Also Published As

Publication number Publication date
CN108830138A (zh) 2018-11-16
CN108830138B (zh) 2021-05-07

Similar Documents

Publication Publication Date Title
WO2019205375A1 (zh) 牲畜识别方法、装置及存储介质
WO2019061662A1 (zh) 电子装置、投保牲畜识别方法和计算机可读存储介质
WO2019109526A1 (zh) 人脸图像的年龄识别方法、装置及存储介质
CN109408631B (zh) 药品数据处理方法、装置、计算机设备和存储介质
WO2019200781A1 (zh) 票据识别方法、装置及存储介质
WO2019095571A1 (zh) 人物情绪分析方法、装置及存储介质
US11062124B2 (en) Face pose detection method, device and storage medium
WO2019033571A1 (zh) 面部特征点检测方法、装置及存储介质
WO2015165365A1 (zh) 一种人脸识别方法及系统
WO2019062080A1 (zh) 身份识别方法、电子装置及计算机可读存储介质
WO2019056793A1 (zh) 简历识别装置、方法及计算机可读存储介质
WO2018090641A1 (zh) 识别保险单号码的方法、装置、设备及计算机可读存储介质
WO2021042844A1 (zh) 大规模数据聚类方法、装置、计算机设备及计算机可读存储介质
WO2016015621A1 (zh) 人脸图片人名识别方法和系统
WO2019223147A1 (zh) 肝脏癌变定位方法、装置及存储介质
WO2019119396A1 (zh) 人脸表情识别方法及装置
WO2019033570A1 (zh) 嘴唇动作分析方法、装置及存储介质
CN112396005A (zh) 生物特征图像识别方法、装置、电子设备及可读存储介质
WO2019033568A1 (zh) 嘴唇动作捕捉方法、装置及存储介质
WO2019033567A1 (zh) 眼球动作捕捉方法、装置及存储介质
CN110956149A (zh) 宠物身份核验方法、装置、设备及计算机可读存储介质
WO2019136907A1 (zh) 动物疼痛指数判断方法、装置及存储介质
CN103810440B (zh) 存取系统及方法
WO2021068613A1 (zh) 面部识别方法、装置、设备及计算机可读存储介质
CN116311370A (zh) 一种基于多角度特征的牛脸识别方法及其相关设备

Legal Events

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

Ref document number: 18916839

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18916839

Country of ref document: EP

Kind code of ref document: A1