WO2021000423A1 - Pig weight measurement method and apparatus - Google Patents

Pig weight measurement method and apparatus Download PDF

Info

Publication number
WO2021000423A1
WO2021000423A1 PCT/CN2019/104332 CN2019104332W WO2021000423A1 WO 2021000423 A1 WO2021000423 A1 WO 2021000423A1 CN 2019104332 W CN2019104332 W CN 2019104332W WO 2021000423 A1 WO2021000423 A1 WO 2021000423A1
Authority
WO
WIPO (PCT)
Prior art keywords
pig
measured
key point
hip
body length
Prior art date
Application number
PCT/CN2019/104332
Other languages
French (fr)
Chinese (zh)
Inventor
王健宗
凡金龙
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021000423A1 publication Critical patent/WO2021000423A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01GWEIGHING
    • G01G17/00Apparatus for or methods of weighing material of special form or property
    • G01G17/08Apparatus for or methods of weighing material of special form or property for weighing livestock

Definitions

  • This application relates to the field of artificial intelligence technology, and in particular to a method and device for measuring pig weight.
  • the weight of live pigs is the most important value to measure whether the live pigs meet the slaughter standard and estimate the expected income.
  • the weighing of live pigs with a body scale is cumbersome and consumes too much labor and time costs, especially in large-scale In pig farms, the workload of measuring pig weights one by one will be huge. However, the accuracy of visually measuring the weight of pigs is often low.
  • the embodiments of the present application provide a method and device for measuring pig weight to solve the problem of low accuracy in measuring the weight of pigs visually in the prior art.
  • a method for measuring the weight of a live pig comprising: acquiring a video image of the live pig to be measured;
  • a live pig weight measurement device includes: an acquisition unit for acquiring a video image of a pig to be measured; an input unit for converting the video image Input the pre-trained key point detection model to obtain the key point heat map and key point position information of the pig to be measured output by the model; the matching unit is used for matching according to the key point position information to obtain multiple preset keys Points; a first calculation unit for calculating the hip width, hip height, and body length of the pig to be measured according to preset key points of the pig to be measured; a second calculation unit for calculating the hip width, hip height, and body length of the pig to be measured The hip height and the body length calculate the volume of the pig to be measured; the third calculation unit is used to input the hip width, the hip height, the body length and the volume into a preset pig weight regression model to calculate The weight prediction value of the pig to be measured.
  • a computer device including a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor executes all The computer program realizes the above-mentioned method for measuring pig weight.
  • a computer non-volatile storage medium includes a stored program.
  • the program When the program is running, the device where the storage medium is located is controlled to execute the above-mentioned live pig. Weight measurement method.
  • FIG. 1 is a flowchart of an optional method for measuring pig weight according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of preset key points of pigs provided by an embodiment of the present application.
  • Figure 3 is a schematic diagram of an optional live pig weight measurement device provided by an embodiment of the present application.
  • Fig. 4 is a schematic diagram of an optional computer device provided by an embodiment of the present application.
  • first, second, third, etc. may be used to describe terminals in the embodiments of the present application, these terminals should not be limited to these terms. These terms are only used to distinguish terminals from each other.
  • the first terminal may also be referred to as the second terminal, and similarly, the second terminal may also be referred to as the first terminal.
  • the word “if” as used herein can be interpreted as “when” or “when” or “in response to determination” or “in response to detection”.
  • the phrase “if determined” or “if detected (statement or event)” can be interpreted as “when determined” or “in response to determination” or “when detected (statement or event) )” or “in response to detection (statement or event)”.
  • Fig. 1 is a flowchart of a method for measuring pig weight according to an embodiment of the present application. As shown in Fig. 1, the method includes:
  • Step S101 Obtain a video image of the pig to be measured.
  • the video image includes 200 frames of images.
  • the number of frames of the video image can be appropriately adjusted according to requirements.
  • Step S102 Input the video image into the pre-trained key point detection model, and obtain the key point heat map and key point position information of the pig to be measured output by the model.
  • the key point detection model is composed of four densely connected hourglass networks.
  • step S103 multiple preset key points are obtained by matching according to the key point position information.
  • Step S104 Calculate the hip width, hip height, and body length of the pig to be measured according to the preset key points of the pig to be measured.
  • step S105 the volume of the pig to be measured is calculated according to the hip width, hip height, and body length.
  • Step S106 Input the hip width, hip height, body length and volume into the preset pig weight regression model to calculate the weight prediction value of the pig to be measured.
  • the preset key points include mouth, head, neck, left front elbow, left front toe, right front toe, left back elbow, left back toe, right back elbow, right back toe, anterior spine, mid-spine, tail, belly The middle part and the back part of the belly; calculate the hip width, hip height and body length of the pig to be measured according to the preset key points of the pig to be measured, including:
  • the body length, hip height and hip width are calculated according to the position information of the key points (head, tail, middle spine, middle belly, left back elbow and right back elbow) obtained by matching.
  • the weight of a pig is directly related to the size of the pig.
  • the width and height of the pig's hip can be used to indicate the cross-sectional area of the pig.
  • the head to tail of a pig can be used to indicate the length of the pig.
  • V W*L*H
  • W is the hip width of the pig to be measured
  • H is the hip height of the pig to be measured
  • L is the length of the pig to be measured.
  • the hip width, hip height and body length of pigs can be estimated, thereby more accurately predicting the weight of pigs. Because the average tissue density of pigs is approximately the same throughout the day, pig weight and pig volume are approximately linearly related.
  • the method before inputting the hip width, hip height, body length and volume into the preset pig weight regression model to calculate the weight prediction value of the pig to be measured, the method further includes:
  • the reference data include hip width, hip height, body length and volume; use the reference data as variables and the weight of the corresponding live pig sample as the result to establish a pig weight regression model.
  • the regression method of the pig weight regression model can be linear regression or lasso regression, and the regression coefficient of the pig weight regression model can be estimated by the least square method, which is not limited here.
  • live pig samples such as body length, hip height, hip width, volume and other parameters
  • the pig video is fine.
  • a camera can be directly installed near the feeding trough of the breeding pen to take a video of the pig, or can be taken in other ways, which is not limited here.
  • the method before inputting the video image into the pre-trained key point detection model, the method further includes: adjusting all the images in the video image to preset pixels; and inputting the adjusted video image to the pre-trained key point detection Model.
  • the video image is first adjusted to 512*256 pixels to facilitate batch processing of the model.
  • the method further includes:
  • the minimum mean square error loss function is used to make the hourglass network converge, and the trained key point detection model is obtained.
  • the hourglass network can effectively detect the key points of the target object.
  • the hourglass network includes an input layer, a convolutional layer, a pooling layer, an up-sampling layer, and a down-sampling layer.
  • the output of the previous hourglass network is the input of the adjacent hourglass network.
  • each hourglass network adopts a relay supervision strategy to supervise and train the loss of the network. In this embodiment, before the training starts, the network parameters need to be initialized, and the initial learning rate is set to 0.00025.
  • the training set includes a plurality of live pig image samples.
  • the live pig image samples in the training set need to be preprocessed, for example, the live pig image samples are cropped to preset pixels, the environmental interference area is removed, and the cropped live pig image
  • the sample manually marks each key point, where the key point n manually marked is represented as (x, y, z).
  • the preprocessed training samples into the fourth-order hourglass network, which includes the upper road and the lower road.
  • the live pig image samples are down-sampled four times.
  • the upper-level road processes the original-size live pig images, and the lower-level path down-samples the original-size live pig images before performing up-sampling.
  • the intermediate characteristics of the original size, 1/2, 1/4, and 1/8 can be extracted from the original size (512*256), and the image is restored to the original size by upsampling after each feature is extracted , Add the original size feature data, and then perform feature extraction through a residual network; between two downsampling, three primary modules are used to extract features; between two additions, one primary module is used to extract features.
  • each hourglass network is down-sampling through the pooling layer, and adjacent interpolation is up-sampling, so that key point features can be extracted from top to bottom and bottom to top in each size. Jumping connections are used between the hourglasses, so that the key point position information at each resolution is preserved.
  • the size of the original image is 3*512*256, where 512*256 refers to the resolution of the RGB image, 3 represents the number of feature channels, in the hourglass network
  • the number of characteristic channels can be directly set in the fully connected layer of, in this embodiment, the number of characteristic channels is 3.
  • Downsampling refers to the operation of reducing the resolution of an image. For example, a maximum pooling sampling or average pooling sampling is performed on a 3*512*256 original image to obtain multiple 3*256*108 images. Upsampling refers to the operation of increasing the resolution of an image. For example, for an image of 3*64*64, the nearest neighbor interpolation is used to obtain an image of 3*128*128.
  • P n (i, j, k) represents the prediction probability of the volume element (i, j, k) of the key point n.
  • the key points n(x, y, z) labeled in the training sample are calculated using the following formula,
  • the loss function Loss formula is as follows:
  • the key point detection model After training, when the loss function converges to a preset interval, the key point detection model indicates that it has been trained.
  • the position information of key points identified in multiple angles in the video image and multiple frames of images is used to perform three-dimensional reconstruction, so that the absolute coordinates of each key point in the same coordinate system and the key point can be obtained. The distance between.
  • the embodiment of the application provides a live pig weight measurement device, which is used to perform the above live pig weight measurement method.
  • the device includes: an acquisition unit 10, an input unit 20, a matching unit 30, and a first calculation unit 40.
  • the acquiring unit 10 is used to acquire a video image of the pig to be measured.
  • the input unit 20 is used to input the video image into the pre-trained key point detection model to obtain the key point heat map of the pig to be measured and the key point position information output by the model.
  • the key point detection model is composed of four densely connected hourglass networks.
  • the matching unit 30 is configured to obtain multiple preset key points by matching according to the key point location information.
  • the first calculation unit 40 is used to calculate the hip width, hip height, and body length of the pig to be measured according to the preset key points of the pig to be measured.
  • the second calculation unit 50 is used to calculate the volume of the pig to be measured based on the hip width, hip height, and body length.
  • the third calculation unit 60 is used to input the hip width, hip height, body length and volume into the preset pig weight regression model to calculate the weight prediction value of the pig to be measured.
  • the preset key points include mouth, head, neck, left front elbow, left front toe, right front toe, left back elbow, left back toe, right back elbow, right back toe, anterior spine, mid-spine, tail, belly Middle and back of belly.
  • the first calculation unit 40 includes a first calculation subunit, a second calculation subunit, and a third calculation subunit.
  • the first calculation subunit is used to calculate the body length of the pig to be measured according to the position information of the matched "head" key points and the "tail” key points; the second calculation subunit is used to calculate the body length of the "spine middle” key obtained from the matching Calculate the hip height of the pig to be measured based on the position information of the key point and the "middle belly” key point; the third calculation subunit is used to calculate the position information of the key point "left back elbow” and "right back elbow” obtained by matching The hip width of the pig is to be measured.
  • the body length, hip height and hip width are calculated according to the position information of the key points (head, tail, middle spine, middle belly, left back elbow and right back elbow) obtained by matching.
  • the weight of a pig is directly related to the size of the pig.
  • the width and height of the pig's hip can be used to indicate the cross-sectional area of the pig.
  • the head to tail of a pig can be used to indicate the length of the pig.
  • V W*L*H
  • W is the hip width of the pig to be measured
  • H is the hip height of the pig to be measured
  • L is the length of the pig to be measured.
  • the hip width, hip height and body length of pigs can be estimated, thereby more accurately predicting the weight of pigs. Because the average tissue density of pigs is approximately the same throughout the day, pig weight and pig volume are approximately linearly related.
  • the device further includes an acquisition unit and an establishment unit.
  • the collection unit is used to collect the weight and reference data of several live pig samples.
  • the reference data includes hip width, hip height, body length and volume; the establishment unit is used to use the reference data as variables, and the weight of the corresponding live pig sample as the result, establish Regression model of pig weight.
  • the regression method of the pig weight regression model can be linear regression or lasso regression, and the regression coefficient of the pig weight regression model can be estimated by the least square method, which is not limited here.
  • live pig samples such as body length, hip height, hip width, volume and other parameters
  • the pig video is fine.
  • a camera can be directly installed near the feeding trough of the breeding pen to take a video of the pig, or it can be taken in other ways, which is not limited here.
  • the device further includes a preprocessing unit.
  • the preprocessing unit is used to adjust all the images in the video image to preset pixels; the input unit 20 is also used to input the adjusted video image into the pre-trained key point detection model.
  • the video image is first adjusted to 512*256 pixels to facilitate batch processing of the model.
  • the model before inputting the video image into the pre-trained key point detection model, the model should be constructed first. specifically:
  • the minimum mean square error loss function is used to make the hourglass network converge, and the trained key point detection model is obtained.
  • the hourglass network can effectively detect the key points of the target object.
  • the hourglass network includes an input layer, a convolutional layer, a pooling layer, an up-sampling layer, and a down-sampling layer.
  • the output of the previous hourglass network is the input of the adjacent hourglass network.
  • each hourglass network adopts a relay supervision strategy to supervise and train the loss of the network. In this embodiment, before the training starts, the network parameters need to be initialized, and the initial learning rate is set to 0.00025.
  • the training set includes a plurality of live pig image samples.
  • the live pig image samples in the training set need to be preprocessed, for example, the live pig image samples are cropped to preset pixels, the environmental interference area is removed, and the cropped live pig image
  • the sample manually marks each key point, where the key point n manually marked is represented as (x, y, z).
  • the preprocessed training samples into the fourth-order hourglass network, which includes the upper road and the lower road.
  • the live pig image samples are down-sampled four times.
  • the upper-level road processes the original-size live pig images, and the lower-level path down-samples the original-size live pig images before performing up-sampling.
  • the intermediate characteristics of the original size, 1/2, 1/4, and 1/8 can be extracted from the original size (512*256), and the image is restored to the original size by upsampling after each feature is extracted , Add the original size feature data, and then perform feature extraction through a residual network; between two downsampling, three primary modules are used to extract features; between two additions, one primary module is used to extract features.
  • each hourglass network is down-sampling through the pooling layer, and adjacent interpolation is up-sampling, so that key point features can be extracted from top to bottom and bottom to top in each size. Jumping connections are used between the hourglasses, so that the key point position information at each resolution is preserved.
  • the size of the original image is 3*512*256, where 512*256 refers to the resolution of the RGB image, 3 represents the number of feature channels, in the hourglass network
  • the number of characteristic channels can be directly set in the fully connected layer of, in this embodiment, the number of characteristic channels is 3.
  • Downsampling refers to the operation of reducing the resolution of an image. For example, a maximum pooling sampling or average pooling sampling is performed on a 3*512*256 original image to obtain multiple 3*256*108 images.
  • Upsampling refers to the operation of increasing the resolution of an image. For example, for an image of 3*64*64, the nearest neighbor interpolation is used to obtain an image of 3*128*128.
  • P n (i, j, k) represents the prediction probability of the volume element (i, j, k) of the key point n.
  • the key points n(x, y, z) labeled in the training sample are calculated using the following formula,
  • the loss function Loss formula is as follows:
  • the key point detection model After training, when the loss function converges to a preset interval, the key point detection model indicates that it has been trained.
  • the position information of key points identified in multiple angles in the video image and multiple frames of images is used to perform three-dimensional reconstruction, so that the absolute coordinates of each key point in the same coordinate system and the key point can be obtained. The distance between.
  • the embodiment of the present application provides a computer non-volatile storage medium, the storage medium includes a stored program, wherein the device where the storage medium is located is controlled to perform the following steps when the program runs:
  • the position information is matched to obtain a plurality of preset key points; the hip width, hip height, and body length of the pig to be measured are calculated according to the preset key points of the pig to be measured; according to the hip width, the hip height, and the The body length calculates the volume of the pig to be measured; the hip width, the hip height, the body length and the volume are input into a preset pig weight regression model to calculate the weight prediction value of the pig to be measured.
  • the device where the storage medium is located is controlled to perform the following steps: the preset key points include mouth, head, neck, left front elbow, left front toe, right front toe, left rear elbow, left rear toe, right rear elbow , Right back toe, front of spine, middle of spine, tail, middle of belly, back of belly; said calculating the hip width, hip height, and body length of the pig to be measured according to the preset key points of the pig to be measured, including : Calculate the body length of the pig to be measured according to the position information of the “head” key points and the “tail” key points obtained by the matching; calculate the body length of the pigs to be measured according to the position information of the key points “central spine” and “mid belly” obtained by the matching The hip height of the pig to be measured is described; the hip width of the pig to be measured is calculated according to the position information of the key points of the "left back elbow” and the key point of the "right back elbow” obtained by matching.
  • the device where the storage medium is located is controlled to perform the following steps: construct the key point detection model, wherein the key point detection model is composed of four densely connected hourglass networks; use a preset training set pair The key point detection model is trained, and the minimum mean square error loss function is used in the training process to make the hourglass network converge to obtain the trained key point detection model.
  • the device where the storage medium is located is controlled to perform the following steps: the training set includes a plurality of live pig image samples; the hourglass network includes an upper-level road and a lower-level road, and the upper-level road processes the original-size pig images, The lower-level road performs down-sampling on the original size pig image and then up-sampling.
  • the device where the storage medium is located is controlled to perform the following steps: the down-sampling adopts maximum pooling or average pooling, and the up-sampling adopts the nearest neighbor interpolation method.
  • the device where the storage medium is located is controlled to perform the following steps: collect the weight and reference data of a number of pig samples, the reference data including hip width, hip height, body length and volume; use the reference data as variables , The weight of the corresponding pig sample is used as the result, and the pig weight regression model is established.
  • Fig. 4 is a schematic diagram of a computer device provided by an embodiment of the present application.
  • the computer device 100 of this embodiment includes a processor 101, a memory 102, and a computer program 103 stored in the memory 102 and running on the processor 101.
  • the processor 101 executes the computer program 103 when the computer program 103 is executed.
  • the method of measuring pig weight in the example will not be repeated here.
  • the computer program is executed by the processor 101, the function of each model/unit in the pig weight measurement device in the embodiment is realized. To avoid repetition, it will not be repeated here.
  • the computer device 100 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the computer device may include, but is not limited to, a processor 101 and a memory 102.
  • FIG. 3 is only an example of the computer device 100, and does not constitute a limitation on the computer device 100. It may include more or less components than shown in the figure, or a combination of certain components, or different components.
  • computer equipment may also include input and output devices, network access devices, buses, and so on.
  • the so-called processor 101 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the memory 102 may be an internal storage unit of the computer device 100, such as a hard disk or memory of the computer device 100.
  • the memory 102 may also be an external storage device of the computer device 100, such as a plug-in hard disk equipped on the computer device 100, a smart memory card (Smart Media Card, SMC), a Secure Digital (SD) card, and a flash memory card (Flash). Card) and so on.
  • the memory 102 may also include both an internal storage unit of the computer device 100 and an external storage device.
  • the memory 102 is used to store computer programs and other programs and data required by the computer equipment.
  • the memory 102 can also be used to temporarily store data that has been output or will be output.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined Or it can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the above-mentioned integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium.
  • the above-mentioned software functional unit is stored in a storage medium and includes several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (Processor) execute the method described in each embodiment of the present application Part of the steps.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Image Analysis (AREA)

Abstract

Provided are a pig weight measurement method and apparatus, relating to the technical field of artificial intelligence. The method comprises: acquiring a video image regarding a pig to be measured; inputting the video image into a pre-trained key point detection model to obtain a key point heat map and key point position information, output from the model, of the pig to be measured; according to the key point position information, obtaining, by means of matching, a plurality of preset key points; according to the preset key points of the pig to be measured, calculating the hip breadth, hip height and body length of the pig to be measured; according to the hip breadth, the hip height and the body length, calculating the volume of the pig to be measured; and inputting the hip breadth, the hip height, the body length and the volume into a preset pig weight regression model to obtain, by means of calculation, a weight prediction value of the pig to be measured. The present technical solution can solve the problem in the prior art of the accuracy of a visually measured weight of a pig often being low.

Description

一种生猪体重测量方法及装置Method and device for measuring pig weight
本申请要求于2019年07月04日提交中国专利局、申请号为201910601442.4、申请名称为“一种生猪体重测量方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on July 4, 2019, the application number is 201910601442.4, and the application name is "a method and device for measuring pig weight", the entire content of which is incorporated into this application by reference in.
【技术领域】【Technical Field】
本申请涉及人工智能技术领域,尤其涉及一种生猪体重测量方法及装置。This application relates to the field of artificial intelligence technology, and in particular to a method and device for measuring pig weight.
【背景技术】【Background technique】
目前,生猪体重是衡量生猪是否达到出栏标准,以及对预期收入做估计的最重要价值,目前使用体重计进行生猪称重,操作繁琐,耗费了过多的人力成本和时间成本,特别是在大型生猪养殖厂,逐一进行生猪体重测量工作量将十分巨大。而通过视觉测量生猪的体重往往准确度低。At present, the weight of live pigs is the most important value to measure whether the live pigs meet the slaughter standard and estimate the expected income. At present, the weighing of live pigs with a body scale is cumbersome and consumes too much labor and time costs, especially in large-scale In pig farms, the workload of measuring pig weights one by one will be huge. However, the accuracy of visually measuring the weight of pigs is often low.
【申请内容】【Content of Application】
有鉴于此,本申请实施例提供了一种生猪体重测量方法及装置,用以解决现有技术中通过视觉测量生猪的体重往往准确度低的问题。In view of this, the embodiments of the present application provide a method and device for measuring pig weight to solve the problem of low accuracy in measuring the weight of pigs visually in the prior art.
为了实现上述目的,根据本申请的一个方面,提供了一种生猪体重测量方法,所述方法包括:获取关于待测量生猪的视频图像;In order to achieve the above objective, according to one aspect of the present application, a method for measuring the weight of a live pig is provided, the method comprising: acquiring a video image of the live pig to be measured;
将所述视频图像输入预先训练的关键点检测模型,得到所述模型输出的所述待测量生猪的关键点热力图和关键点位置信息;根据所述关键点位置信息匹配得到多个预设关键点;根据所述待测量生猪的预设关键点计算所述待测量生猪的臀宽、臀高、身长;根据所述臀宽、所述臀高、所述身 长计算所述待测量生猪的体积;将所述臀宽、所述臀高、所述身长及所述体积输入预设的生猪体重回归模型计算得到所述待测量生猪的体重预测值。Input the video image into a pre-trained key point detection model to obtain the key point heat map and key point position information of the pig to be measured output by the model; according to the key point position information matching, multiple preset keys are obtained Points; calculate the hip width, hip height, and body length of the pig to be measured according to the preset key points of the pig to be measured; calculate the volume of the pig to be measured according to the hip width, the hip height, and the body length The hip width, the hip height, the body length and the volume are input into a preset pig weight regression model to calculate the weight prediction value of the pig to be measured.
为了实现上述目的,根据本申请的一个方面,提供了一种生猪体重测量装置,所述装置包括:获取单元,用于获取关于待测量生猪的视频图像;输入单元,用于将所述视频图像输入预先训练的关键点检测模型,得到所述模型输出的所述待测量生猪的关键点热力图和关键点位置信息;匹配单元,用于根据所述关键点位置信息匹配得到多个预设关键点;第一计算单元,用于根据所述待测量生猪的预设关键点计算所述待测量生猪的臀宽、臀高、身长;第二计算单元,用于根据所述臀宽、所述臀高、所述身长计算所述待测量生猪的体积;第三计算单元,用于将所述臀宽、所述臀高、所述身长及所述体积输入预设的生猪体重回归模型计算得到所述待测量生猪的体重预测值。In order to achieve the above objective, according to one aspect of the present application, there is provided a live pig weight measurement device. The device includes: an acquisition unit for acquiring a video image of a pig to be measured; an input unit for converting the video image Input the pre-trained key point detection model to obtain the key point heat map and key point position information of the pig to be measured output by the model; the matching unit is used for matching according to the key point position information to obtain multiple preset keys Points; a first calculation unit for calculating the hip width, hip height, and body length of the pig to be measured according to preset key points of the pig to be measured; a second calculation unit for calculating the hip width, hip height, and body length of the pig to be measured The hip height and the body length calculate the volume of the pig to be measured; the third calculation unit is used to input the hip width, the hip height, the body length and the volume into a preset pig weight regression model to calculate The weight prediction value of the pig to be measured.
为了实现上述目的,根据本申请的一个方面,提供了一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述的生猪体重测量方法。In order to achieve the above objective, according to one aspect of the application, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor executes all The computer program realizes the above-mentioned method for measuring pig weight.
为了实现上述目的,根据本申请的一个方面,提供了一种计算机非易失性存储介质,所述存储介质包括存储的程序,在所述程序运行时控制所述存储介质所在设备执行上述的生猪体重测量方法。In order to achieve the above objective, according to one aspect of the present application, a computer non-volatile storage medium is provided. The storage medium includes a stored program. When the program is running, the device where the storage medium is located is controlled to execute the above-mentioned live pig. Weight measurement method.
本方案中,通过采用视频图像作为输入,利用计算机视觉技术和深度神经网络技术,对生猪的全身关键点进行实时检测和跟踪,并同时计算出各关键点之间的距离,从而精确计算出关于生猪臀宽、臀高、身长及体积等物理参数,利用数据库中已知的生猪物理参数与体重之间的关系,对生猪的准确体重做出预测,提高视觉测量生猪体重的准确性。In this solution, by using video images as input, computer vision technology and deep neural network technology, real-time detection and tracking of the key points of the whole body of the pig, and at the same time calculate the distance between the key points, so as to accurately calculate the The physical parameters such as hip width, hip height, body length and volume of pigs are used to predict the accurate weight of pigs by using the known relationship between pig physical parameters and body weight in the database to improve the accuracy of visual measurement of pig weight.
【附图说明】【Explanation of drawings】
为了更清楚地说明本发明申请实施例的技术方案,下面将对实施例 中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative labor, other drawings can be obtained based on these drawings.
图1是本申请实施例提供的一种可选的生猪体重测量方法的流程图;FIG. 1 is a flowchart of an optional method for measuring pig weight according to an embodiment of the present application;
图2是本申请实施例提供的生猪的预设关键点的示意图;FIG. 2 is a schematic diagram of preset key points of pigs provided by an embodiment of the present application;
图3是本申请实施例提供的一种可选的生猪体重测量装置的示意图;Figure 3 is a schematic diagram of an optional live pig weight measurement device provided by an embodiment of the present application;
图4是本申请实施例提供的一种可选的计算机设备的示意图。Fig. 4 is a schematic diagram of an optional computer device provided by an embodiment of the present application.
【具体实施方式】【Detailed ways】
为了更好的理解本申请的技术方案,下面结合附图对本申请实施例进行详细描述。In order to better understand the technical solutions of the present application, the following describes the embodiments of the present application in detail with reference to the accompanying drawings.
应当明确,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。It should be clear that the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
在本申请实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
应当理解,尽管在本申请实施例中可能采用术语第一、第二、第三等来描述终端,但这些终端不应限于这些术语。这些术语仅用来将终端彼此区分开。例如,在不脱离本申请实施例范围的情况下,第一终端也可以被称为第二终端,类似地,第二终端也可以被称为第一终端。It should be understood that although the terms first, second, third, etc. may be used to describe terminals in the embodiments of the present application, these terminals should not be limited to these terms. These terms are only used to distinguish terminals from each other. For example, without departing from the scope of the embodiments of the present application, the first terminal may also be referred to as the second terminal, and similarly, the second terminal may also be referred to as the first terminal.
取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成 为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。Depending on the context, the word "if" as used herein can be interpreted as "when" or "when" or "in response to determination" or "in response to detection". Similarly, depending on the context, the phrase "if determined" or "if detected (statement or event)" can be interpreted as "when determined" or "in response to determination" or "when detected (statement or event) )" or "in response to detection (statement or event)".
图1是根据本申请实施例的一种生猪体重测量方法的流程图,如图1所示,该方法包括:Fig. 1 is a flowchart of a method for measuring pig weight according to an embodiment of the present application. As shown in Fig. 1, the method includes:
步骤S101,获取关于待测量生猪的视频图像。在本实施方式中,视频图像包括200帧图像,在其他实施方式中,视频图像的帧数可以根据需求进行适当的调整。Step S101: Obtain a video image of the pig to be measured. In this embodiment, the video image includes 200 frames of images. In other embodiments, the number of frames of the video image can be appropriately adjusted according to requirements.
步骤S102,将视频图像输入预先训练的关键点检测模型,得到模型输出的待测量生猪的关键点热力图和关键点位置信息。其中,关键点检测模型由四个密集连接的沙漏网络构成。Step S102: Input the video image into the pre-trained key point detection model, and obtain the key point heat map and key point position information of the pig to be measured output by the model. Among them, the key point detection model is composed of four densely connected hourglass networks.
步骤S103,根据关键点位置信息匹配得到多个预设关键点。In step S103, multiple preset key points are obtained by matching according to the key point position information.
步骤S104,根据待测量生猪的预设关键点计算待测量生猪的臀宽、臀高、身长。Step S104: Calculate the hip width, hip height, and body length of the pig to be measured according to the preset key points of the pig to be measured.
步骤S105,根据臀宽、臀高、身长计算待测量生猪的体积。In step S105, the volume of the pig to be measured is calculated according to the hip width, hip height, and body length.
步骤S106,将臀宽、臀高、身长及体积输入预设的生猪体重回归模型计算得到待测量生猪的体重预测值。Step S106: Input the hip width, hip height, body length and volume into the preset pig weight regression model to calculate the weight prediction value of the pig to be measured.
本方案中,通过采用视频图像作为输入,利用计算机视觉技术和深度神经网络技术,对生猪的全身关键点进行实时检测和跟踪,并同时计算出各关键点之间的距离,从而精确计算出关于生猪臀宽、臀高、身长及体积等物理参数,利用数据库中已知的生猪物理参数与体重之间的关系,对生猪的准确体重做出预测,提高视觉测量生猪体重的准确性。In this solution, by using video images as input, computer vision technology and deep neural network technology, real-time detection and tracking of the key points of the whole body of the pig, and at the same time calculate the distance between the key points, so as to accurately calculate the The physical parameters such as hip width, hip height, body length and volume of pigs are used to predict the accurate weight of pigs by using the known relationship between pig physical parameters and body weight in the database to improve the accuracy of visual measurement of pig weight.
可选地,预设关键点包括嘴、头、颈、左前肘、左前脚尖、右前脚尖、左后肘、左后脚尖、右后肘、右后脚尖、脊前部、脊中部、尾、肚中部、肚后部;根据待测量生猪的预设关键点计算待测量生猪的臀宽、臀高、身长,包括:Optionally, the preset key points include mouth, head, neck, left front elbow, left front toe, right front toe, left back elbow, left back toe, right back elbow, right back toe, anterior spine, mid-spine, tail, belly The middle part and the back part of the belly; calculate the hip width, hip height and body length of the pig to be measured according to the preset key points of the pig to be measured, including:
根据匹配得到的“头”关键点和“尾”关键点的位置信息计算待测量生猪的身长;根据匹配得到的“脊中部”关键点和“肚中部”关键点的位置信息计算待测量生猪的臀高;根据匹配得到的“左后肘”关键点和“右后肘”关键点的位置信息计算待测量生猪的臀宽。Calculate the body length of the pig to be measured according to the position information of the matched "head" and "tail" key points; calculate the length of the pig to be measured according to the matched position information of the key points in the middle of the spine and the middle of the belly Hip height: Calculate the hip width of the pig to be measured based on the position information of the “left back elbow” key point and the “right back elbow” key point obtained by matching.
参考图2,可以理解地,根据匹配得到的关键点(头、尾、脊中部、肚中部、左后肘及右后肘)的位置信息来计算身长、臀高及臀宽。生猪的体重与生猪的体积直接相关,生猪臀部的宽和高能够用于表示生猪的截面积。生猪的头至尾能够用于表示生猪的身长。Referring to FIG. 2, it is understandable that the body length, hip height and hip width are calculated according to the position information of the key points (head, tail, middle spine, middle belly, left back elbow and right back elbow) obtained by matching. The weight of a pig is directly related to the size of the pig. The width and height of the pig's hip can be used to indicate the cross-sectional area of the pig. The head to tail of a pig can be used to indicate the length of the pig.
进一步地,根据臀宽、臀高、身长计算待测量生猪的体积的计算公式为:V=W*L*H,其中,W为待测量生猪的臀宽,H为待测量生猪的臀高,L为待测量生猪的身长。Further, the calculation formula for calculating the volume of the pig to be measured based on the hip width, hip height, and body length is: V=W*L*H, where W is the hip width of the pig to be measured, and H is the hip height of the pig to be measured. L is the length of the pig to be measured.
通过计算机视觉技术和深度神经网络技术能够预估得到生猪的臀宽、臀高及身长,从而更加精准地预估生猪的体重。因为生猪的整天平均组织密度大致相等,所以生猪体重与生猪的体积近似线性相关。Through computer vision technology and deep neural network technology, the hip width, hip height and body length of pigs can be estimated, thereby more accurately predicting the weight of pigs. Because the average tissue density of pigs is approximately the same throughout the day, pig weight and pig volume are approximately linearly related.
可选地,在将臀宽、臀高、身长及体积输入预设的生猪体重回归模型计算得到待测量生猪的体重预测值之前,方法还包括:Optionally, before inputting the hip width, hip height, body length and volume into the preset pig weight regression model to calculate the weight prediction value of the pig to be measured, the method further includes:
采集若干个生猪样本的体重及参考数据,参考数据包括臀宽、臀高、身长及体积;将参考数据作为变量,对应的生猪样本的体重作为结果,建立生猪体重回归模型。Collect the body weight and reference data of several live pig samples. The reference data include hip width, hip height, body length and volume; use the reference data as variables and the weight of the corresponding live pig sample as the result to establish a pig weight regression model.
其中,生猪体重回归模型的回归方式可以是线性回归也可以是套索回归,可以利用最小二乘法估计生猪体重回归模型的回归系数,在此不做限定。通过大量的生猪样本的身长、臀高、臀宽、体积等参数,来对生猪体重进行回归预测,即可获取生猪的预估体重,判断生猪是否达到出栏的标准,简单快捷,只需要拍摄一段生猪视频即可。在一种实施方式中,可以直接在养殖栏喂养槽的附近安装摄像头以拍摄生猪的视频,也可以通过其他方式拍摄,在此不做限定。Among them, the regression method of the pig weight regression model can be linear regression or lasso regression, and the regression coefficient of the pig weight regression model can be estimated by the least square method, which is not limited here. Through a large number of live pig samples, such as body length, hip height, hip width, volume and other parameters, to perform regression prediction on the weight of the pig, you can get the estimated weight of the pig and judge whether the pig meets the standard for slaughter. It is simple and fast. It only needs to take a picture. The pig video is fine. In one embodiment, a camera can be directly installed near the feeding trough of the breeding pen to take a video of the pig, or can be taken in other ways, which is not limited here.
可选地,在将视频图像输入预先训练的关键点检测模型之前,方法还包括:将视频图像中的所有的图像调整为预设像素;将调整后的视频图像输入到预先训练的关键点检测模型中。在本实施方式中,先将视频图像调整为512*256像素,以方便模型进行批量处理。Optionally, before inputting the video image into the pre-trained key point detection model, the method further includes: adjusting all the images in the video image to preset pixels; and inputting the adjusted video image to the pre-trained key point detection Model. In this embodiment, the video image is first adjusted to 512*256 pixels to facilitate batch processing of the model.
可选地,在将视频图像输入预先训练的关键点检测模型,得到模型输出的待测量生猪的关键点热力图和关键点位置信息之前,方法还包括:Optionally, before the video image is input into the pre-trained key point detection model to obtain the key point heat map and key point position information of the pig to be measured output by the model, the method further includes:
构建关键点检测模型,其中,关键点检测模型由四个密集连接的沙漏 网络构成;Construct a key point detection model, where the key point detection model consists of four densely connected hourglass networks;
利用预设的训练集对关键点检测模型进行训练,训练过程中采用最小均方误差损失函数使得沙漏网络收敛,得到训练好的关键点检测模型。Use the preset training set to train the key point detection model. In the training process, the minimum mean square error loss function is used to make the hourglass network converge, and the trained key point detection model is obtained.
可以理解地,沙漏网络能够对目标对象的关键点进行有效检测,沙漏网络包括输入层、卷积层、池化层、上采样层、下采样层等。当四个沙漏网络连接在一起时,前一个沙漏网络的输出为相邻一个沙漏网络的输入。为了保证底层参数的正常更新,每个沙漏网络采用中继监督策略来对网络的损失进行监督训练。在本实施例中,在训练开始前,需要初始化网络参数,设置初始学习率为0.00025。Understandably, the hourglass network can effectively detect the key points of the target object. The hourglass network includes an input layer, a convolutional layer, a pooling layer, an up-sampling layer, and a down-sampling layer. When four hourglass networks are connected together, the output of the previous hourglass network is the input of the adjacent hourglass network. In order to ensure the normal update of the underlying parameters, each hourglass network adopts a relay supervision strategy to supervise and train the loss of the network. In this embodiment, before the training starts, the network parameters need to be initialized, and the initial learning rate is set to 0.00025.
所述训练集包括多个生猪图像样本,训练前,需要对训练集中的生猪图像样本进行预处理,例如将生猪图像样本进行裁剪至预设像素,去除环境干扰区域,并对裁剪后的生猪图像样本人工标记各个关键点,其中,人工标注的关键点n表示为(x,y,z)。The training set includes a plurality of live pig image samples. Before training, the live pig image samples in the training set need to be preprocessed, for example, the live pig image samples are cropped to preset pixels, the environmental interference area is removed, and the cropped live pig image The sample manually marks each key point, where the key point n manually marked is represented as (x, y, z).
然后将预处理后的训练样本输入四阶沙漏网络,沙漏网络包括上级路和下级路。生猪图像样本进行四次降采样,每次降采样之前,上级路处理原尺寸的生猪图像,下级路对原尺寸的生猪图像进行降采样之后再进行升采样处理。在本实施方式中,可以从原始尺寸(512*256)中提取到原始尺寸、1/2、1/4、1/8的中间特性,每次提取特征后通过升采样使图像恢复至原始大小,与原始尺寸特征的数据进行相加,再通过一个残差网络进行特征提取;两次降采样之间,使用三个初级模块提取特征;两次相加之间,使用一个初级模块提取特征。Then input the preprocessed training samples into the fourth-order hourglass network, which includes the upper road and the lower road. The live pig image samples are down-sampled four times. Before each down-sampling, the upper-level road processes the original-size live pig images, and the lower-level path down-samples the original-size live pig images before performing up-sampling. In this embodiment, the intermediate characteristics of the original size, 1/2, 1/4, and 1/8 can be extracted from the original size (512*256), and the image is restored to the original size by upsampling after each feature is extracted , Add the original size feature data, and then perform feature extraction through a residual network; between two downsampling, three primary modules are used to extract features; between two additions, one primary module is used to extract features.
四阶沙漏网络中,每个沙漏网络都是通过池化层进行向降采样、临近插值进行升采样,从而自顶而下和自底而上地在每个尺寸上都能提取关键点特征。沙漏之间采用跳跃连接,使得每个分辨率下的关键点位置信息保存下来。In the fourth-order hourglass network, each hourglass network is down-sampling through the pooling layer, and adjacent interpolation is up-sampling, so that key point features can be extracted from top to bottom and bottom to top in each size. Jumping connections are used between the hourglasses, so that the key point position information at each resolution is preserved.
上述的升采样和降采样,为了帮助理解,示例性地,原始图像的大小为3*512*256,其中,512*256指的是RGB图像的分辨率,3表示特征通道数目,在沙漏网络的全连接层可以直接设定特征通道数目,在本实施例中,特征通道数目为3。The above upsampling and downsampling, to help understanding, exemplarily, the size of the original image is 3*512*256, where 512*256 refers to the resolution of the RGB image, 3 represents the number of feature channels, in the hourglass network The number of characteristic channels can be directly set in the fully connected layer of, in this embodiment, the number of characteristic channels is 3.
降采样是指将图像的分辨率降低的操作。例如,对3*512*256的原始图像进行一次最大池化采样或平均池化采样,得到多个3*256*108的图像。升采样是指将图像的分辨率提升的操作。例如,对3*64*64的图像,采用最近邻插值得到3*128*128的图像。Downsampling refers to the operation of reducing the resolution of an image. For example, a maximum pooling sampling or average pooling sampling is performed on a 3*512*256 original image to obtain multiple 3*256*108 images. Upsampling refers to the operation of increasing the resolution of an image. For example, for an image of 3*64*64, the nearest neighbor interpolation is used to obtain an image of 3*128*128.
训练时,P n(i,j,k)表示关键点n的体积元素(i,j,k)的预测可能性。为了训练模型,训练样本中的标注的关键点n(x,y,z)使用下式计算,
Figure PCTCN2019104332-appb-000001
During training, P n (i, j, k) represents the prediction probability of the volume element (i, j, k) of the key point n. In order to train the model, the key points n(x, y, z) labeled in the training sample are calculated using the following formula,
Figure PCTCN2019104332-appb-000001
将σ=2,在训练过程中,使用均方差损失作为损失函数。具体地,损失函数Loss公式如下:Set σ=2, and use the mean square error loss as the loss function in the training process. Specifically, the loss function Loss formula is as follows:
Figure PCTCN2019104332-appb-000002
Figure PCTCN2019104332-appb-000002
在多图多角度情况下,将会有一部分关键点因为遮挡原因在图中不可见,此时在计算Loss时,不可见关键点对应的热力图将不会计算在内。In the case of multiple images and multiple angles, some key points will not be visible in the image due to occlusion. At this time, when calculating Loss, the heat map corresponding to the invisible key points will not be counted.
训练后,当损失函数收敛至预设区间,关键点检测模型就表示已经训练好。After training, when the loss function converges to a preset interval, the key point detection model indicates that it has been trained.
在一种实施方式中,利用视频图像中多个角度以及多帧图像中识别出的关键点的位置信息,做三维重建,从而可以得到各个关键点在同一坐标系下的绝对坐标和关键点之间的距离。In one embodiment, the position information of key points identified in multiple angles in the video image and multiple frames of images is used to perform three-dimensional reconstruction, so that the absolute coordinates of each key point in the same coordinate system and the key point can be obtained. The distance between.
进一步地,从关键点热力图上获取关键点的位置信息,并根据关键点的位置信息来计算两个预设的关键点之间的距离,也可以采用VIO(Vision-Inertial Odometry,视觉里程计框架)跟踪方法来计算两个关键点之间的距离。Further, obtain the position information of the key points from the heat map of the key points, and calculate the distance between the two preset key points according to the position information of the key points, or use VIO (Vision-Inertial Odometry, visual odometry). Frame) tracking method to calculate the distance between two key points.
本方案中,通过采用视频图像作为输入,利用计算机视觉技术和深度神经网络技术,对生猪的全身关键点进行实时检测和跟踪,并同时计算出各关键点之间的距离,从而精确计算出关于生猪臀宽、臀高、身长及体积等物理参数,利用数据库中已知的生猪物理参数与体重之间的关系,对生 猪的准确体重做出预测,提高视觉测量生猪体重的准确性。In this solution, by using video images as input, computer vision technology and deep neural network technology, real-time detection and tracking of the key points of the whole body of the pig, and at the same time calculate the distance between the key points, so as to accurately calculate the The physical parameters such as hip width, hip height, body length and volume of pigs are used to predict the accurate weight of pigs by using the known relationship between pig physical parameters and body weight in the database to improve the accuracy of visual measurement of pig weight.
本申请实施例提供了一种生猪体重测量装置,该装置用于执行上述生猪体重测量方法,如图3所示,该装置包括:获取单元10、输入单元20、匹配单元30、第一计算单元40、第二计算单元50、第三计算单元60。The embodiment of the application provides a live pig weight measurement device, which is used to perform the above live pig weight measurement method. As shown in FIG. 3, the device includes: an acquisition unit 10, an input unit 20, a matching unit 30, and a first calculation unit 40. The second calculation unit 50 and the third calculation unit 60.
获取单元10,用于获取关于待测量生猪的视频图像。The acquiring unit 10 is used to acquire a video image of the pig to be measured.
输入单元20,用于将视频图像输入预先训练的关键点检测模型,得到模型输出的待测量生猪的关键点热力图和关键点位置信息。其中,关键点检测模型由四个密集连接的沙漏网络构成。The input unit 20 is used to input the video image into the pre-trained key point detection model to obtain the key point heat map of the pig to be measured and the key point position information output by the model. Among them, the key point detection model is composed of four densely connected hourglass networks.
匹配单元30,用于根据关键点位置信息匹配得到多个预设关键点。The matching unit 30 is configured to obtain multiple preset key points by matching according to the key point location information.
第一计算单元40,用于根据待测量生猪的预设关键点计算待测量生猪的臀宽、臀高、身长。The first calculation unit 40 is used to calculate the hip width, hip height, and body length of the pig to be measured according to the preset key points of the pig to be measured.
第二计算单元50,用于根据臀宽、臀高、身长计算待测量生猪的体积。The second calculation unit 50 is used to calculate the volume of the pig to be measured based on the hip width, hip height, and body length.
第三计算单元60,用于将臀宽、臀高、身长及体积输入预设的生猪体重回归模型计算得到待测量生猪的体重预测值。The third calculation unit 60 is used to input the hip width, hip height, body length and volume into the preset pig weight regression model to calculate the weight prediction value of the pig to be measured.
本方案中,通过采用视频图像作为输入,利用计算机视觉技术和深度神经网络技术,对生猪的全身关键点进行实时检测和跟踪,并同时计算出各关键点之间的距离,从而精确计算出关于生猪臀宽、臀高、身长及体积等物理参数,利用数据库中已知的生猪物理参数与体重之间的关系,对生猪的准确体重做出预测,提高视觉测量生猪体重的准确性。In this solution, by using video images as input, computer vision technology and deep neural network technology, real-time detection and tracking of the key points of the whole body of the pig, and at the same time calculate the distance between the key points, so as to accurately calculate the The physical parameters such as hip width, hip height, body length and volume of pigs are used to predict the accurate weight of pigs by using the known relationship between pig physical parameters and body weight in the database to improve the accuracy of visual measurement of pig weight.
可选地,预设关键点包括嘴、头、颈、左前肘、左前脚尖、右前脚尖、左后肘、左后脚尖、右后肘、右后脚尖、脊前部、脊中部、尾、肚中部、肚后部。第一计算单元40包括第一计算子单元、第二计算子单元、第三计算子单元。Optionally, the preset key points include mouth, head, neck, left front elbow, left front toe, right front toe, left back elbow, left back toe, right back elbow, right back toe, anterior spine, mid-spine, tail, belly Middle and back of belly. The first calculation unit 40 includes a first calculation subunit, a second calculation subunit, and a third calculation subunit.
第一计算子单元,用于根据匹配得到的“头”关键点和“尾”关键点的位置信息计算待测量生猪的身长;第二计算子单元,用于根据匹配得到的“脊中部”关键点和“肚中部”关键点的位置信息计算待测量生猪的臀高;第三计算子单元,用于根据匹配得到的“左后肘”关键点和“右后肘” 关键点的位置信息计算待测量生猪的臀宽。The first calculation subunit is used to calculate the body length of the pig to be measured according to the position information of the matched "head" key points and the "tail" key points; the second calculation subunit is used to calculate the body length of the "spine middle" key obtained from the matching Calculate the hip height of the pig to be measured based on the position information of the key point and the "middle belly" key point; the third calculation subunit is used to calculate the position information of the key point "left back elbow" and "right back elbow" obtained by matching The hip width of the pig is to be measured.
参考图2,可以理解地,根据匹配得到的关键点(头、尾、脊中部、肚中部、左后肘及右后肘)的位置信息来计算身长、臀高及臀宽。生猪的体重与生猪的体积直接相关,生猪臀部的宽和高能够用于表示生猪的截面积。生猪的头至尾能够用于表示生猪的身长。Referring to FIG. 2, it is understandable that the body length, hip height and hip width are calculated according to the position information of the key points (head, tail, middle spine, middle belly, left back elbow and right back elbow) obtained by matching. The weight of a pig is directly related to the size of the pig. The width and height of the pig's hip can be used to indicate the cross-sectional area of the pig. The head to tail of a pig can be used to indicate the length of the pig.
进一步地,根据臀宽、臀高、身长计算待测量生猪的体积的计算公式为:V=W*L*H,其中,W为待测量生猪的臀宽,H为待测量生猪的臀高,L为待测量生猪的身长。Further, the calculation formula for calculating the volume of the pig to be measured based on the hip width, hip height, and body length is: V=W*L*H, where W is the hip width of the pig to be measured, and H is the hip height of the pig to be measured. L is the length of the pig to be measured.
通过计算机视觉技术和深度神经网络技术能够预估得到生猪的臀宽、臀高及身长,从而更加精准地预估生猪的体重。因为生猪的整天平均组织密度大致相等,所以生猪体重与生猪的体积近似线性相关。Through computer vision technology and deep neural network technology, the hip width, hip height and body length of pigs can be estimated, thereby more accurately predicting the weight of pigs. Because the average tissue density of pigs is approximately the same throughout the day, pig weight and pig volume are approximately linearly related.
可选地,装置还包括采集单元、建立单元。Optionally, the device further includes an acquisition unit and an establishment unit.
采集单元,用于采集若干个生猪样本的体重及参考数据,参考数据包括臀宽、臀高、身长及体积;建立单元,用于将参考数据作为变量,对应的生猪样本的体重作为结果,建立生猪体重回归模型。The collection unit is used to collect the weight and reference data of several live pig samples. The reference data includes hip width, hip height, body length and volume; the establishment unit is used to use the reference data as variables, and the weight of the corresponding live pig sample as the result, establish Regression model of pig weight.
其中,生猪体重回归模型的回归方式可以是线性回归也可以是套索回归,可以利用最小二乘法估计生猪体重回归模型的回归系数,在此不做限定。通过大量的生猪样本的身长、臀高、臀宽、体积等参数,来对生猪体重进行回归预测,即可获取生猪的预估体重,判断生猪是否达到出栏的标准,简单快捷,只需要拍摄一段生猪视频即可。在一种实施方式中,可以直接在养殖栏的喂养槽附近安装摄像头以拍摄生猪的视频,也可以通过其他方式拍摄,在此不做限定。Among them, the regression method of the pig weight regression model can be linear regression or lasso regression, and the regression coefficient of the pig weight regression model can be estimated by the least square method, which is not limited here. Through a large number of live pig samples, such as body length, hip height, hip width, volume and other parameters, to perform regression prediction on the weight of the pig, you can get the estimated weight of the pig and judge whether the pig meets the standard for slaughter. It is simple and fast. It only needs to take a picture. The pig video is fine. In one embodiment, a camera can be directly installed near the feeding trough of the breeding pen to take a video of the pig, or it can be taken in other ways, which is not limited here.
可选地,装置还包括预处理单元。Optionally, the device further includes a preprocessing unit.
预处理单元,用于将视频图像中的所有的图像调整为预设像素;输入单元20,还用于将调整后的视频图像输入到预先训练的关键点检测模型中。在本实施方式中,先将视频图像调整为512*256像素,以方便模型进行批量处理。The preprocessing unit is used to adjust all the images in the video image to preset pixels; the input unit 20 is also used to input the adjusted video image into the pre-trained key point detection model. In this embodiment, the video image is first adjusted to 512*256 pixels to facilitate batch processing of the model.
可选地,在将视频图像输入预先训练的关键点检测模型之前,应先构建模型。具体地:Optionally, before inputting the video image into the pre-trained key point detection model, the model should be constructed first. specifically:
构建关键点检测模型,其中,关键点检测模型由四个密集连接的沙漏网络构成;Construct a key point detection model, where the key point detection model consists of four densely connected hourglass networks;
利用预设的训练集对关键点检测模型进行训练,训练过程中采用最小均方误差损失函数使得沙漏网络收敛,得到训练好的关键点检测模型。Use the preset training set to train the key point detection model. In the training process, the minimum mean square error loss function is used to make the hourglass network converge, and the trained key point detection model is obtained.
可以理解地,沙漏网络能够对目标对象的关键点进行有效检测,沙漏网络包括输入层、卷积层、池化层、上采样层、下采样层等。当四个沙漏网络连接在一起时,前一个沙漏网络的输出为相邻一个沙漏网络的输入。为了保证底层参数的正常更新,每个沙漏网络采用中继监督策略来对网络的损失进行监督训练。在本实施例中,在训练开始前,需要初始化网络参数,设置初始学习率为0.00025。Understandably, the hourglass network can effectively detect the key points of the target object. The hourglass network includes an input layer, a convolutional layer, a pooling layer, an up-sampling layer, and a down-sampling layer. When four hourglass networks are connected together, the output of the previous hourglass network is the input of the adjacent hourglass network. In order to ensure the normal update of the underlying parameters, each hourglass network adopts a relay supervision strategy to supervise and train the loss of the network. In this embodiment, before the training starts, the network parameters need to be initialized, and the initial learning rate is set to 0.00025.
所述训练集包括多个生猪图像样本,训练前,需要对训练集中的生猪图像样本进行预处理,例如将生猪图像样本进行裁剪至预设像素,去除环境干扰区域,并对裁剪后的生猪图像样本人工标记各个关键点,其中,人工标注的关键点n表示为(x,y,z)。The training set includes a plurality of live pig image samples. Before training, the live pig image samples in the training set need to be preprocessed, for example, the live pig image samples are cropped to preset pixels, the environmental interference area is removed, and the cropped live pig image The sample manually marks each key point, where the key point n manually marked is represented as (x, y, z).
然后将预处理后的训练样本输入四阶沙漏网络,沙漏网络包括上级路和下级路。生猪图像样本进行四次降采样,每次降采样之前,上级路处理原尺寸的生猪图像,下级路对原尺寸的生猪图像进行降采样之后再进行升采样处理。在本实施方式中,可以从原始尺寸(512*256)中提取到原始尺寸、1/2、1/4、1/8的中间特性,每次提取特征后通过升采样使图像恢复至原始大小,与原始尺寸特征的数据进行相加,再通过一个残差网络进行特征提取;两次降采样之间,使用三个初级模块提取特征;两次相加之间,使用一个初级模块提取特征。Then input the preprocessed training samples into the fourth-order hourglass network, which includes the upper road and the lower road. The live pig image samples are down-sampled four times. Before each down-sampling, the upper-level road processes the original-size live pig images, and the lower-level path down-samples the original-size live pig images before performing up-sampling. In this embodiment, the intermediate characteristics of the original size, 1/2, 1/4, and 1/8 can be extracted from the original size (512*256), and the image is restored to the original size by upsampling after each feature is extracted , Add the original size feature data, and then perform feature extraction through a residual network; between two downsampling, three primary modules are used to extract features; between two additions, one primary module is used to extract features.
四阶沙漏网络中,每个沙漏网络都是通过池化层进行向降采样、临近插值进行升采样,从而自顶而下和自底而上地在每个尺寸上都能提取关键点特征。沙漏之间采用跳跃连接,使得每个分辨率下的关键点位置信息保存下来。In the fourth-order hourglass network, each hourglass network is down-sampling through the pooling layer, and adjacent interpolation is up-sampling, so that key point features can be extracted from top to bottom and bottom to top in each size. Jumping connections are used between the hourglasses, so that the key point position information at each resolution is preserved.
上述的升采样和降采样,为了帮助理解,示例性地,原始图像的大小为3*512*256,其中,512*256指的是RGB图像的分辨率,3表示特征通道数目,在沙漏网络的全连接层可以直接设定特征通道数目,在本实施例 中,特征通道数目为3。降采样是指将图像的分辨率降低的操作。例如,对3*512*256的原始图像进行一次最大池化采样或平均池化采样,得到多个3*256*108的图像。升采样是指将图像的分辨率提升的操作。例如,对3*64*64的图像,采用最近邻插值得到3*128*128的图像。The above upsampling and downsampling, to help understanding, exemplarily, the size of the original image is 3*512*256, where 512*256 refers to the resolution of the RGB image, 3 represents the number of feature channels, in the hourglass network The number of characteristic channels can be directly set in the fully connected layer of, in this embodiment, the number of characteristic channels is 3. Downsampling refers to the operation of reducing the resolution of an image. For example, a maximum pooling sampling or average pooling sampling is performed on a 3*512*256 original image to obtain multiple 3*256*108 images. Upsampling refers to the operation of increasing the resolution of an image. For example, for an image of 3*64*64, the nearest neighbor interpolation is used to obtain an image of 3*128*128.
训练时,P n(i,j,k)表示关键点n的体积元素(i,j,k)的预测可能性。为了训练模型,训练样本中的标注的关键点n(x,y,z)使用下式计算,
Figure PCTCN2019104332-appb-000003
During training, P n (i, j, k) represents the prediction probability of the volume element (i, j, k) of the key point n. In order to train the model, the key points n(x, y, z) labeled in the training sample are calculated using the following formula,
Figure PCTCN2019104332-appb-000003
将σ=2,在训练过程中,使用均方差损失作为损失函数。具体地,损失函数Loss公式如下:Set σ=2, and use the mean square error loss as the loss function in the training process. Specifically, the loss function Loss formula is as follows:
Figure PCTCN2019104332-appb-000004
Figure PCTCN2019104332-appb-000004
在多图多角度情况下,将会有一部分关键点因为遮挡原因在图中不可见,此时在计算Loss时,不可见关键点对应的热力图将不会计算在内。In the case of multiple images and multiple angles, some key points will not be visible in the image due to occlusion. At this time, when calculating Loss, the heat map corresponding to the invisible key points will not be counted.
训练后,当损失函数收敛至预设区间,关键点检测模型就表示已经训练好。After training, when the loss function converges to a preset interval, the key point detection model indicates that it has been trained.
在一种实施方式中,利用视频图像中多个角度以及多帧图像中识别出的关键点的位置信息,做三维重建,从而可以得到各个关键点在同一坐标系下的绝对坐标和关键点之间的距离。In one embodiment, the position information of key points identified in multiple angles in the video image and multiple frames of images is used to perform three-dimensional reconstruction, so that the absolute coordinates of each key point in the same coordinate system and the key point can be obtained. The distance between.
进一步地,从关键点热力图上获取关键点的位置信息,并根据关键点的位置信息来计算两个预设的关键点之间的距离,也可以采用VIO(Vision-Inertial Odometry,视觉里程计框架)跟踪方法来计算两个关键点之间的距离。Further, obtain the position information of the key points from the heat map of the key points, and calculate the distance between the two preset key points according to the position information of the key points, or use VIO (Vision-Inertial Odometry, visual odometry). Frame) tracking method to calculate the distance between two key points.
本方案中,通过采用视频图像作为输入,利用计算机视觉技术和深度神经网络技术,对生猪的全身关键点进行实时检测和跟踪,并同时计算出各关键点之间的距离,从而精确计算出关于生猪臀宽、臀高、身长及体积等物理参数,利用数据库中已知的生猪物理参数与体重之间的关系,对生 猪的准确体重做出预测,提高视觉测量生猪体重的准确性。In this solution, by using video images as input, computer vision technology and deep neural network technology, real-time detection and tracking of the key points of the whole body of the pig, and at the same time calculate the distance between the key points, so as to accurately calculate the The physical parameters such as hip width, hip height, body length and volume of pigs are used to predict the accurate weight of pigs by using the known relationship between pig physical parameters and body weight in the database to improve the accuracy of visual measurement of pig weight.
本申请实施例提供了一种计算机非易失性存储介质,存储介质包括存储的程序,其中,在程序运行时控制存储介质所在设备执行以下步骤:The embodiment of the present application provides a computer non-volatile storage medium, the storage medium includes a stored program, wherein the device where the storage medium is located is controlled to perform the following steps when the program runs:
获取关于待测量生猪的视频图像;将所述视频图像输入预先训练的关键点检测模型,得到所述模型输出的所述待测量生猪的关键点热力图和关键点位置信息;根据所述关键点位置信息匹配得到多个预设关键点;根据所述待测量生猪的预设关键点计算所述待测量生猪的臀宽、臀高、身长;根据所述臀宽、所述臀高、所述身长计算所述待测量生猪的体积;将所述臀宽、所述臀高、所述身长及所述体积输入预设的生猪体重回归模型计算得到所述待测量生猪的体重预测值。Obtain a video image of the pig to be measured; input the video image into a pre-trained key point detection model to obtain the key point heat map and key point location information of the pig to be measured output by the model; according to the key point The position information is matched to obtain a plurality of preset key points; the hip width, hip height, and body length of the pig to be measured are calculated according to the preset key points of the pig to be measured; according to the hip width, the hip height, and the The body length calculates the volume of the pig to be measured; the hip width, the hip height, the body length and the volume are input into a preset pig weight regression model to calculate the weight prediction value of the pig to be measured.
可选地,在程序运行时控制存储介质所在设备执行以下步骤:所述根据所述臀宽、所述臀高、所述身长计算所述待测量生猪的体积的计算公式为:V=W*L*H,其中,W为所述待测量生猪的臀宽,H为所述待测量生猪的臀高,L为所述待测量生猪的身长。Optionally, when the program is running, the device where the storage medium is located is controlled to perform the following steps: the calculation formula for calculating the volume of the pig to be measured based on the hip width, the hip height, and the body length is: V=W* L*H, where W is the hip width of the pig to be measured, H is the hip height of the pig to be measured, and L is the body length of the pig to be measured.
可选地,在程序运行时控制存储介质所在设备执行以下步骤:所述预设关键点包括嘴、头、颈、左前肘、左前脚尖、右前脚尖、左后肘、左后脚尖、右后肘、右后脚尖、脊前部、脊中部、尾、肚中部、肚后部;所述根据所述待测量生猪的预设关键点计算所述待测量生猪的臀宽、臀高、身长,包括:根据匹配得到的“头”关键点和“尾”关键点的位置信息计算所述待测量生猪的身长;根据匹配得到的“脊中部”关键点和“肚中部”关键点的位置信息计算所述待测量生猪的臀高;根据匹配得到的“左后肘”关键点和“右后肘”关键点的位置信息计算所述待测量生猪的臀宽。Optionally, when the program is running, the device where the storage medium is located is controlled to perform the following steps: the preset key points include mouth, head, neck, left front elbow, left front toe, right front toe, left rear elbow, left rear toe, right rear elbow , Right back toe, front of spine, middle of spine, tail, middle of belly, back of belly; said calculating the hip width, hip height, and body length of the pig to be measured according to the preset key points of the pig to be measured, including : Calculate the body length of the pig to be measured according to the position information of the “head” key points and the “tail” key points obtained by the matching; calculate the body length of the pigs to be measured according to the position information of the key points “central spine” and “mid belly” obtained by the matching The hip height of the pig to be measured is described; the hip width of the pig to be measured is calculated according to the position information of the key points of the "left back elbow" and the key point of the "right back elbow" obtained by matching.
可选地,在程序运行时控制存储介质所在设备执行以下步骤:构建所述关键点检测模型,其中,所述关键点检测模型由四个密集连接的沙漏网络构成;利用预设的训练集对所述关键点检测模型进行训练,训练过程中采用最小均方误差损失函数使得所述沙漏网络收敛,得到训练好的所述关键点检测模型。Optionally, when the program is running, the device where the storage medium is located is controlled to perform the following steps: construct the key point detection model, wherein the key point detection model is composed of four densely connected hourglass networks; use a preset training set pair The key point detection model is trained, and the minimum mean square error loss function is used in the training process to make the hourglass network converge to obtain the trained key point detection model.
可选地,在程序运行时控制存储介质所在设备执行以下步骤:所述训 练集包括多个生猪图像样本;所述沙漏网络包括上级路和下级路,所述上级路处理原尺寸的生猪图像,所述下级路对所述原尺寸的生猪图像进行降采样后再进行升采样处理。Optionally, when the program is running, the device where the storage medium is located is controlled to perform the following steps: the training set includes a plurality of live pig image samples; the hourglass network includes an upper-level road and a lower-level road, and the upper-level road processes the original-size pig images, The lower-level road performs down-sampling on the original size pig image and then up-sampling.
可选地,在程序运行时控制存储介质所在设备执行以下步骤:所述降采样采用最大池化或平均池化,所述升采样采用最近邻插值法。Optionally, when the program is running, the device where the storage medium is located is controlled to perform the following steps: the down-sampling adopts maximum pooling or average pooling, and the up-sampling adopts the nearest neighbor interpolation method.
可选地,在程序运行时控制存储介质所在设备执行以下步骤:采集若干个生猪样本的体重及参考数据,所述参考数据包括臀宽、臀高、身长及体积;将所述参考数据作为变量,对应的生猪样本的体重作为结果,建立生猪体重回归模型。Optionally, when the program is running, the device where the storage medium is located is controlled to perform the following steps: collect the weight and reference data of a number of pig samples, the reference data including hip width, hip height, body length and volume; use the reference data as variables , The weight of the corresponding pig sample is used as the result, and the pig weight regression model is established.
图4是本申请实施例提供的一种计算机设备的示意图。如图4所示,该实施例的计算机设备100包括:处理器101、存储器102以及存储在存储器102中并可在处理器101上运行的计算机程序103,处理器101执行计算机程序103时实现实施例中的生猪体重测量方法,为避免重复,此处不一一赘述。或者,该计算机程序被处理器101执行时实现实施例中生猪体重测量装置中各模型/单元的功能,为避免重复,此处不一一赘述。Fig. 4 is a schematic diagram of a computer device provided by an embodiment of the present application. As shown in FIG. 4, the computer device 100 of this embodiment includes a processor 101, a memory 102, and a computer program 103 stored in the memory 102 and running on the processor 101. The processor 101 executes the computer program 103 when the computer program 103 is executed. In order to avoid repetition, the method of measuring pig weight in the example will not be repeated here. Alternatively, when the computer program is executed by the processor 101, the function of each model/unit in the pig weight measurement device in the embodiment is realized. To avoid repetition, it will not be repeated here.
计算机设备100可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。计算机设备可包括,但不仅限于,处理器101、存储器102。本领域技术人员可以理解,图3仅仅是计算机设备100的示例,并不构成对计算机设备100的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如计算机设备还可以包括输入输出设备、网络接入设备、总线等。The computer device 100 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server. The computer device may include, but is not limited to, a processor 101 and a memory 102. Those skilled in the art can understand that FIG. 3 is only an example of the computer device 100, and does not constitute a limitation on the computer device 100. It may include more or less components than shown in the figure, or a combination of certain components, or different components. For example, computer equipment may also include input and output devices, network access devices, buses, and so on.
所称处理器101可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 101 may be a central processing unit (Central Processing Unit, CPU), other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
存储器102可以是计算机设备100的内部存储单元,例如计算机设备100的硬盘或内存。存储器102也可以是计算机设备100的外部存储设备,例如计算机设备100上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器102还可以既包括计算机设备100的内部存储单元也包括外部存储设备。存储器102用于存储计算机程序以及计算机设备所需的其他程序和数据。存储器102还可以用于暂时地存储已经输出或者将要输出的数据。The memory 102 may be an internal storage unit of the computer device 100, such as a hard disk or memory of the computer device 100. The memory 102 may also be an external storage device of the computer device 100, such as a plug-in hard disk equipped on the computer device 100, a smart memory card (Smart Media Card, SMC), a Secure Digital (SD) card, and a flash memory card (Flash). Card) and so on. Further, the memory 102 may also include both an internal storage unit of the computer device 100 and an external storage device. The memory 102 is used to store computer programs and other programs and data required by the computer equipment. The memory 102 can also be used to temporarily store data that has been output or will be output.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the above-described system, device, and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined Or it can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机装置(可以是个人计算机,服务器,或者网络装置等)或处理器(Processor)执行本申请各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器 (Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (Processor) execute the method described in each embodiment of the present application Part of the steps. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。The above are only the preferred embodiments of this application and are not intended to limit this application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in this application Within the scope of protection.

Claims (19)

  1. 一种生猪体重测量方法,其特征在于,所述方法包括:A method for measuring pig weight, characterized in that, the method comprises:
    获取关于待测量生猪的视频图像;Obtain video images of pigs to be measured;
    将所述视频图像输入预先训练的关键点检测模型,得到所述模型输出的所述待测量生猪的关键点热力图和关键点位置信息;Input the video image into a pre-trained key point detection model to obtain the key point heat map and key point position information of the pig to be measured output by the model;
    根据所述关键点位置信息匹配得到多个预设关键点;Multiple preset key points are obtained by matching according to the key point position information;
    根据所述待测量生猪的预设关键点计算所述待测量生猪的臀宽、臀高、身长;Calculating the hip width, hip height, and body length of the pig to be measured according to the preset key points of the pig to be measured;
    根据所述臀宽、所述臀高、所述身长计算所述待测量生猪的体积;Calculating the volume of the pig to be measured according to the hip width, the hip height, and the body length;
    将所述臀宽、所述臀高、所述身长及所述体积输入预设的生猪体重回归模型计算得到所述待测量生猪的体重预测值。The hip width, the hip height, the body length and the volume are input into a preset pig weight regression model to calculate the weight prediction value of the pig to be measured.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述臀宽、所述臀高、所述身长计算所述待测量生猪的体积的计算公式为:The method according to claim 1, wherein the calculation formula for calculating the volume of the pig to be measured according to the hip width, the hip height, and the body length is:
    V=W*L*H,其中,W为所述待测量生猪的臀宽,H为所述待测量生猪的臀高,L为所述待测量生猪的身长。V=W*L*H, where W is the hip width of the pig to be measured, H is the hip height of the pig to be measured, and L is the body length of the pig to be measured.
  3. 根据权利要求2所述的方法,其特征在于,所述预设关键点包括嘴、头、颈、左前肘、左前脚尖、右前脚尖、左后肘、左后脚尖、右后肘、右后脚尖、脊前部、脊中部、尾、肚中部、肚后部;所述根据所述待测量生猪的预设关键点计算所述待测量生猪的臀宽、臀高、身长,包括:The method according to claim 2, wherein the preset key points include mouth, head, neck, left front elbow, left front toe, right front toe, left rear elbow, left rear toe, right rear elbow, right rear toe , The front of the spine, the middle of the spine, the tail, the middle of the belly, and the back of the belly; said calculating the hip width, hip height, and body length of the pig to be measured according to the preset key points of the pig to be measured, including:
    根据匹配得到的“头”关键点和“尾”关键点的位置信息计算所述待测量生猪的身长;Calculate the body length of the live pig to be measured according to the position information of the “head” key point and the “tail” key point obtained by matching;
    根据匹配得到的“脊中部”关键点和“肚中部”关键点的位置信息计算所述待测量生猪的臀高;Calculate the hip height of the live pig to be measured according to the position information of the key points of the "central ridge" and the key points of the "middle belly" obtained by matching;
    根据匹配得到的“左后肘”关键点和“右后肘”关键点的位置信息计算所述待测量生猪的臀宽。The hip width of the pig to be measured is calculated according to the position information of the key points of the “left rear elbow” and the “right rear elbow” obtained by the matching.
  4. 根据权利要求1所述的方法,其特征在于,在所述将所述视频图像输入预先训练的关键点检测模型,得到所述模型输出的所述待测量生猪的关键点热力图和关键点位置信息之前,所述方法还包括:The method according to claim 1, wherein after the video image is input into a pre-trained key point detection model, the key point heat map and key point positions of the pig to be measured output by the model are obtained Before information, the method also includes:
    构建所述关键点检测模型,其中,所述关键点检测模型由四个密集连接的沙 漏网络构成;Constructing the key point detection model, wherein the key point detection model is composed of four densely connected hourglass networks;
    利用预设的训练集对所述关键点检测模型进行训练,训练过程中采用最小均方误差损失函数使得所述沙漏网络收敛,得到训练好的所述关键点检测模型。A preset training set is used to train the key point detection model, and a minimum mean square error loss function is used in the training process to make the hourglass network converge to obtain the trained key point detection model.
  5. 根据权利要求5所述的方法,其特征在于,所述训练集包括多个生猪图像样本;所述沙漏网络包括上级路和下级路,所述上级路处理原尺寸的生猪图像,所述下级路对所述原尺寸的生猪图像进行降采样后再进行升采样处理。The method according to claim 5, wherein the training set includes a plurality of live pig image samples; the hourglass network includes an upper-level road and a lower-level road, the upper-level road processes original-size live pig images, and the lower-level road After down-sampling the live pig image of the original size, up-sampling is performed.
  6. 根据权利要求6所述的方法,其特征在于,所述降采样采用最大池化或平均池化,所述升采样采用最近邻插值法。The method according to claim 6, wherein the down-sampling adopts maximum pooling or average pooling, and the up-sampling adopts nearest neighbor interpolation.
  7. 根据权利要求1所述的方法,其特征在于,在所述将所述臀宽、所述臀高、所述身长及所述体积输入预设的生猪体重回归模型计算得到所述待测量生猪的体重预测值之前,所述方法还包括:The method according to claim 1, characterized in that in said inputting said hip width, said hip height, said body length and said volume into a preset pig weight regression model to calculate the weight of the pig to be measured Before weight prediction, the method also includes:
    采集若干个生猪样本的体重及参考数据,所述参考数据包括臀宽、臀高、身长及体积;Collect the weight and reference data of several live pig samples, the reference data including hip width, hip height, body length and volume;
    将所述参考数据作为变量,对应的生猪样本的体重作为结果,建立生猪体重回归模型。Using the reference data as a variable and the weight of the corresponding pig sample as a result, a pig weight regression model is established.
  8. 一种生猪体重测量装置,其特征在于,所述装置包括:A device for measuring pig weight, characterized in that the device comprises:
    获取单元,用于获取关于待测量生猪的视频图像;The acquiring unit is used to acquire video images about the pigs to be measured;
    输入单元,用于将所述视频图像输入预先训练的关键点检测模型,得到所述模型输出的所述待测量生猪的关键点热力图和关键点位置信息;The input unit is configured to input the video image into a pre-trained key point detection model to obtain the key point heat map and key point position information of the pig to be measured output by the model;
    匹配单元,用于根据所述关键点位置信息匹配得到多个预设关键点;The matching unit is configured to obtain multiple preset key points by matching according to the key point position information;
    第一计算单元,用于根据所述待测量生猪的预设关键点计算所述待测量生猪的臀宽、臀高、身长;The first calculation unit is configured to calculate the hip width, hip height, and body length of the pig to be measured according to the preset key points of the pig to be measured;
    第二计算单元,用于根据所述臀宽、所述臀高、所述身长计算所述待测量生猪的体积;A second calculation unit, configured to calculate the volume of the pig to be measured according to the hip width, the hip height, and the body length;
    第三计算单元,用于将所述臀宽、所述臀高、所述身长及所述体积输入预设的生猪体重回归模型计算得到所述待测量生猪的体重预测值。The third calculation unit is configured to input the hip width, the hip height, the body length and the volume into a preset pig weight regression model to calculate the weight prediction value of the pig to be measured.
  9. 根据权利要求9所述的装置,其特征在于,所述根据所述臀宽、所述臀高、所述身长计算所述待测量生猪的体积的计算公式为:The device according to claim 9, wherein the calculation formula for calculating the volume of the pig to be measured according to the hip width, the hip height, and the body length is:
    V=W*L*H,其中,W为所述待测量生猪的臀宽,H为所述待测量生猪的臀 高,L为所述待测量生猪的身长。V=W*L*H, where W is the hip width of the pig to be measured, H is the hip height of the pig to be measured, and L is the body length of the pig to be measured.
  10. 根据权利要求10所述的装置,其特征在于,所述预设关键点包括嘴、头、颈、左前肘、左前脚尖、右前脚尖、左后肘、左后脚尖、右后肘、右后脚尖、脊前部、脊中部、尾、肚中部、肚后部;所述第一计算单元包括第一计算子单元、第二计算子单元、第三计算子单元;The device according to claim 10, wherein the preset key points include mouth, head, neck, left front elbow, left front toe, right front toe, left rear elbow, left rear toe, right rear elbow, right rear toe , The front of the spine, the middle of the spine, the tail, the middle of the belly, and the back of the belly; the first calculation unit includes a first calculation subunit, a second calculation subunit, and a third calculation subunit;
    所述第一计算子单元,用于根据匹配得到的“头”关键点和“尾”关键点的位置信息计算所述待测量生猪的身长;The first calculation subunit is configured to calculate the body length of the live pig to be measured according to the position information of the “head” key point and the “tail” key point obtained by matching;
    所述第二计算子单元,用于根据匹配得到的“脊中部”关键点和“肚中部”关键点的位置信息计算所述待测量生猪的臀高;The second calculation subunit is used to calculate the hip height of the pig to be measured based on the position information of the key point of the "mid ridge" and the key point of the "mid belly" obtained by matching;
    所述第三计算子单元,用于根据匹配得到的“左后肘”关键点和“右后肘”关键点的位置信息计算所述待测量生猪的臀宽。The third calculation subunit is used to calculate the hip width of the pig to be measured based on the position information of the key points of the "left rear elbow" and the "right rear elbow" obtained by matching.
  11. 根据权利要求9所述的装置,其特征在于,所述装置还包括采集单元、建立单元;The device according to claim 9, wherein the device further comprises a collection unit and an establishment unit;
    所述采集单元,用于采集若干个生猪样本的体重及参考数据,参考数据包括臀宽、臀高、身长及体积;The collection unit is used to collect the weight and reference data of a number of live pig samples, the reference data including hip width, hip height, body length and volume;
    所述建立单元,用于将参考数据作为变量,对应的生猪样本的体重作为结果,建立生猪体重回归模型。The establishment unit is used to establish a regression model of the pig weight by using the reference data as a variable and the weight of the corresponding pig sample as a result.
  12. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现以下步骤:A computer device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the following steps when the processor executes the computer program:
    获取关于待测量生猪的视频图像;Obtain video images of pigs to be measured;
    将所述视频图像输入预先训练的关键点检测模型,得到所述模型输出的所述待测量生猪的关键点热力图和关键点位置信息;Input the video image into a pre-trained key point detection model to obtain the key point heat map and key point position information of the pig to be measured output by the model;
    根据所述关键点位置信息匹配得到多个预设关键点;根据所述待测量生猪的预设关键点计算所述待测量生猪的臀宽、臀高、身长;Multiple preset key points are obtained by matching according to the key point position information; calculate the hip width, hip height, and body length of the pig to be measured according to the preset key points of the pig to be measured;
    根据所述臀宽、所述臀高、所述身长计算所述待测量生猪的体积;Calculating the volume of the pig to be measured according to the hip width, the hip height, and the body length;
    将所述臀宽、所述臀高、所述身长及所述体积输入预设的生猪体重回归模型计算得到所述待测量生猪的体重预测值。The hip width, the hip height, the body length and the volume are input into a preset pig weight regression model to calculate the weight prediction value of the pig to be measured.
  13. 根据权利要求13所述的计算机设备,其特征在于,所述处理器执行所述计算机程序时还实现以下步骤:The computer device according to claim 13, wherein the processor further implements the following steps when executing the computer program:
    所述根据所述臀宽、所述臀高、所述身长计算所述待测量生猪的体积的计算公式为:V=W*L*H,其中,W为所述待测量生猪的臀宽,H为所述待测量生猪的臀高,L为所述待测量生猪的身长。The calculation formula for calculating the volume of the pig to be measured based on the hip width, the hip height, and the body length is: V=W*L*H, where W is the hip width of the pig to be measured, H is the hip height of the pig to be measured, and L is the body length of the pig to be measured.
  14. 根据权利要求14所述的计算机设备,其特征在于,所述预设关键点包括嘴、头、颈、左前肘、左前脚尖、右前脚尖、左后肘、左后脚尖、右后肘、右后脚尖、脊前部、脊中部、尾、肚中部、肚后部;所述处理器执行所述计算机程序时还实现以下步骤:The computer device according to claim 14, wherein the preset key points include mouth, head, neck, left front elbow, left front toe, right front toe, left back elbow, left back toe, right back elbow, right back Tiptoes, anterior spine, middle spine, tail, middle belly, and back belly; the processor also implements the following steps when executing the computer program:
    根据匹配得到的“头”关键点和“尾”关键点的位置信息计算所述待测量生猪的身长;Calculate the body length of the live pig to be measured according to the position information of the “head” key point and the “tail” key point obtained by matching;
    根据匹配得到的“脊中部”关键点和“肚中部”关键点的位置信息计算所述待测量生猪的臀高;Calculate the hip height of the live pig to be measured according to the position information of the key points of the "central ridge" and the key points of the "middle belly" obtained by matching;
    根据匹配得到的“左后肘”关键点和“右后肘”关键点的位置信息计算所述待测量生猪的臀宽。The hip width of the pig to be measured is calculated according to the position information of the key points of the “left rear elbow” and the “right rear elbow” obtained by the matching.
  15. 根据权利要求13所述的计算机设备,其特征在于,所述处理器执行所述计算机程序时还实现以下步骤:The computer device according to claim 13, wherein the processor further implements the following steps when executing the computer program:
    构建所述关键点检测模型,其中,所述关键点检测模型由四个密集连接的沙漏网络构成;Constructing the key point detection model, wherein the key point detection model is composed of four densely connected hourglass networks;
    利用预设的训练集对所述关键点检测模型进行训练,训练过程中采用最小均方误差损失函数使得所述沙漏网络收敛,得到训练好的所述关键点检测模型。A preset training set is used to train the key point detection model, and a minimum mean square error loss function is used in the training process to make the hourglass network converge to obtain the trained key point detection model.
  16. 一种计算机非易失性可读存储介质,所述存储介质包括存储的程序,其特征在于,在所述程序运行时控制所述存储介质所在设备执行以下步骤:A computer non-volatile readable storage medium, the storage medium including a stored program, characterized in that, when the program is running, the device where the storage medium is located is controlled to perform the following steps:
    获取关于待测量生猪的视频图像;Obtain video images of pigs to be measured;
    将所述视频图像输入预先训练的关键点检测模型,得到所述模型输出的所述待测量生猪的关键点热力图和关键点位置信息;Input the video image into a pre-trained key point detection model to obtain the key point heat map and key point position information of the pig to be measured output by the model;
    根据所述关键点位置信息匹配得到多个预设关键点;根据所述待测量生猪的预设关键点计算所述待测量生猪的臀宽、臀高、身长;Multiple preset key points are obtained by matching according to the key point position information; calculate the hip width, hip height, and body length of the pig to be measured according to the preset key points of the pig to be measured;
    根据所述臀宽、所述臀高、所述身长计算所述待测量生猪的体积;Calculating the volume of the pig to be measured according to the hip width, the hip height, and the body length;
    将所述臀宽、所述臀高、所述身长及所述体积输入预设的生猪体重回归模型计算得到所述待测量生猪的体重预测值。The hip width, the hip height, the body length and the volume are input into a preset pig weight regression model to calculate the weight prediction value of the pig to be measured.
  17. 根据权利要求17所述的计算机非易失性可读存储介质,其特征在于,在所述程序运行时控制所述存储介质所在设备执行以下步骤:The computer non-volatile readable storage medium according to claim 17, wherein the device where the storage medium is located is controlled to perform the following steps when the program is running:
    所述根据所述臀宽、所述臀高、所述身长计算所述待测量生猪的体积的计算公式为:V=W*L*H,其中,W为所述待测量生猪的臀宽,H为所述待测量生猪的臀高,L为所述待测量生猪的身长。The calculation formula for calculating the volume of the pig to be measured based on the hip width, the hip height, and the body length is: V=W*L*H, where W is the hip width of the pig to be measured, H is the hip height of the pig to be measured, and L is the body length of the pig to be measured.
  18. 根据权利要求18所述的计算机非易失性可读存储介质,其特征在于,所述预设关键点包括嘴、头、颈、左前肘、左前脚尖、右前脚尖、左后肘、左后脚尖、右后肘、右后脚尖、脊前部、脊中部、尾、肚中部、肚后部;在所述程序运行时控制所述存储介质所在设备执行以下步骤:The computer non-volatile readable storage medium according to claim 18, wherein the preset key points include mouth, head, neck, left front elbow, left front toe, right front toe, left rear elbow, left rear toe , Right back elbow, right back toe, anterior spine, middle spine, tail, middle belly, back belly; when the program is running, control the device where the storage medium is located to perform the following steps:
    根据匹配得到的“头”关键点和“尾”关键点的位置信息计算所述待测量生猪的身长;Calculate the body length of the live pig to be measured according to the position information of the “head” key point and the “tail” key point obtained by matching;
    根据匹配得到的“脊中部”关键点和“肚中部”关键点的位置信息计算所述待测量生猪的臀高;Calculate the hip height of the live pig to be measured according to the position information of the key points of the "central ridge" and the key points of the "middle belly" obtained by matching;
    根据匹配得到的“左后肘”关键点和“右后肘”关键点的位置信息计算所述待测量生猪的臀宽。The hip width of the pig to be measured is calculated according to the position information of the key points of the “left rear elbow” and the “right rear elbow” obtained by the matching.
  19. 根据权利要求17所述的计算机非易失性可读存储介质,其特征在于,在所述程序运行时控制所述存储介质所在设备执行以下步骤:The computer non-volatile readable storage medium according to claim 17, wherein the device where the storage medium is located is controlled to perform the following steps when the program is running:
    构建所述关键点检测模型,其中,所述关键点检测模型由四个密集连接的沙漏网络构成;Constructing the key point detection model, wherein the key point detection model is composed of four densely connected hourglass networks;
    利用预设的训练集对所述关键点检测模型进行训练,训练过程中采用最小均方误差损失函数使得所述沙漏网络收敛,得到训练好的所述关键点检测模型。A preset training set is used to train the key point detection model, and a minimum mean square error loss function is used in the training process to make the hourglass network converge to obtain the trained key point detection model.
PCT/CN2019/104332 2019-07-04 2019-09-04 Pig weight measurement method and apparatus WO2021000423A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910601442.4A CN110426112B (en) 2019-07-04 2019-07-04 Live pig weight measuring method and device
CN201910601442.4 2019-07-04

Publications (1)

Publication Number Publication Date
WO2021000423A1 true WO2021000423A1 (en) 2021-01-07

Family

ID=68408931

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/104332 WO2021000423A1 (en) 2019-07-04 2019-09-04 Pig weight measurement method and apparatus

Country Status (2)

Country Link
CN (1) CN110426112B (en)
WO (1) WO2021000423A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113627486A (en) * 2021-07-12 2021-11-09 杨龙 Livestock weight estimation method, device and storage medium
CN114926633A (en) * 2022-03-25 2022-08-19 成都爱记科技有限公司 High-precision pig weight estimation method based on deep learning
CN114973321A (en) * 2022-05-18 2022-08-30 东南大学 Feature point selection and measurement method for live pig body ruler vision measurement
CN115331266A (en) * 2022-10-17 2022-11-11 天津大学四川创新研究院 Pig unique identification duplicate removal alarm method
CN116453061A (en) * 2023-06-08 2023-07-18 厦门农芯数字科技有限公司 Remote pig selling supervision method, device and equipment based on image recognition

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111126416A (en) * 2019-12-12 2020-05-08 创新奇智(重庆)科技有限公司 Engine chain wheel identification system and identification method based on key point detection
CN111222475B (en) * 2020-01-09 2023-05-26 洛阳语音云创新研究院 Pig tail biting detection method, device and storage medium
CN111428202B (en) * 2020-03-29 2023-06-02 江苏深农智能科技有限公司 Intelligent livestock and poultry breeding weighing method and system
CN113532616A (en) * 2020-04-15 2021-10-22 阿里巴巴集团控股有限公司 Weight estimation method, device and system based on computer vision
CN112801118B (en) * 2021-02-26 2024-02-02 潘志乐 Pork pig marketing benefit evaluation system and method based on artificial intelligence and big data
CN113096178A (en) * 2021-04-25 2021-07-09 中国农业大学 Pig weight estimation method, device, equipment and storage medium
CN113344960B (en) * 2021-05-10 2022-11-15 河南省农业科学院畜牧兽医研究所 Live cattle body ruler weight measuring method based on machine vision
CN113487107B (en) * 2021-07-28 2024-04-12 华南农业大学 Automatic large animal weight assessment method, system and medium based on multilayer radial basis network
CN113711992B (en) * 2021-08-16 2022-07-05 佛山职业技术学院 Method and system for acquiring growth state of live pig
CN113537175B (en) * 2021-09-16 2022-06-03 湖南朗国视觉识别研究院有限公司 Same-fence swinery average weight estimation method based on computer vision
CN113920453A (en) * 2021-10-13 2022-01-11 华南农业大学 Pig body size weight estimation method based on deep learning
CN115111986A (en) * 2022-06-08 2022-09-27 合肥拉塞特机器人科技有限公司 Automatic weight estimation system
CN116206342B (en) * 2023-04-27 2023-07-25 广东省农业科学院动物科学研究所 Pig weight detection method, device, equipment and storage medium
CN116519106B (en) * 2023-06-30 2023-09-15 中国农业大学 Method, device, storage medium and equipment for determining weight of live pigs

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002286421A (en) * 2001-03-28 2002-10-03 Hideo Minagawa Apparatus for measuring weight of animal
CN103884280A (en) * 2014-03-14 2014-06-25 中国农业大学 Mobile system for monitoring body sizes and weights of pigs in multiple pigsties
CN105784083A (en) * 2016-04-05 2016-07-20 北京农业信息技术研究中心 Cow shape measuring method and cow shape measuring system based on stereo vision technology
CN109459119A (en) * 2018-10-17 2019-03-12 北京京东金融科技控股有限公司 A kind of body weight measurement, equipment and computer readable storage medium
CN109556691A (en) * 2018-11-05 2019-04-02 上海睿畜电子科技有限公司 A kind of method, apparatus and system for estimating field livestock counterpoise
CN109579956A (en) * 2018-12-13 2019-04-05 北京小龙潜行科技有限公司 A kind of intelligent limit method for measuring weight, device, electronic equipment and storage medium of raising pigs
CN109632059A (en) * 2018-12-13 2019-04-16 北京小龙潜行科技有限公司 A kind of intelligence method for culturing pigs, system, electronic equipment and storage medium
CN109632058A (en) * 2018-12-13 2019-04-16 北京小龙潜行科技有限公司 A kind of intelligent group rearing method for measuring weight, device, electronic equipment and storage medium of raising pigs
KR20190068266A (en) * 2017-12-08 2019-06-18 김정구 System for measuring weight of livestocks using image analysis and method using the same

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017208436A1 (en) * 2016-06-03 2017-12-07 株式会社オプティム Animal weight estimation system, animal weight estimation method, and program
CN206177429U (en) * 2016-11-04 2017-05-17 北京农业信息技术研究中心 Meat chicken weight estimation device based on range image
CN108229490B (en) * 2017-02-23 2021-01-05 北京市商汤科技开发有限公司 Key point detection method, neural network training method, device and electronic equipment
CN109141248B (en) * 2018-07-26 2020-09-08 深源恒际科技有限公司 Pig weight measuring and calculating method and system based on image
CN109636826A (en) * 2018-11-13 2019-04-16 平安科技(深圳)有限公司 Live pig weight method for measurement, server and computer readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002286421A (en) * 2001-03-28 2002-10-03 Hideo Minagawa Apparatus for measuring weight of animal
CN103884280A (en) * 2014-03-14 2014-06-25 中国农业大学 Mobile system for monitoring body sizes and weights of pigs in multiple pigsties
CN105784083A (en) * 2016-04-05 2016-07-20 北京农业信息技术研究中心 Cow shape measuring method and cow shape measuring system based on stereo vision technology
KR20190068266A (en) * 2017-12-08 2019-06-18 김정구 System for measuring weight of livestocks using image analysis and method using the same
CN109459119A (en) * 2018-10-17 2019-03-12 北京京东金融科技控股有限公司 A kind of body weight measurement, equipment and computer readable storage medium
CN109556691A (en) * 2018-11-05 2019-04-02 上海睿畜电子科技有限公司 A kind of method, apparatus and system for estimating field livestock counterpoise
CN109579956A (en) * 2018-12-13 2019-04-05 北京小龙潜行科技有限公司 A kind of intelligent limit method for measuring weight, device, electronic equipment and storage medium of raising pigs
CN109632059A (en) * 2018-12-13 2019-04-16 北京小龙潜行科技有限公司 A kind of intelligence method for culturing pigs, system, electronic equipment and storage medium
CN109632058A (en) * 2018-12-13 2019-04-16 北京小龙潜行科技有限公司 A kind of intelligent group rearing method for measuring weight, device, electronic equipment and storage medium of raising pigs

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113627486A (en) * 2021-07-12 2021-11-09 杨龙 Livestock weight estimation method, device and storage medium
CN113627486B (en) * 2021-07-12 2024-04-16 杨龙 Livestock weight estimation method, device and storage medium
CN114926633A (en) * 2022-03-25 2022-08-19 成都爱记科技有限公司 High-precision pig weight estimation method based on deep learning
CN114973321A (en) * 2022-05-18 2022-08-30 东南大学 Feature point selection and measurement method for live pig body ruler vision measurement
CN115331266A (en) * 2022-10-17 2022-11-11 天津大学四川创新研究院 Pig unique identification duplicate removal alarm method
CN116453061A (en) * 2023-06-08 2023-07-18 厦门农芯数字科技有限公司 Remote pig selling supervision method, device and equipment based on image recognition
CN116453061B (en) * 2023-06-08 2023-10-03 厦门农芯数字科技有限公司 Remote pig selling supervision method, device and equipment based on image recognition

Also Published As

Publication number Publication date
CN110426112A (en) 2019-11-08
CN110426112B (en) 2022-05-13

Similar Documents

Publication Publication Date Title
WO2021000423A1 (en) Pig weight measurement method and apparatus
CN109141248B (en) Pig weight measuring and calculating method and system based on image
US11914677B2 (en) Image processing method and apparatus, terminal, and storage medium
CN110599528B (en) Unsupervised three-dimensional medical image registration method and system based on neural network
KR102062609B1 (en) A portable weighting system for livestock using 3D images
WO2021179498A1 (en) Target detection method, method for training model therefor, apparatus, and electronic device
CN108961269B (en) Pig weight measuring and calculating method and system based on image
KR20220066366A (en) Predictive individual 3D body model
CN111598998A (en) Three-dimensional virtual model reconstruction method and device, computer equipment and storage medium
CN113920453A (en) Pig body size weight estimation method based on deep learning
TW202125415A (en) Training method, equipment and storage medium of 3d target detection and model
CN116519106B (en) Method, device, storage medium and equipment for determining weight of live pigs
CN108961330A (en) The long measuring method of pig body and system based on image
CN111325217B (en) Data processing method, device, system and medium
He et al. Automatic weight measurement of pigs based on 3D images and regression network
WO2023151237A1 (en) Face pose estimation method and apparatus, electronic device, and storage medium
CN111178276B (en) Image processing method, image processing apparatus, and computer-readable storage medium
JP7223880B2 (en) Convolutional Neural Network Model for Detection of Dairy Cow Teats and its Construction Method
CN110738650B (en) Infectious disease infection identification method, terminal device and storage medium
CN109740659A (en) A kind of image matching method and device, electronic equipment, storage medium
Zhao et al. Automatic body condition scoring for dairy cows based on efficient net and convex hull features of point clouds
CN109509194B (en) Front human body image segmentation method and device under complex background
CN108537329B (en) Method and device for performing operation by using Volume R-CNN neural network
CN114913153A (en) Deep learning technology-based wound identification and area measurement system and method
CN110934565B (en) Method and device for measuring pupil diameter and computer readable storage medium

Legal Events

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

Ref document number: 19935776

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: 19935776

Country of ref document: EP

Kind code of ref document: A1