CN110402840B - Live pig monitoring terminal and live pig monitoring system based on image recognition - Google Patents
Live pig monitoring terminal and live pig monitoring system based on image recognition Download PDFInfo
- Publication number
- CN110402840B CN110402840B CN201910674698.8A CN201910674698A CN110402840B CN 110402840 B CN110402840 B CN 110402840B CN 201910674698 A CN201910674698 A CN 201910674698A CN 110402840 B CN110402840 B CN 110402840B
- Authority
- CN
- China
- Prior art keywords
- live pig
- module
- data
- live
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012544 monitoring process Methods 0.000 title claims abstract description 51
- 241000282887 Suidae Species 0.000 claims abstract description 33
- 238000003860 storage Methods 0.000 claims abstract description 30
- 238000012545 processing Methods 0.000 claims abstract description 10
- 238000004891 communication Methods 0.000 claims abstract description 7
- 238000004519 manufacturing process Methods 0.000 claims abstract description 7
- 239000010410 layer Substances 0.000 claims description 26
- 230000006399 behavior Effects 0.000 claims description 23
- 230000036541 health Effects 0.000 claims description 14
- 238000013527 convolutional neural network Methods 0.000 claims description 11
- 238000007726 management method Methods 0.000 claims description 11
- 238000007405 data analysis Methods 0.000 claims description 8
- 230000037406 food intake Effects 0.000 claims description 8
- 235000012631 food intake Nutrition 0.000 claims description 8
- 238000000034 method Methods 0.000 claims description 7
- 230000007246 mechanism Effects 0.000 claims description 6
- 238000003672 processing method Methods 0.000 claims description 6
- 239000000284 extract Substances 0.000 claims description 5
- 230000003287 optical effect Effects 0.000 claims description 5
- 238000012795 verification Methods 0.000 claims description 5
- 235000005809 Carpobrotus aequilaterus Nutrition 0.000 claims description 4
- 244000187801 Carpobrotus edulis Species 0.000 claims description 4
- 235000004550 Disphyma australe Nutrition 0.000 claims description 4
- 230000002159 abnormal effect Effects 0.000 claims description 4
- 210000000697 sensory organ Anatomy 0.000 claims description 4
- 238000004458 analytical method Methods 0.000 claims description 3
- 238000000605 extraction Methods 0.000 claims description 3
- 238000013186 photoplethysmography Methods 0.000 claims description 3
- 239000002356 single layer Substances 0.000 claims description 3
- 230000036760 body temperature Effects 0.000 claims description 2
- 230000008569 process Effects 0.000 claims description 2
- 230000033764 rhythmic process Effects 0.000 claims 3
- 238000001514 detection method Methods 0.000 claims 2
- 238000005259 measurement Methods 0.000 claims 2
- 238000005303 weighing Methods 0.000 claims 2
- 238000009395 breeding Methods 0.000 abstract description 11
- 230000001488 breeding effect Effects 0.000 abstract description 11
- 230000009286 beneficial effect Effects 0.000 abstract description 3
- 230000006806 disease prevention Effects 0.000 abstract description 2
- 230000006870 function Effects 0.000 description 8
- 238000011176 pooling Methods 0.000 description 6
- 235000015277 pork Nutrition 0.000 description 6
- 210000002569 neuron Anatomy 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 4
- 230000003993 interaction Effects 0.000 description 4
- 230000001105 regulatory effect Effects 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 3
- 206010000117 Abnormal behaviour Diseases 0.000 description 2
- 230000004913 activation Effects 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000011478 gradient descent method Methods 0.000 description 2
- 230000008676 import Effects 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 238000003307 slaughter Methods 0.000 description 2
- 244000025254 Cannabis sativa Species 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000037213 diet Effects 0.000 description 1
- 235000005911 diet Nutrition 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 235000021050 feed intake Nutrition 0.000 description 1
- 238000007667 floating Methods 0.000 description 1
- 230000003862 health status Effects 0.000 description 1
- 244000144972 livestock Species 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 235000013622 meat product Nutrition 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 230000036578 sleeping time Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- A—HUMAN NECESSITIES
- A01—AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
- A01K—ANIMAL HUSBANDRY; AVICULTURE; APICULTURE; PISCICULTURE; FISHING; REARING OR BREEDING ANIMALS, NOT OTHERWISE PROVIDED FOR; NEW BREEDS OF ANIMALS
- A01K11/00—Marking of animals
- A01K11/001—Ear-tags
- A01K11/004—Ear-tags with electronic identification means, e.g. transponders
-
- A—HUMAN NECESSITIES
- A01—AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
- A01K—ANIMAL HUSBANDRY; AVICULTURE; APICULTURE; PISCICULTURE; FISHING; REARING OR BREEDING ANIMALS, NOT OTHERWISE PROVIDED FOR; NEW BREEDS OF ANIMALS
- A01K11/00—Marking of animals
- A01K11/006—Automatic identification systems for animals, e.g. electronic devices, transponders for animals
-
- A—HUMAN NECESSITIES
- A01—AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
- A01K—ANIMAL HUSBANDRY; AVICULTURE; APICULTURE; PISCICULTURE; FISHING; REARING OR BREEDING ANIMALS, NOT OTHERWISE PROVIDED FOR; NEW BREEDS OF ANIMALS
- A01K29/00—Other apparatus for animal husbandry
- A01K29/005—Monitoring or measuring activity, e.g. detecting heat or mating
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01G—WEIGHING
- G01G17/00—Apparatus for or methods of weighing material of special form or property
- G01G17/08—Apparatus for or methods of weighing material of special form or property for weighing livestock
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01J—MEASUREMENT OF INTENSITY, VELOCITY, SPECTRAL CONTENT, POLARISATION, PHASE OR PULSE CHARACTERISTICS OF INFRARED, VISIBLE OR ULTRAVIOLET LIGHT; COLORIMETRY; RADIATION PYROMETRY
- G01J5/00—Radiation pyrometry, e.g. infrared or optical thermometry
- G01J5/0022—Radiation pyrometry, e.g. infrared or optical thermometry for sensing the radiation of moving bodies
- G01J5/0025—Living bodies
Landscapes
- Life Sciences & Earth Sciences (AREA)
- Environmental Sciences (AREA)
- Animal Husbandry (AREA)
- Biodiversity & Conservation Biology (AREA)
- Birds (AREA)
- Zoology (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Biophysics (AREA)
- Spectroscopy & Molecular Physics (AREA)
- Image Analysis (AREA)
- Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)
Abstract
The invention provides an image recognition-based live pig monitoring terminal and a live pig monitoring system, and belongs to the field of live pig breeding. The invention discloses an image recognition-based live pig monitoring terminal which comprises a first CPU (central processing unit), a storage module, a first communication module, a live pig video acquisition module, a sensor module and an image feature code production unit, wherein the first communication module, the live pig video acquisition module, the sensor module and the image feature code production unit are respectively connected with the first CPU and the storage module. The invention has the beneficial effects that: the optimal growth environment and disease prevention are created for the live pigs, and therefore the yield of the live pigs is improved.
Description
Technical Field
The invention relates to a live pig monitoring terminal, in particular to a live pig monitoring terminal and a live pig monitoring system based on image recognition.
Background
With the development of information technology, various intelligent devices are developed. The image recognition technology is applied to face payment, personal identity information verification and flower, grass and tree recognition by various high-tech great measures, and provides great cheapness for our lives.
The unprecedented development of economy leads people to increasingly meet the demand for pork and pay more attention to the health of the pork. According to the prediction of Ministry of agriculture, the consumption of meat products in China reaches 1 hundred million tons in 2020, and about 7.94 million pigs are listed for meeting the consumption requirement of live pigs alone, and the market transaction scale is far beyond 1.38 trillion yuan in 2016 at that time.
At present, live pig breeding still stays in the tradition stage, often depends on raiser's experience to live pig's health status, feed preference, food intake, weight etc. does not have scientific monitoring and management. The management of pork health often still adopts the ear tag nail, or the ear tag nail is implanted live pig internally, and these two are pure sign hardware, are limited to proving livestock identity only, do not have powerful database to record and inquiry management to the individual information of every live pig, and it is difficult to trace to the root of the pork of marketing.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a live pig monitoring terminal based on image recognition and a live pig monitoring system comprising the live pig monitoring terminal.
The live pig monitoring terminal comprises a first CPU and a storage module, a first communication module, a live pig video acquisition module, a sensor module and an image feature code production unit which are respectively connected with the first CPU and the storage module, wherein,
the sensor module is used for acquiring the growth parameters and the health condition of the live pigs,
the live pig video acquisition module is used for acquiring a live pig video,
the first CPU and the storage module are used for acquiring and storing growth parameters and health conditions of live pigs, acquiring live pig videos, processing the live pig videos, sending the processed live pig videos to the image feature code production unit, and then receiving and storing image feature code data streams returned by the image feature codes;
the image feature code is used for extracting important pixel points from each frame of image data in the processed live pig video and generating an image feature code data stream.
The invention is further improved, the sensor module comprises an infrared temperature sensor, a weight measuring sensor and an optical heart rate sensor, wherein the infrared temperature sensor is used for measuring the body temperature of the live pigs, a motor device is arranged in the monitoring terminal, the infrared temperature sensor is arranged on the motor device, the infrared temperature sensor scans each live pig in a traversing manner according to monitoring interval time set by a user, the weight measuring sensor is used for measuring the food intake and the weight of the live pigs, and the optical heart rate sensor is used for measuring the heart rate of the live pigs.
The invention is further improved, the weight measuring sensor is arranged under the floor of the trough position of the live pig, the weight measuring sensor is in wireless connection with the first CPU through the Bluetooth module, the weight is measured when the live pig eats, the weight is taken once again after the live pig eats, so that the food intake and the weight before and after the live pig eats are calculated, and the optical heart rate sensor adopts a photoplethysmography PPG to measure the heart rate of the live pig.
The invention is further improved, the first CPU and the storage module are provided with a data cache region for caching the previous frame of image data, the live pig video acquisition module acquires live pig video data, each frame of data is compared with the previous frame of data cached in the data cache region by the first CPU and the storage module firstly, if the frame of data is the same, the data is considered as redundant data and discarded, otherwise, the frame of data is transmitted to the image feature code extraction module and the data cache region is updated.
The invention also provides a live pig monitoring system comprising the live pig monitoring terminal, which comprises a server and a user terminal, wherein the server is respectively connected with the user terminal and the live pig monitoring terminal, the server comprises a second CPU and a storage module, and a second communication module, a central database module, an image identification module, a live pig behavior big data analysis module and a multi-user authority management module which are respectively connected with the second CPU and the storage module; the central database is used for storing all archive data of the live pigs, the live pig behavior big data analysis module is used for analyzing the live pigs according to behavior states and storing results in the central database, and the multi-user authority management module is used for setting authority of each type of user for inquiring information.
The invention is further improved and also comprises an early warning module, and when the analysis result of the live pig is abnormal, the early warning module gives an alarm or pushes early warning information to a corresponding user terminal.
The invention further improves the method, the image recognition module adopts a continuous learning mechanism of a convolutional neural network to construct a model and extract the identity information and the behavior state of the live pig, the image recognition module carries out recognition learning on the whole appearance of the live pig, the recognition verification adopts a mode of comparing the relative positions of five sense organs and each limb of the live pig face with the external characteristics, and the model comprises a convolutional layer and a convergence layer.
The invention is further improved, and the processing method of the convolution layer comprises the following steps:
a1: decomposing a live pig photo into a plurality of 3 x 3 pixel overlapped spliced image blocks;
a2: running each splicing image block in a simple single-layer convolutional neural network, keeping balance unchanged, and obtaining an image group consisting of the splicing image blocks;
a3: the contents of the various regions in the photograph are represented by numbers, including the height, width and color of the regions, and these output values are arranged in a set of graphs to obtain a three-dimensional numerical representation of each tile.
The invention is further improved, and the processing method of the convergence layer comprises the following steps:
b1: processing the three-dimensional image group to obtain a combined array only containing relatively important parts in the image;
b2: using the joint array as a conventional, omni-directionally connected convolutional neural network;
b3: and identifying the identity of the live pig in the image according to the output result.
Compared with the prior art, the invention has the beneficial effects that: (1) a data service channel between a culture unit and a user terminal is opened; the farmers can monitor the health condition, feed intake, feed preference and weight of the live pigs in real time, and predict slaughter time and the like, so that the live pig breeding yield is improved; (3) the support of data of more auspicious individual live pigs is provided between the raisers and the insurance institution, thereby facilitating the application of the raisers, reducing the risk and facilitating the insurance company to control and settle the claim of the risk according to the system; (4) the government regulatory department can trace the roots of each slaughtered live pig and ensure the health of pork in the market; (5) the traditional mode that ear tags are installed on live pigs or RFID chips are implanted into the live pigs is omitted, resources are saved, and meanwhile, the live pigs are not damaged physically.
Drawings
FIG. 1 is a schematic diagram of the system of the present invention;
FIG. 2 is a flow chart of interaction between a server and a live pig monitoring terminal according to the present invention;
fig. 3 is a flowchart illustrating the interaction between a server and a user terminal according to the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
As shown in fig. 1, the live pig monitoring system of the present invention is composed of a live pig monitoring terminal, a network transmission channel, a server, and a terminal application system.
The invention relates to a live pig monitoring terminal (monitoring terminal for short) which mainly comprises a CPU and a storage module, a live pig video acquisition module and an image feature code generation module which are respectively connected with the CPU and the storage module, wherein a sensor module, a network module and the live pig video acquisition module of the embodiment are Camera modules, the monitoring terminal is provided with a data buffer for caching the last frame of image data, the Camera modules acquire live pig video data at any time, each frame of data is firstly compared with the last frame of data cached by the CPU and the storage module and the data buffer, and if the frame of data is the same, the frame of data is considered as redundant data and is discarded. Otherwise, the data is transmitted to the image feature code extraction module and the data buffer is updated at the same time. This approach may greatly reduce transmission analysis and processing of invalid data.
The image characteristic code generating module of the embodiment extracts important pixel points according to a frame of image data to generate an image characteristic code data stream, so that network transmission and server operation burden can be reduced.
The sensor module that the monitoring terminal of this example contains mainly has infrared temperature sensor, weight sensor, optics heart rate sensor. The monitoring terminal is internally provided with a motor device, the infrared temperature sensor is arranged on the motor device, and each live pig is scanned in a traversing manner according to monitoring interval time set by a user, so that the temperature of the live pig is measured. The weight measuring sensor is installed under the pig manger position floor, and the weight measuring sensor passes through BLE (bluetooth) and terminal module to be connected, measures the weight when the live pig comes the feed, and the weight is once more got in the completion of feed, calculates the food intake of live pig like this and the weight of back before the feed. The optical heart rate sensor measures the heart rate of the live pig by adopting a photoplethysmography PPG. And finally, binding the data to the live pig image feature code and uploading the data to a server.
The server of the embodiment comprises a CPU and a storage module, a network module, a central database module, an image recognition module, a big pig behavior data analysis module and a multi-user authority management module, wherein the network module and the central database module are respectively connected with the CPU and the storage module.
The server receives image characteristic code data of the server transmitted by the monitoring terminal through the network module, and the CPU firstly distributes the data to the image recognition module to extract identity information and behavior states of the live pigs.
The image recognition module of this example adopts the incessant learning mechanism of convolutional neural network to construct the model and extract live pig's identity information and behavior state, and the image recognition module discerns the whole appearance of live pig and learns, and discernment verification adopts the mode of comparing live pig face five sense organs and each limbs relative position and external characteristics, the model contains convolution layer and layer of assembling.
The processing method of the convolutional layer comprises the following steps:
a1: decomposing a live pig photo into a plurality of 3 x 3 pixel overlapped spliced image blocks;
a2: and (4) operating each spliced graph block in a simple single-layer convolutional neural network, and keeping the balance unchanged to obtain a graph group consisting of the spliced graph blocks. Since the invention initially decomposes the original image into small images (in this case we decompose it into 3 x 3 pixel images), the convolutional neural network for image recognition also operates well;
a3: the contents of the various regions in the photograph are represented by numbers, including the height, width and color of the regions, and these output values are arranged in a set of graphs to obtain a three-dimensional numerical representation of each tile. If instead of a photograph of a live pig, a video is discussed, a four-dimensional numerical representation is obtained.
The processing method of the convergence layer comprises the following steps:
b1: the convergence layer combines the spatial dimension of the three-dimensional (or four-dimensional) image group output by the convolution layer with the sampling function to output a joint array only containing relatively important parts in the image. The joint array not only can minimize the calculation burden of the convolutional neural network, but also can effectively avoid the problem of overfitting;
b2: using the joint array as a conventional, omni-directionally connected convolutional neural network;
b3: and identifying the identity of the live pig in the image according to the output result.
The number of inputs can be greatly reduced by the convolutional layer and the convergence layer, so that the size of the obtained array can be completely processed by a normal common network, and the array can also keep the most important part in the original data. The output result of the last step finally shows how much the system has to make the judgment of 'the pig identity in the image', and the server can set that the pig identity in the image is more than a percent to pass the judgment.
After the CPU and the storage module acquire the identity information data of the live pig, the identity information data is searched in a central database, and if the identity information data is not searched, archive data is established for the live pig.
The CPU of the embodiment distributes the behavior state of the live pig identified by the image identification unit to the live pig behavior big data module, and analyzes whether the live pig is in a healthy state, a feeding preference, a feeding amount, sleeping time and the like. After results are analyzed by the pig behavior big data module, the CPU inserts the data into the central database to perform data storage and updating. If the live pigs have healthy or abnormal behaviors, the live pigs are immediately pushed to an end application program (a breeding organization) for early warning.
The user terminal of the embodiment is mainly used by farmers, insurance institutions and government regulatory departments. The three can actively inquire the information such as the scale, the health condition, the predicted slaughtering time, the breeding time and the like of the live pigs in real time. The three can register the live pig information concerned by the server, and the server pushes the new data immediately. The authority of each type of user for inquiring information can be set through a multi-user authority management module of the server.
The method utilizes an image recognition algorithm to establish an individualized file for each live pig from entering a breeding place, such as identity information, parents, birth date and the like; real-time monitoring, image recognition, big data analysis of live pig behaviors, intelligent monitoring of the health condition, eating preference, eating amount, weight and the like of each live pig are utilized; and a live pig query entrance is provided, and the individual information of the live pig can be obtained by only uploading a live pig picture to a live pig monitoring system by a user. Meanwhile, all live pig information of the current breeding place can be inquired according to the terminal application program, such as the number of live pigs about to be slaughtered in the month, the growth state of the live pigs and the like.
The method mainly utilizes artificial intelligence and an image recognition algorithm to monitor the health condition, feeding preference, food intake, weight and the like of each live pig, and carries out individual detailed management on the live pigs. And get through the data channels of farmers, insurance institutions and government regulatory departments. According to the information of the monitoring system, farmers create the best growing environment and disease prevention for live pigs, thereby improving the live pig yield. Clear data support is provided for insurance institutions and farmers to apply insurance claims to live pigs. The government regulatory department can trace the roots of each live pig which is released to the market according to the system, ensure the pork market quality and submit the supervision efficiency.
As a preferred embodiment of the invention, the image recognition module of the embodiment adopts Google cloud vision, which is a Google visual recognition API based on an open-source Tensorflow framework and adopts a REST API. The specific treatment process comprises the following steps:
1. first reading of a data set, and data predefinition
from tensorflow.examples.tutorials.mnist import input_data
import tensorflow as tf
Read MNIST dataset
mnist=input_data.read_data_sets('MNIST_data',one_hot=True)
sess=tf.InteractiveSession()
# predefines an input value X, an output true value Y, placeholder being a placeholder
x=tf.placeholder(tf.float32,shape=[None,784])
y=tf.placeholder(tf.float32,shape=[None,10])
keep_prob=tf.placeholder(tf.float32)
x_image=tf.reshape(x,[-1,28,28,1])
MNIST is a very classic data set for image recognition of Google, x and y are represented by placeholders, when a program runs to a certain instruction, specific values are transmitted to x and y, the program can be substituted for calculation, and keep _ prob is a value for changing the number of neurons participating in calculation.
2. Function of weight and offset value
3. Convolution function, pooling function definition
The input x is the picture information matrix, w is the value of the convolution kernel, the strings parameters in the convolution layer conv2d () function require that the first and last parameters must be 1, the second parameter represents the step size of each shift of the convolution kernel to the right. The third parameter represents the step size of each downward shift of the convolution kernel.
4. First convolution + pooling
# convolution kernel 1: patch is 5 × 5; in size 1; out size 32; activation function reLU non-linear processing
w_conv1=weight_variable([5,5,1,32])
b_conv1=bias_variable([32])
h_conv1=tf.nn.relu(conv2d(x_image,W_conv1)+b_conv1)#output size 28*28*32
Definition of network structure of h _ pool1 ═ max _ pool _2x2(h _ conv1) # output size 14 × 32# convolution layer 2
The convolution kernel size here is 5 × 5, the number of input channels is 1, the number of output channels is 32, the value of the convolution kernel here is equivalent to a weight value, and is obtained by means of random number sequence generation, and then the picture size is 14 × 32 after the first pooling (the pooling step size is 2).
5. Second convolution + pooling
# convolution kernel 2: patch is 5 × 5; in size 32; out size 64; activation function reLU non-linear processing
w_conv2=weight_variable([5,5,32,64])
b_conv2=bias_variable([64])
h_conv2=tf.nn.relu(conv2d(h_pool1,W_conv2)+b_conv2) #output size14*14*64
h_pool2=max_pool_2x2(h_conv2) #output size 7*7*64
Here, the convolution kernel size is also 5 × 5, the number of input channels is 32, and the number of output channels is 64.
6. Full connection layer 1, full connection layer 2
# fully Linked layer 1
W_fc1=weight_variable([7*7*64,1024])
b_fc1=bias_variable([1024])
h_pool2_flat = tf.reshape(h_pool2, [-1,7*7*64])#[n_samples,7,7,64]->>[n_samples,7*7*64]
h_fc1=tf.nn.relu(tf.matmul(h_pool2_flat,W_fc1)+b_fc1)
h _ fc1_ drop ═ tf.nn. drop (h _ fc1, keep _ prob) # reduces the amount of computation drop
# fully-Linked layer 2
W_fc2=weight_variable([1024,10])
b_fc2=bias_variable([10])
prediction=tf.matmul(h_fc1_drop,W_fc2)+b_fc2
The input of the fully-connected layer is the output after the second pooling, the size is 7 × 64, the fully-connected layer 1 has 1024 neurons, and tf. The weights are adjusted each time only a portion of the neurons are involved in the task. Only when keep _ prob is 1, all neurons participate in the work, the fully connected layer 2 has 10 neurons, which is equivalent to the generated classifier, and the obtained prediction value is stored in the prediction through the fully connected layers 1 and 2.
7. Optimizing and calculating accuracy rate by gradient descent method
Second order cost function, error between predicted value and true value
loss=tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(labels=y_,logits=prediction))
The # gradient descent method is characterized in that the data is too large, and an AdamaOptizer optimizer is selected
train_step=tf.train.AdamOptimizer(1e-4).minimize(loss)
The # results are stored in a Boolean-type list
correct_prediction=tf.equal(tf.argmax(prediction,1),tf.argmax(y_,1))
Accuracy rate of # determination
accuracy=tf.reduce_mean(tf.cast(correct_prediction,tf.float32))
Since the data set is too large, the optimizer used here is AdamaOptizer, the learning rate is 1e-4, tf. argmax (prediction,1) returns the predicted tag value for any input x, and tf. argmax (y _,1) represents the correct tag value
The correct _ prediction here returns a boolean array. To calculate the accuracy of our classification, we convert the boolean value to a floating point number to represent the true-and-false and then take the average. For example: [ True, False, True ] becomes [1,0,1,1], and the calculation accuracy is 0.75.
Google cloud vision contains a fairly comprehensive set of tags that can detect individual objects. Generally, live pigs have less variation in physical characteristics, unlike humans (which may make up or wear changes), and have a small range of motion. Therefore, face recognition is mainly adopted, unlike humans. The continuous learning mechanism of AI neural network is utilized in live pig identification, and the whole appearance of live pig is discerned and is learned to the image recognition module, and the mode that compares can be adopted to live pig face five sense organs and each limbs relative position and external feature to discernment verification, and along with AI neural network's learning degree is deepened, the recognition rate can be higher and higher.
The user terminal using groups of the embodiment mainly comprise breeding organizations, insurance organizations and government monitoring departments, the terminal application program needs to register identity with the server, and the authority management module of the server divides the authority of each type of users.
The raiser can immediately receive the prompt of the server when the raised live pig has abnormal behavior by installing the terminal application program on the mobile phone and the PC, and can also inquire the state of the live pig on the application program, such as whether the live pig diet is enough or not in the current season, whether the environment in which the live pig is positioned is beneficial to the information of the rapid growth of the live pig or not.
The insurance mechanism can confirm the identity of the live pig through a terminal application program, and whether to apply insurance or not. Through big data on the server, the insurance agency has accurate data to support the application and settlement of the live pigs.
The government supervision department can inquire which breeding organization the live pig comes from, health conditions and the like by scanning the live pig through a terminal application program.
As shown in fig. 2, the method for interaction between the monitoring terminal and the server data logic service in this embodiment is as follows:
(1) the monitoring terminal Camera module acquires a frame of live pig image data, and if the frame of live pig image data is at the time point of acquiring the live pig vital physique set by a user, the monitoring terminal adjusts the angles of a Camera and a sensor by using an internal motor device, scans and traverses the live pigs one by one, and acquires the live pig vital sign data;
(2) and the CPU and the storage module confirm whether the image data of the current frame is consistent with the data buffer cache, if so, the behavior and activity state of the live pig is not changed, and the image data of the frame is discarded. Otherwise, updating the data buffer by using the frame of image data, and simultaneously distributing the data buffer to the image feature code module;
(3) the image characteristic code module extracts key data information of a frame of image, generates an image characteristic code data stream and sends the image characteristic code data stream to the CPU and the storage module;
(4) the CPU and the storage module transmit the extracted image characteristic data flow to a server through a network module;
(5) the server CPU and the storage module acquire a frame of image characteristic data and distribute the data to the image recognition unit to recognize the identity and behavior information of the live pig;
(6) the server CPU and the storage module retrieve the central database after acquiring the identity of the live pig identified by the image identification unit, and if the live pig is a new member, a file is established for the live pig to generate a unique ID code. Identity information and behavior data information of the live pigs are transmitted to a live pig behavior big data analysis module;
(7) the big data analysis module of the live pig behavior analyzes whether the current state of the live pig is healthy, eating preference, food intake, weight information, whether the current environment utilizes the live pig growth and the like according to the live pig behavior recognized by the image recognition unit and the reported sensor data. And if the abnormal condition exists, pushing abnormal information to a terminal application program module (a breeding unit and an insurance mechanism).
(8) The CPU and the storage module store the data analyzed by the big pig behavior data module into a central database.
As shown in fig. 3, the method for logical service interaction between the user terminal and the server in this embodiment is as follows:
(1) the user can be a breeding unit, an insurance agency and a government supervision department, and the three can inquire the live pig information from the server by means of direct inquiry or live pig picture shooting and the like according to respective business requirements;
(2) the server authority module confirms whether the current user has authority, belongs to one type of user authority or two types of user authority, and if the authority is not approved, access is refused. Otherwise, returning the corresponding pig information to the requesting user according to the authority of the current user.
The above-described embodiments are intended to be illustrative, and not restrictive, of the invention, and all changes that come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.
Claims (9)
1. The utility model provides a live pig monitor terminal based on image recognition which characterized in that: comprises a first CPU and a storage module, a first communication module, a live pig video acquisition module, a sensor module and an image feature code production unit which are respectively connected with the first CPU and the storage module, wherein,
the sensor module is used for acquiring the growth parameters and the health condition of the live pigs,
the live pig video acquisition module is used for acquiring a live pig video,
the first CPU and the storage module are used for acquiring and storing growth parameters and health conditions of live pigs, acquiring live pig videos, processing the live pig videos, sending the processed live pig videos to the image feature code production unit, and then receiving and storing image feature code data streams returned by the image feature codes;
the image feature code is used for extracting important pixel points from each frame of image data in the processed live pig video to generate an image feature code data stream,
the live pig video processing process comprises the following steps: and comparing each frame of data with the previous frame of data, if the data are the same, determining redundant data, discarding and processing the data, and otherwise, sending the frame of data to the image feature code production unit.
2. The live pig monitoring terminal of claim 1, wherein: the sensor module includes infrared temperature sensor, check weighing sensor, optics rhythm of heart sensor, wherein, infrared temperature sensor is used for measuring live pig body temperature, the inside motor means that is equipped with of monitor terminal, infrared temperature sensor sets up on motor means, infrared temperature sensor is according to the monitoring interval time that the user set up, and every live pig of traverse scan, the check weighing sensor is used for measuring live pig food intake and live pig weight, optics rhythm of heart sensor is used for measuring the live pig rhythm of heart.
3. The live pig monitoring terminal of claim 2, wherein: the weight measurement sensor is installed under the pig crib position floor, and the weight measurement sensor passes through bluetooth module and first CPU wireless connection, measures the weight when the live pig comes the feed, and the weight is once more got in the completion of feed to calculate live pig's food intake and back weight before the feed, optical heart rate sensor adopts the photoplethysmography PPG to measure live pig heart rate.
4. The live pig monitoring terminal according to any one of claims 1-3, wherein: the first CPU and the storage module are provided with a data cache region for caching the previous frame of image data, the live pig video acquisition module acquires live pig video data, each frame of data is compared with the previous frame of data cached in the data cache region by the first CPU and the storage module, if the frame of data is the same, redundant data is considered, the redundant data is discarded, and if the frame of data is not the same, the frame of data is transmitted to the image feature code extraction module and the data cache region is updated.
5. A live pig monitoring system comprising the live pig monitoring terminal of any one of claims 1-4, wherein: the system comprises a server and a user terminal, wherein the server is respectively connected with the user terminal and a live pig monitoring terminal, the server comprises a second CPU and a storage module, and a second communication module, a central database module, an image recognition module, a live pig behavior big data analysis module and a multi-user authority management module which are respectively connected with the second CPU and the storage module, the second CPU and the storage module are connected with the live pig detection terminal through the second communication module, the second CPU and the storage module are used for acquiring image feature codes, growth parameters and health conditions uploaded by the live pig detection terminal and then sending the image feature codes, the growth parameters and the health conditions to the image recognition module, and the image recognition module is used for extracting identity information and behavior states of a live pig according to the acquired information; the central database is used for storing all archive data of the live pigs, the live pig behavior big data analysis module is used for analyzing the live pigs according to behavior states and storing results in the central database, and the multi-user authority management module is used for setting authority of each type of user for inquiring information.
6. The live pig monitoring system of claim 5, wherein: the pig monitoring system also comprises an early warning module, and when the analysis result of the live pig is abnormal, the pig monitoring system gives an alarm or pushes early warning information to a corresponding user terminal.
7. The live pig monitoring system according to claim 5 or 6, wherein: the image recognition module adopts the continuous learning mechanism of convolutional neural network to construct the model and extract the identity information and the behavior state of the live pig, the image recognition module recognizes and learns the whole appearance of the live pig, the recognition verification adopts the mode of comparing the relative positions of the five sense organs of the live pig face and each limb and the external characteristics, and the model comprises a convolutional layer and a convergence layer.
8. The live pig monitoring system of claim 7, wherein: the processing method of the convolutional layer comprises the following steps:
a1: decomposing a live pig photo into a plurality of 3 x 3 pixel overlapped spliced image blocks;
a2: running each splicing image block in a simple single-layer convolutional neural network, keeping balance unchanged, and obtaining an image group consisting of the splicing image blocks;
a3: the contents of the various regions in the photograph are represented by numbers, including the height, width and color of the regions, and these output values are arranged in a set of graphs to obtain a three-dimensional numerical representation of each tile.
9. The live pig monitoring system of claim 8, wherein: the processing method of the convergence layer comprises the following steps:
b1: processing the three-dimensional image group to obtain a combined array only containing relatively important parts in the image;
b2: using the joint array as a conventional, omni-directionally connected convolutional neural network;
b3: and identifying the identity of the live pig in the image according to the output result.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910674698.8A CN110402840B (en) | 2019-07-25 | 2019-07-25 | Live pig monitoring terminal and live pig monitoring system based on image recognition |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910674698.8A CN110402840B (en) | 2019-07-25 | 2019-07-25 | Live pig monitoring terminal and live pig monitoring system based on image recognition |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110402840A CN110402840A (en) | 2019-11-05 |
CN110402840B true CN110402840B (en) | 2021-12-17 |
Family
ID=68363000
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910674698.8A Active CN110402840B (en) | 2019-07-25 | 2019-07-25 | Live pig monitoring terminal and live pig monitoring system based on image recognition |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110402840B (en) |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110741963B (en) * | 2019-10-16 | 2021-11-02 | 北京海益同展信息科技有限公司 | Object state monitoring and sow oestrus monitoring method, device and system |
CN112748755B (en) * | 2019-10-30 | 2022-06-03 | 山东科技大学 | Temperature control device based on visual identification |
CN113052197B (en) * | 2019-12-28 | 2024-03-12 | 中移(成都)信息通信科技有限公司 | Method, device, equipment and medium for identity recognition |
CN111264405A (en) * | 2020-02-19 | 2020-06-12 | 北京海益同展信息科技有限公司 | Feeding method, system, device, equipment and computer readable storage medium |
CN111626205A (en) * | 2020-05-27 | 2020-09-04 | 电子科技大学 | Pig health management system and method based on pig face identification and RFID identification |
CN111713427B (en) * | 2020-06-23 | 2021-10-22 | 湖南华乐食品有限公司 | Suckling pig health condition monitoring system |
CN112183487A (en) * | 2020-11-03 | 2021-01-05 | 广东南牧机械设备有限公司 | Livestock health monitoring system and method based on 5G |
CN112568141A (en) * | 2020-12-09 | 2021-03-30 | 东莞中融数字科技有限公司 | Supervision system for preventing diseases of pigs |
CN113197116A (en) * | 2021-05-07 | 2021-08-03 | 青岛不愁网信息科技有限公司 | Live pig health monitoring and slaughter time evaluation method, terminal device and storage medium |
CN113711992B (en) * | 2021-08-16 | 2022-07-05 | 佛山职业技术学院 | Method and system for acquiring growth state of live pig |
CN113598081B (en) * | 2021-08-19 | 2022-08-19 | 安徽大学 | Beef cattle health automatic monitoring system |
CN113673472A (en) * | 2021-08-31 | 2021-11-19 | 联通(广东)产业互联网有限公司 | Intelligent pig information acquisition system |
CN115250952A (en) * | 2022-08-18 | 2022-11-01 | 深圳进化动力数码科技有限公司 | Live pig health monitoring method, device, equipment and storage medium |
CN115968810B (en) * | 2023-03-21 | 2023-06-27 | 双胞胎(集团)股份有限公司 | Identification method and identification system for epidemic pigs |
Citations (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102348115A (en) * | 2010-08-02 | 2012-02-08 | 南京壹进制信息技术有限公司 | Method and device for removing redundant images from video |
CN103248703A (en) * | 2013-05-16 | 2013-08-14 | 中国农业大学 | Automatic monitoring system and method for live pig action |
CN103576632A (en) * | 2012-08-07 | 2014-02-12 | 南京财经大学 | Live pig growth environment monitoring and control system based on internet of things technology |
CN104378186A (en) * | 2014-10-31 | 2015-02-25 | 南京南瑞继保电气有限公司 | Network redundant data processing methods, devices and system |
CN104835002A (en) * | 2015-04-30 | 2015-08-12 | 合肥林晨信息科技有限公司 | Automatic tracking supervision system for culturing farm animal individual growth processes |
CN105705009A (en) * | 2013-08-13 | 2016-06-22 | 雀巢产品技术援助有限公司 | System, method and feeding device for remote pet monitoring and feeding |
WO2016181604A1 (en) * | 2015-05-12 | 2016-11-17 | ソニー株式会社 | Livestock management system, sensor device, and method for estimating status of livestock |
CN106774540A (en) * | 2016-12-01 | 2017-05-31 | 上海工程技术大学 | A kind of intelligent culture control system and method based on video identification |
KR20170084834A (en) * | 2016-01-13 | 2017-07-21 | 전주기전대학 산학협력단 | Cattle Shed Management System in mobile cloud environment by using IoT data |
CN107015977A (en) * | 2016-01-27 | 2017-08-04 | 肖翩 | A kind of intelligent tutoring system |
CN107426488A (en) * | 2017-05-05 | 2017-12-01 | 北京农业信息技术研究中心 | Broiler chicken limping automatic monitoring method and device |
CN107439477A (en) * | 2017-08-30 | 2017-12-08 | 张爱军 | It is a kind of based on the interactive pig-breeding system and cultural method for tracing system |
CN107836373A (en) * | 2017-09-19 | 2018-03-27 | 浙江大学城市学院 | A kind of internet of things data acquisition device of colony house sheep raising feeding feed |
CN108090426A (en) * | 2017-12-07 | 2018-05-29 | 江苏大学 | A kind of group rearing pig personal identification method based on machine vision |
CN108363990A (en) * | 2018-03-14 | 2018-08-03 | 广州影子控股股份有限公司 | One boar face identifying system and method |
CN108507611A (en) * | 2018-03-04 | 2018-09-07 | 天津众阳科技有限公司 | Live pig health and living or death condition monitoring system based on real-time physiological parameter and method |
CN108925446A (en) * | 2018-09-04 | 2018-12-04 | 江西农业大学 | A kind of live pig healthy aquaculture intelligence system |
CN109258509A (en) * | 2018-11-16 | 2019-01-25 | 太原理工大学 | A kind of live pig abnormal sound intelligent monitor system and method |
CN109344688A (en) * | 2018-08-07 | 2019-02-15 | 江苏大学 | The automatic identifying method of people in a kind of monitor video based on convolutional neural networks |
CN109644891A (en) * | 2018-12-25 | 2019-04-19 | 江苏大学 | A kind of pig growth key parameter monitoring system and method based on NB-IoT |
CN109670398A (en) * | 2018-11-07 | 2019-04-23 | 北京农信互联科技集团有限公司 | Pig image analysis method and pig image analysis equipment |
CN110414305A (en) * | 2019-04-23 | 2019-11-05 | 苏州闪驰数控系统集成有限公司 | Artificial intelligence convolutional neural networks face identification system |
-
2019
- 2019-07-25 CN CN201910674698.8A patent/CN110402840B/en active Active
Patent Citations (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102348115A (en) * | 2010-08-02 | 2012-02-08 | 南京壹进制信息技术有限公司 | Method and device for removing redundant images from video |
CN103576632A (en) * | 2012-08-07 | 2014-02-12 | 南京财经大学 | Live pig growth environment monitoring and control system based on internet of things technology |
CN103248703A (en) * | 2013-05-16 | 2013-08-14 | 中国农业大学 | Automatic monitoring system and method for live pig action |
CN105705009A (en) * | 2013-08-13 | 2016-06-22 | 雀巢产品技术援助有限公司 | System, method and feeding device for remote pet monitoring and feeding |
CN104378186A (en) * | 2014-10-31 | 2015-02-25 | 南京南瑞继保电气有限公司 | Network redundant data processing methods, devices and system |
CN104835002A (en) * | 2015-04-30 | 2015-08-12 | 合肥林晨信息科技有限公司 | Automatic tracking supervision system for culturing farm animal individual growth processes |
WO2016181604A1 (en) * | 2015-05-12 | 2016-11-17 | ソニー株式会社 | Livestock management system, sensor device, and method for estimating status of livestock |
KR20170084834A (en) * | 2016-01-13 | 2017-07-21 | 전주기전대학 산학협력단 | Cattle Shed Management System in mobile cloud environment by using IoT data |
CN107015977A (en) * | 2016-01-27 | 2017-08-04 | 肖翩 | A kind of intelligent tutoring system |
CN106774540A (en) * | 2016-12-01 | 2017-05-31 | 上海工程技术大学 | A kind of intelligent culture control system and method based on video identification |
CN107426488A (en) * | 2017-05-05 | 2017-12-01 | 北京农业信息技术研究中心 | Broiler chicken limping automatic monitoring method and device |
CN107439477A (en) * | 2017-08-30 | 2017-12-08 | 张爱军 | It is a kind of based on the interactive pig-breeding system and cultural method for tracing system |
CN107836373A (en) * | 2017-09-19 | 2018-03-27 | 浙江大学城市学院 | A kind of internet of things data acquisition device of colony house sheep raising feeding feed |
CN108090426A (en) * | 2017-12-07 | 2018-05-29 | 江苏大学 | A kind of group rearing pig personal identification method based on machine vision |
CN108507611A (en) * | 2018-03-04 | 2018-09-07 | 天津众阳科技有限公司 | Live pig health and living or death condition monitoring system based on real-time physiological parameter and method |
CN108363990A (en) * | 2018-03-14 | 2018-08-03 | 广州影子控股股份有限公司 | One boar face identifying system and method |
CN109344688A (en) * | 2018-08-07 | 2019-02-15 | 江苏大学 | The automatic identifying method of people in a kind of monitor video based on convolutional neural networks |
CN108925446A (en) * | 2018-09-04 | 2018-12-04 | 江西农业大学 | A kind of live pig healthy aquaculture intelligence system |
CN109670398A (en) * | 2018-11-07 | 2019-04-23 | 北京农信互联科技集团有限公司 | Pig image analysis method and pig image analysis equipment |
CN109258509A (en) * | 2018-11-16 | 2019-01-25 | 太原理工大学 | A kind of live pig abnormal sound intelligent monitor system and method |
CN109644891A (en) * | 2018-12-25 | 2019-04-19 | 江苏大学 | A kind of pig growth key parameter monitoring system and method based on NB-IoT |
CN110414305A (en) * | 2019-04-23 | 2019-11-05 | 苏州闪驰数控系统集成有限公司 | Artificial intelligence convolutional neural networks face identification system |
Also Published As
Publication number | Publication date |
---|---|
CN110402840A (en) | 2019-11-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110402840B (en) | Live pig monitoring terminal and live pig monitoring system based on image recognition | |
CN110414305A (en) | Artificial intelligence convolutional neural networks face identification system | |
US11910784B2 (en) | Animal visual identification, tracking, monitoring and assessment systems and methods thereof | |
CN106577350A (en) | Method and device for recognizing pet type | |
CN112101259A (en) | Single pig body posture recognition system and method based on stacked hourglass network | |
CN114898405B (en) | Portable broiler chicken anomaly monitoring system based on edge calculation | |
CN112507770B (en) | Rice disease and insect pest identification method and system | |
KR101905134B1 (en) | System for communicating with a cat | |
CN116935439A (en) | Automatic monitoring and early warning method and automatic monitoring and early warning system for delivery of pregnant sheep | |
Gong et al. | Sika Deer Behavior Recognition Based on Machine Vision. | |
Hicks et al. | Deep learning object detection to estimate the nectar sugar mass of flowering vegetation | |
JP7360496B2 (en) | Judgment system | |
Hitelman et al. | The effect of age on young sheep biometric identification | |
Han et al. | Mask_LaC R-CNN for measuring morphological features of fish | |
CN116263949A (en) | Weight measurement method, device, equipment and storage medium | |
Chen et al. | Artificial intelligence for image processing in agriculture | |
McDaid et al. | Using deep learning for facial recognition: Implementing a convolutional siamese neural network in a facial recognition system for cattle | |
Prop et al. | Identifying individual polar bears at safe distances: A test with captive animals | |
CN115272943B (en) | Livestock and poultry feeding abnormity identification method based on data processing | |
CN113256313B (en) | Food traceability system and method based on block chain | |
Markov et al. | Digital management of technological processes in cattle farms: a review | |
Montout | Prediction of poor health in small ruminants and companion animals with accelerometers and machine learning | |
JP2022184223A (en) | Pet sales price determination system and pet sales determination method | |
Xi et al. | Individual identification of dairy cows based on Gramian Angular Field and Migrating Convolutional Neural Networks | |
CN116579576A (en) | Intelligent decision aquaculture tracing method and system based on blockchain |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |