JP2023129574A - Body weight estimation device, method for estimating body weight, and program - Google Patents
Body weight estimation device, method for estimating body weight, and program Download PDFInfo
- Publication number
- JP2023129574A JP2023129574A JP2023120539A JP2023120539A JP2023129574A JP 2023129574 A JP2023129574 A JP 2023129574A JP 2023120539 A JP2023120539 A JP 2023120539A JP 2023120539 A JP2023120539 A JP 2023120539A JP 2023129574 A JP2023129574 A JP 2023129574A
- Authority
- JP
- Japan
- Prior art keywords
- weight
- posture
- estimation
- image
- height
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000037396 body weight Effects 0.000 title claims abstract description 22
- 238000000034 method Methods 0.000 title claims description 42
- 230000036544 posture Effects 0.000 claims abstract description 98
- 238000005452 bending Methods 0.000 claims abstract description 22
- 210000001217 buttock Anatomy 0.000 claims description 21
- 230000006870 function Effects 0.000 claims 1
- 238000007781 pre-processing Methods 0.000 description 33
- 244000144972 livestock Species 0.000 description 12
- 238000010586 diagram Methods 0.000 description 11
- 238000004364 calculation method Methods 0.000 description 7
- 238000000605 extraction Methods 0.000 description 6
- 230000007717 exclusion Effects 0.000 description 5
- 239000000284 extract Substances 0.000 description 5
- 241000282887 Suidae Species 0.000 description 4
- 241000283690 Bos taurus Species 0.000 description 2
- 241000287828 Gallus gallus Species 0.000 description 2
- 241001465754 Metazoa Species 0.000 description 2
- 241001494479 Pecora Species 0.000 description 2
- 235000013330 chicken meat Nutrition 0.000 description 2
- 238000000611 regression analysis Methods 0.000 description 2
- 238000012706 support-vector machine Methods 0.000 description 2
- 241000271566 Aves Species 0.000 description 1
- 241000283086 Equidae Species 0.000 description 1
- 241000283073 Equus caballus Species 0.000 description 1
- 241000282898 Sus scrofa Species 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 235000013372 meat Nutrition 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Abstract
Description
本発明は、体重推定装置、体重推定方法及びプログラムに関する。 The present invention relates to a body weight estimation device, a body weight estimation method, and a program.
畜産農家では、飼育している家畜の体重を把握することが従来から行われている。これは、例えば、豚等の家畜では、ある体重を超えると食肉としての価値が下がってしまうことがあるためである。 Livestock farmers have traditionally kept track of the weight of their livestock. This is because, for example, when livestock such as pigs exceed a certain weight, their value as meat may decrease.
ところで、畜産農家で飼育されている家畜は数百頭(又は数百匹、数百羽等)を超える場合がある。このため、体重計等を用いる場合、家畜の体重の把握には手間を要する。これに対して、家畜をビデオカメラで撮影し、撮影した画像中における家畜の面積から体重を推定する技術が知られている(例えば特許文献1参照)。 By the way, the number of livestock raised by a livestock farm may exceed several hundred heads (or several hundred animals, several hundred birds, etc.). Therefore, when using a scale or the like, it takes time and effort to determine the weight of livestock. On the other hand, there is a known technique for photographing livestock with a video camera and estimating the weight from the area of the livestock in the photographed image (for example, see Patent Document 1).
しかしながら、例えば、家畜が動くことで撮影時の家畜の姿勢が様々となるため、上記の従来技術では、推定された体重と真の体重との誤差が大きくなり、推定精度が低下する場合があった。 However, for example, as the livestock moves, the posture of the livestock at the time of photographing varies, so with the above conventional technology, the error between the estimated weight and the true weight may become large and the estimation accuracy may decrease. Ta.
本発明の実施の形態は、上記の点に鑑みてなされたもので、高い精度で体重を推定することを目的とする。 The embodiments of the present invention have been made in view of the above points, and an object thereof is to estimate body weight with high accuracy.
上記目的を達成するため、本発明の実施の形態における体重推定装置は、体重の推定対象を撮影した第1の画像を取得する取得手段と、前記取得手段により取得された前記第1の画像における前記推定対象の姿勢が、予め定義された複数の姿勢のうちのいずれの姿勢であるかを分類する分類手段と、前記分類手段により分類された姿勢に対応する推定モデルを用いて、前記第1の画像から前記推定対象の体重を推定する推定手段と、を有し、前記複数の姿勢は、左右方向の曲り有無と、首部分の高さと体部分の高さと尻部分の高さの順位との組み合わせ毎に定義された姿勢であり、前記分類手段は、前記第1の画像に基づいて、前記推定対象の左右方向の曲り有無と、首部分の高さと体部分の高さと尻部分の高さの順位とから前記複数の姿勢のうちのいずれの姿勢であるかを分類する、ことを特徴とする。 In order to achieve the above object, a body weight estimating device according to an embodiment of the present invention includes an acquisition means for acquiring a first image of a target for weight estimation; The first method uses a classification means for classifying which of a plurality of predefined orientations the estimation target pose is, and an estimation model corresponding to the orientation classified by the classification means. estimating means for estimating the weight of the estimation target from an image, and the plurality of postures include the presence or absence of bending in the left and right direction, and the ranking of the height of the neck, the height of the body, and the height of the buttocks. Based on the first image, the classification means determines whether or not the estimation target is bent in the left-right direction, the height of the neck, the height of the body, and the height of the buttocks. The method is characterized in that it classifies which of the plurality of postures it is based on the ranking of the postures.
高い精度で体重を推定することができる。 Weight can be estimated with high accuracy.
以下、本発明の実施の形態(以降、「本実施形態」とも表す。)について、図面を参照しながら説明する。本実施形態では、豚の姿勢をいくつかに分類し、これらの姿勢毎に体重を推定するための回帰式を予め作成した上で、これらの回帰式を用いて豚の体重を推定する場合について説明する。ただし、体重を推定する対象(以降、「推定対象」とも表す。)は、豚に限られず、例えば、牛、馬、羊、鶏等の種々の家畜であっても良い。また、体重の推定対象は、家畜だけでなく、例えば、野生の動物であっても良い。 DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention (hereinafter also referred to as "this embodiment") will be described below with reference to the drawings. In this embodiment, the pig's posture is classified into several positions, a regression equation is created in advance for estimating the weight for each of these postures, and then the pig's weight is estimated using these regression equations. explain. However, the object whose weight is to be estimated (hereinafter also referred to as "estimation object") is not limited to pigs, and may be various livestock such as cows, horses, sheep, and chickens, for example. Furthermore, the object of weight estimation may be not only livestock but also wild animals, for example.
<全体構成>
まず、本実施形態に係る体重推定システム1の全体構成について、図1を参照しながら説明する。図1は、本実施形態に係る体重推定システム1の全体構成の一例を示す図である。
<Overall configuration>
First, the overall configuration of a body
図1に示すように、本実施形態に係る体重推定システム1には、体重の推定を行う体重推定装置10と、体重の推定対象である豚Pを撮影するカメラ装置20とが含まれる。体重推定装置10とカメラ装置20とは、例えば、無線若しくは有線又はその両方により通信可能に接続されている。
As shown in FIG. 1, the body
カメラ装置20は、豚Pを撮影するための撮影エリアAの真上に設置されている撮影装置である。カメラ装置20は、撮影エリアA内の豚Pを真上から撮影することで、撮影画像を生成する。また、カメラ装置20には深度センサが備えられており、豚Pの各点の深度を測定し、これら各点の高さを得ることができる。なお、撮影画像は、画素値や深度値の点群で表される。
The
なお、カメラ装置20は必ずしも撮影エリアAの真上に設置されている必要はなく、豚Pを上方から撮影可能な位置に設置されていれば良い。また、カメラ装置20は、例えば、1頭の豚Pを所定の回数連続して撮影(又は、所定の時間の間、連続して撮影)して複数の撮影画像を生成しても良い。
Note that the
体重推定装置10は、カメラ装置20が生成した撮影画像から豚Pの体重を推定するコンピュータ又はコンピュータシステムである。体重推定装置10は、豚Pの体重を推定する際に、豚の姿勢毎に予め作成した回帰式のうち、豚Pの姿勢に対応する回帰式を用いて、当該豚Pの体重を推定する。なお、回帰式は回帰モデル等と称されても良く、推定対象の体重を推定するための推定モデルの一例である。
The
ここで、体重推定装置10には、体重推定処理部100と、記憶部110とが含まれる。体重推定処理部100は、体重推定装置10にインストールされた1以上のプログラムが、CPU(Central Processing Unit)に実行させる処理により実現される。また、記憶部110は、例えばHDD(Hard Disk Drive)やSSD(Solid State Drive)等を用いて実現可能である。
Here, the
体重推定装置10は、体重推定処理部100により、予め準備された学習データを用いて豚Pの体重を推定するための回帰式を算出する「学習処理」と、豚Pの姿勢に対応する回帰式を用いて当該豚Pの体重を推定する「体重推定処理」とを実行する。また、記憶部110は、学習処理及び体重推定処理の実行に必要な情報や各種処理結果(例えば、学習データや回帰式、体重の推定結果等)を記憶する。
The
<豚の姿勢>
ここで、豚の姿勢について説明する。本実施形態では、豚の姿勢は、横方向(つまり、豚の左右方向)の曲がり有無と、豚の首部分、体部分及び尻部分のそれぞれにおける所定の各点の高さの順位との組み合わせで定義されるものとする。本実施形態では、例えば、横方向の曲がり有無を「有」(曲がっている)又は「無」(曲がっていない)で表し、首部分、体部分及び尻部分のそれぞれにおける所定の各点の高さ(つまり、z座標値)をza,zb及びzcとして、高さが高い順(つまり、z座標値が大きい順)に「1」、「2」、「3」と順位付けするものとする。なお、これら各点の高さは、例えば、カメラ装置20が備える深度センサで深度を測定することで得られる。
<Pig posture>
Here, the posture of the pig will be explained. In this embodiment, the pig's posture is determined by a combination of the presence or absence of bending in the lateral direction (that is, the horizontal direction of the pig) and the height order of each predetermined point in the pig's neck, body, and rump. shall be defined as In this embodiment, for example, the presence or absence of bending in the lateral direction is expressed as "present" (bent) or "absent" (not bent), and the height of each predetermined point in each of the neck, body, and buttocks is determined. The height (that is, the z coordinate value) is set as z a , z b , and z c , and the height is ranked as "1,""2," and "3" in descending order of height (that is, in descending order of z coordinate value). shall be taken as a thing. Note that the height of each of these points can be obtained, for example, by measuring the depth with a depth sensor included in the
本実施形態では、横方向の曲がり有無と、首部分、体部分及び尻部分のそれぞれにおける所定の各点の高さの順位とを用いて、豚の姿勢は以下の12パターンの姿勢Q1~Q12に分類されるものとする。なお、以降では、便宜上、横方向の曲がり有無を単に「曲がり有無」とも表す。また、以降では、首部分における所定の点の高さzaの順位を「首順位」、体部分における所定の点の高さzbの順位を「体順位」、尻部分における所定の点の高さzcの順位を「尻順位」とも表す。 In this embodiment, the pig's posture is determined by the following 12 patterns of postures Q 1 to 1, using the presence or absence of lateral bending and the ranking of the heights of predetermined points in each of the neck, body, and buttocks. Q: It is classified as 12 . Note that hereinafter, for convenience, the presence or absence of bending in the lateral direction will also be simply referred to as "presence or absence of bending." In addition, hereinafter, the ranking of the height z a of a predetermined point in the neck area will be referred to as the "neck ranking", the ranking of the height z b of the predetermined point in the body part will be referred to as the "body ranking", and the ranking of the height z b of the predetermined point in the buttocks area will be referred to as the "neck ranking". The rank of height zc is also expressed as "hip rank".
・姿勢Q1:曲がり有無=無、かつ、(首順位,体順位,尻順位)=(1,2,3)
・姿勢Q2:曲がり有無=無、かつ、(首順位,体順位,尻順位)=(1,3,2)
・姿勢Q3:曲がり有無=無、かつ、(首順位,体順位,尻順位)=(2,1,3)
・姿勢Q4:曲がり有無=無、かつ、(首順位,体順位,尻順位)=(2,3,1)
・姿勢Q5:曲がり有無=無、かつ、(首順位,体順位,尻順位)=(3,1,2)
・姿勢Q6:曲がり有無=無、かつ、(首順位,体順位,尻順位)=(3,2,1)
・姿勢Q7:曲がり有無=有、かつ、(首順位,体順位,尻順位)=(1,2,3)
・姿勢Q8:曲がり有無=有、かつ、(首順位,体順位,尻順位)=(1,3,2)
・姿勢Q9:曲がり有無=有、かつ、(首順位,体順位,尻順位)=(2,1,3)
・姿勢Q10:曲がり有無=有、かつ、(首順位,体順位,尻順位)=(2,3,1)
・姿勢Q11:曲がり有無=有、かつ、(首順位,体順位,尻順位)=(3,1,2)
・姿勢Q12:曲がり有無=有、かつ、(首順位,体順位,尻順位)=(3,2,1)
ここで、上記の曲がり有無は、豚が左又は右にどの程度曲がっているかを表す値(これを「曲がり度合い」と表す。)を用いて、曲がり度合いが大きい場合(例えば、所定の閾値以上である場合)に「有」、曲がり度合いが小さい場合(例えば、所定の閾値未満である場合)に「無」となる。このような曲がり度合いは、例えば、以下の(1)~(4)のいずれかのように定義されれば良い。
・Posture Q 1 : Curvedness = None, and (head position, body position, buttocks position) = (1, 2, 3)
・Posture Q 2 : Curvedness = None, and (head position, body position, buttocks position) = (1, 3, 2)
・Posture Q 3 : Curvedness = None, and (head position, body position, buttocks position) = (2, 1, 3)
・Posture Q 4 : Curvedness = None, and (head position, body position, buttocks position) = (2, 3, 1)
・Posture Q 5 : Curvedness = None, and (head position, body position, buttocks position) = (3, 1, 2)
・Posture Q 6 : Curvedness = None, and (head position, body position, buttocks position) = (3, 2, 1)
・Posture Q7 : Curvedness = Yes, and (head position, body position, buttocks position) = (1, 2, 3)
・Posture Q 8 : Curvedness = Yes, and (head position, body position, buttocks position) = (1, 3, 2)
・Posture Q 9 : Curvedness = Yes, and (head position, body position, buttocks position) = (2, 1, 3)
・Posture Q 10 : Curvedness = Yes, and (head position, body position, buttocks position) = (2, 3, 1)
・Posture Q 11 : Curvedness = Yes, and (head position, body position, buttocks position) = (3, 1, 2)
・Posture Q 12 : Curvedness = Yes, and (head position, body position, buttocks position) = (3, 2, 1)
Here, the above-mentioned presence or absence of bending is determined using a value representing how much the pig is bent to the left or right (this is referred to as the "degree of bending"). If the degree of curvature is small (for example, less than a predetermined threshold value), it is "absent". Such degree of curvature may be defined, for example, as in any one of (1) to (4) below.
(1)縦横比を用いた定義
図2に示すように、豚をカメラ装置20で撮影した撮影画像において、豚部分の外接矩形の縦の長さと横の長さとを用いて縦横比を以下で定義し、この縦横比を曲がり度合いとする。
(1) Definition using aspect ratio As shown in Fig. 2, in a photographed image of a pig taken with
縦横比=横の長さ/縦の長さ
このとき、縦横比が1に近いほど豚が左方向又は右方向に曲がっていることを表す。したがって、例えば、或る閾値th1(0<th1<1)を用いて、縦横比(曲がり度合い)がth1未満である場合は曲がり有無=無、縦横比がth1以上である場合は曲がり有無=有とすれば良い。
Aspect ratio = horizontal length / vertical length At this time, the closer the aspect ratio is to 1, the more the pig is bent to the left or right. Therefore, for example, using a certain threshold th 1 (0<th 1 <1), if the aspect ratio (degree of bending) is less than th 1 , then the presence or absence of bending = none, and if the aspect ratio is th 1 or more, then It is sufficient if the presence or absence of bending = presence.
(2)対称性を用いた定義
図3(a)に示すように、豚をカメラ装置20で撮影した撮影画像に対して、xyz座標系を設定する。また、当該撮影画像において、豚部分の外接矩形を設定した上で、この外接矩形を横に2等分する分割線を設定する。ここで、便宜上、分割線はy=0と平行であるものとする。なお、外接矩形が撮影画像に対して傾いている場合には、傾きが無くなるように当該外接矩形を回転させる。
(2) Definition using symmetry As shown in FIG. 3(a), an xyz coordinate system is set for a photographed image of a pig with the
このとき、各x座標値に対して、分割線よりもy座標値が大きい点の数と、分割線よりもy座標値が小さい点の数との差分を計算する。言い換えれば、各x座標値毎に、豚部分の上端のy座標値(上端値)と、豚部分の下端のy座標値(下端値)との差の絶対値を計算する。この計算結果を図3(b)に示す。図3(b)は、x座標値毎の上端値と下端値との差分(差の絶対値)を表す。そして、これらの差分の合計(差分合計)を曲がり度合いとする。 At this time, for each x-coordinate value, the difference between the number of points whose y-coordinate value is larger than the dividing line and the number of points whose y-coordinate value is smaller than the dividing line is calculated. In other words, for each x-coordinate value, the absolute value of the difference between the y-coordinate value (upper end value) of the upper end of the pig part and the y-coordinate value (lower end value) of the lower end of the pig part is calculated. The results of this calculation are shown in FIG. 3(b). FIG. 3B shows the difference (absolute value of the difference) between the upper end value and the lower end value for each x-coordinate value. Then, the sum of these differences (total difference) is defined as the degree of curvature.
このとき、差分合計が大きいほど豚の対称性が小さく、左方向又は右方向に曲がっていることを表す。したがって、或る閾値th2を用いて、差分合計(曲がり度合い)がth2未満である場合は曲がり有無=無、差分合計がth2以上である場合は曲がり有無=有とすれば良い。 At this time, the larger the total difference, the smaller the symmetry of the pig, indicating that it is curved to the left or right. Therefore, using a certain threshold value th 2 , if the total difference (degree of bending) is less than th 2 , the presence or absence of bending may be determined to be absent, and if the total difference is greater than or equal to th 2 , the presence or absence of bending may be determined to be present.
(3)近似曲線を用いた定義
図4に示すように、豚をカメラ装置20で撮影した撮影画像に対して、xyz座標系を設定する。このとき、各x座標値に対して、豚部分の上端のy座標値(上端値)と、豚部分の下端のy座標値(下端値)との中点を特定し、これらの中点を通る曲線を中心曲線とする。そして、例えば、中心曲線を近似する2次曲線(近似曲線)を求めて、近似曲線の2次の係数(つまり、近似曲線をy=ax2+bx+cと表した場合の係数a)を曲がり度合いとする。
(3) Definition using approximate curves As shown in FIG. 4, an xyz coordinate system is set for a photographed image of a pig with the
このとき、2次の係数の絶対値が大きいほど左方向又は右方向に曲がっていることを表す。したがって、或る閾値th3を用いて、2次の係数の絶対値がth3未満である場合は曲がり有無=無、2次の係数の絶対値がth3以上である場合は曲がり有無=有とすれば良い。 At this time, the larger the absolute value of the second-order coefficient, the more leftward or rightward the curve is. Therefore, using a certain threshold th 3 , if the absolute value of the second-order coefficient is less than th 3 , the presence or absence of bending = no, and if the absolute value of the second-order coefficient is th 3 or more, the presence or absence of bending = yes. It's fine if you do this.
(4)上記の(1)~(3)のうちの2以上の組み合わせによる定義
例えば、上記の(1)の縦横比、上記の(2)の差分合計、及び上記の(3)の2次の係数の絶対値のうちの任意の2以上の和又は重み付き和を曲がり度合いとする。
(4) Definition based on a combination of two or more of the above (1) to (3). For example, the aspect ratio of (1) above, the total difference of (2) above, and the quadratic of (3) above. The sum or weighted sum of any two or more of the absolute values of the coefficients is defined as the degree of curvature.
<機能構成>
次に、本実施形態に係る体重推定処理部100の機能構成について、図5を参照しながら説明する。図5は、本実施形態に係る体重推定処理部100の機能構成の一例を示す図である。
<Functional configuration>
Next, the functional configuration of the weight
図5に示すように、本実施形態に係る体重推定処理部100には、取得部101と、前処理部102と、姿勢クラス分類部103と、回帰式算出部104と、体重推定部105とが含まれる。
As shown in FIG. 5, the weight
取得部101は、学習処理において、記憶部110に記憶されている複数の撮影画像(撮影画像群)を学習データとして取得する(読み込む)。ここで、学習データとして取得される撮影画像は、少なくとも体重が既知である豚を撮影した画像である。なお、学習データとして取得される撮影画像は、更に、例えば、当該豚の姿勢が、姿勢Q1~姿勢Q12のうちのいずれであるかが既知であっても良い。
In the learning process, the
また、取得部101は、体重推定処理において、推定対象の豚Pを撮影した撮影画像を記憶部110又はカメラ装置20から取得する。
Further, in the weight estimation process, the
前処理部102は、学習処理及び体重推定処理において、取得部101により取得された撮影画像に対して所定の前処理を行う。なお、前処理は、豚の体重の推定精度を向上させるための処理であり、必ずしも行われなくても良い。
The
姿勢クラス分類部103は、学習処理において、撮影画像群(取得部101により取得された撮影画像群又は前処理部102による前処理後の撮影画像群)を複数のクラス(以降、「姿勢クラス」とも表す。)に分類(本実施形態では12個の姿勢クラスに分類)する。以降では、これらの12個の姿勢クラスをC1~C12とも表し、i=1,・・・,12として、姿勢クラスCiには姿勢Qiが対応するものとする。
In the learning process, the posture
また、姿勢クラス分類部103は、体重推定処理において、撮影画像(取得部101により取得された撮影画像又は前処理部102による前処理後の撮影画像)を姿勢クラスC1~C12のいずれかに分類する。
In addition, in the body weight estimation process, the posture
回帰式算出部104は、学習処理において、姿勢クラスC1~C12の各々(つまり、姿勢Q1~姿勢Q12の各々)に対して、回帰式を算出する。これらの回帰式は、姿勢クラスC1~C12の各々に分類された撮影画像を用いて、回帰分析をそれぞれ行うことで算出される。
In the learning process, the regression
体重推定部105は、体重推定処理において、撮影画像(取得部101により取得された撮影画像又は前処理部102による前処理後の撮影画像)が分類された姿勢クラスに対応する回帰式を用いて、推定対象の豚Pの体重を算出する。これにより、推定対象の豚Pの体重が推定される。
In the weight estimation process, the
<学習処理>
次に、学習データを用いて、姿勢毎の回帰式を算出するための学習処理について、図6を参照しながら説明する。図6は、本実施形態に係る学習処理の一例を示すフローチャートである。なお、以降では、少なくとも体重が既知である豚を撮影した複数の撮影画像(撮影画像群)が記憶部110に記憶されているものとする。なお、これらの複数の撮影画像(撮影画像群)は、更に、例えば、当該豚の姿勢が、姿勢Q1~姿勢Q12のうちのいずれであるかが既知であっても良い。
<Learning process>
Next, a learning process for calculating a regression equation for each posture using learning data will be described with reference to FIG. FIG. 6 is a flowchart showing an example of the learning process according to this embodiment. In the following, it is assumed that a plurality of photographed images (a group of photographed images) of pigs whose weights are at least known are stored in the
ステップS101:取得部101は、記憶部110から撮影画像群を学習データとして取得する。
Step S101: The
なお、後述するステップS102で説明する前処理を予め行った撮影画像群を記憶部110に記憶させておき、取得部101によって前処理後の撮影画像群が取得されても良い。この場合、後述するステップS102の処理は実行しなくても良い。
Note that the
ステップS102:次に、前処理部102は、撮影画像群に含まれる撮影画像の各々に対して所定の前処理を行う。ここで、前処理としては、例えば、「豚の抽出処理」と、「頭部分及び尻尾部分の除外処理」とがある。なお、前処理として、「豚の抽出処理」及び「頭部分及び尻尾部分の除外処理」の両方を行っても良いし、いずれか一方のみを行っても良い。また、前処理自体を行わなくても良い。前処理自体を行わない場合は、ステップS102の処理は実行されない。
Step S102: Next, the
(豚の抽出処理)
豚の抽出処理とは、例えば、撮影画像において、豚と壁とが密着していたり、当該豚と他の豚とが密着していたりする場合等に、当該豚の境界を特定することで、当該豚部分の画像領域のみを抽出する処理である。
(Pig extraction process)
Pig extraction processing involves identifying the boundaries of the pig, for example, in cases where the pig is in close contact with a wall or the pig is in close contact with another pig in the photographed image. This is a process that extracts only the image area of the pig part.
図7(a)に示すように、撮影画像に対して、xyz座標系を設定する。そして、当該撮影画像の各x座標値において、各y座標値におけるz座標値を取得する。図7(a)に示す例では、x=940において、y≧0である各y座標値におけるz座標値を取得する場合を示している。このように取得されたz座標値のグラフ(断面グラフ)を図7(b)に示す。 As shown in FIG. 7(a), an xyz coordinate system is set for the photographed image. Then, at each x-coordinate value of the photographed image, a z-coordinate value at each y-coordinate value is obtained. The example shown in FIG. 7A shows a case where the z coordinate value at each y coordinate value where y≧0 is acquired at x=940. A graph (cross-sectional graph) of the z-coordinate values obtained in this way is shown in FIG. 7(b).
このとき、z座標値が局所的に小さい点を境界上の点とする。図7(b)に示す例では、y=680が境界上の点となる。これを各x座標値に対して行うことで、境界が特定される。そして、境界内の画像領域を、当該豚部分の画像領域として抽出する。 At this time, a point where the z-coordinate value is locally small is defined as a point on the boundary. In the example shown in FIG. 7(b), y=680 is a point on the boundary. By performing this for each x-coordinate value, the boundary is identified. Then, the image area within the boundary is extracted as the image area of the pig part.
なお、z座標値が局所的に小さい点を境界上の点としたのは、一般に、1つのx座標値に対して、境界上の点は2つ存在するためである。このため、z座標値が局所的に小さい点の代わりに、z座標値が最も小さい点と、次にz座標値が小さい点とを境界上の点としても良い。 Note that the reason why a point with a locally small z-coordinate value is defined as a point on the boundary is that there are generally two points on the boundary for one x-coordinate value. For this reason, instead of a point where the z coordinate value is locally small, a point with the smallest z coordinate value and a point with the next smallest z coordinate value may be used as points on the boundary.
(頭部分及び尻尾部分の除外処理)
頭部分及び尻尾部分は撮影中に動く場合があるため、体重の推定精度に影響を及ぼすことが多い。このため、頭部分及び尻尾部分の画像領域を除外(削除)することで、体重の推定精度を向上させることができる。なお、頭部分又は尻尾部分のいずれか一方の画像領域のみを除外することでも、体重の推定精度を向上させることは可能であるが、頭部分及び尻尾部分の両方の画像領域を除外した方が体重の推定精度をより向上させることが可能である。
(Exclusion processing of head and tail parts)
The head and tail parts may move during shooting, which often affects the accuracy of weight estimation. Therefore, by excluding (deleting) the image regions of the head and tail, it is possible to improve the accuracy of weight estimation. Although it is possible to improve the accuracy of body weight estimation by excluding only the image area of either the head or the tail, it is better to exclude both the head and tail image areas. It is possible to further improve the accuracy of weight estimation.
まず、上記の豚の抽出処理と同様の方法により、撮影画像における豚の境界を特定する。そして、次のようにして、頭部分及び尻尾部分を除外(削除)する。 First, the boundaries of the pig in the captured image are identified using a method similar to the pig extraction process described above. Then, the head portion and tail portion are excluded (deleted) as follows.
すなわち、例えば、境界上の隣接点同士を結ぶ線分を用いて、隣り合う線分間の角度が所定の閾値以下となる箇所(つまり、境界の凹部のうちの所定の角度以下の凹部)を首の付け根部分と特定する。そして、首の付け根部分を直線で結んで境界とすることで、頭部分を除外する。 That is, for example, by using line segments connecting adjacent points on the boundary, we can identify points where the angle between the adjacent line segments is less than or equal to a predetermined threshold (in other words, the recesses of the recesses on the boundary that are less than or equal to the predetermined angle). Identify it as the base of the. The head is then excluded by connecting the base of the neck with a straight line to form a boundary.
また、例えば、豚部分(豚全体の画像領域)の幅(つまり、y軸方向の幅)に対して1/3~1/5以下の幅の画像領域を尻尾部分として除外する。なお、豚部分の幅は、x座標値によって異なるため、例えば、予め決められたx座標値(例えば、x=0等)における豚部分の幅とすれば良い。 Further, for example, an image area having a width of 1/3 to 1/5 or less of the width (ie, the width in the y-axis direction) of the pig part (the image area of the whole pig) is excluded as the tail part. Note that since the width of the pig part varies depending on the x-coordinate value, it may be set to the width of the pig part at a predetermined x-coordinate value (for example, x=0, etc.), for example.
以降では、前処理部102により、撮影画像群に含まれる各撮影画像に対して、上記の前処理(「豚の抽出処理」及び「頭部分及び尻尾部分の除外処理」)が行われたものとして説明をする。
In the following, the
ステップS103:姿勢クラス分類部103は、前処理部102による前処理後の撮影画像群に含まれる各撮影画像を姿勢クラスに分類する。姿勢クラスに分類するための手法としては、例えば、k-means法を用いれば良い。又は、例えば、SVM(Support Vector Machine)等が用いられても良い。なお、このとき、姿勢クラス数は12として分類する。
Step S103: The posture
ここで、姿勢クラス分類部103は、各撮影画像から任意の特徴量(これを、以降では「第1の特徴量」と表す。)を抽出して、この第1の特徴量を用いて各撮影画像を姿勢クラスのいずれかに分類する。
Here, the posture
一例として、Xを曲がり度合い、Yをzb-zc、Zをzb-za、第1の特徴量を(X,Y,Z)とした場合の分類結果を図9に示す。この場合、各撮影画像は、XYZの3次元空間内で分類される。なお、図9中のデータ点は、撮影画像群に含まれる各撮影画像を表す。 As an example, the classification results are shown in FIG. 9 where X is the degree of curvature, Y is z b −z c , Z is z b −z a , and the first feature amount is (X, Y, Z). In this case, each photographed image is classified within the three-dimensional space of XYZ. Note that the data points in FIG. 9 represent each photographed image included in the photographed image group.
これにより、撮影画像群に含まれる各撮影画像が12個の姿勢クラスのいずれかに分類される。ここで、12個の姿勢クラスの各々が姿勢Q1~Q12のいずれに対応するかは、例えば、姿勢クラスに属する各撮影画像に写っている豚の姿勢からユーザが判断しても良いし、撮影画像群に含まれる各撮影画像に対して姿勢Q1~Q12のいずれかを示すラベルが付与されている場合は姿勢クラスに属する各撮影画像に付与されているラベルの分布から判定しても良い。以降では、上述したように、i=1,・・・,12として、姿勢クラスCiには姿勢Qiが対応するものとする。 As a result, each photographed image included in the photographed image group is classified into one of the 12 posture classes. Here, the user may determine which of the postures Q 1 to Q 12 each of the 12 posture classes corresponds to, for example, from the posture of the pig in each photographed image belonging to the posture class. , if a label indicating one of postures Q 1 to Q 12 is assigned to each photographed image included in the photographed image group, the determination is made from the distribution of labels assigned to each photographed image belonging to the posture class. It's okay. Hereinafter, as described above, it is assumed that i=1, . . . , 12, and posture Q i corresponds to posture class C i .
ステップS104:次に、回帰式算出部104は、姿勢クラスC1~C12の各々(つまり、姿勢Q1~姿勢Q12の各々)に対して、回帰式をそれぞれ算出する。ここで、回帰式算出部104は、各撮影画像から任意の特徴量(これを、以降では「第2の特徴量」と表す。)を抽出して、回帰分析の手法により、第2の特徴量と体重との関係を表す回帰式を算出する。なお、上述したように、各撮影画像に対応する体重は既知である。
Step S104: Next, the regression
第2の特徴量としては、例えば、撮影画像中の豚部分の投影面積であっても良いし、撮影画像中の豚部分の表面積であっても良い。なお、前処理において頭部分又は/及び尻尾部分が除外されている場合は、豚部分とは、当該除外後の画像領域のことである。 The second feature amount may be, for example, the projected area of the pig part in the captured image, or the surface area of the pig part in the captured image. Note that if the head portion and/or tail portion is excluded in the preprocessing, the pig portion refers to the image area after the exclusion.
これにより、図10に示すように、i=1,・・・.12として、姿勢Qi(つまり、姿勢クラスCi)に対応する回帰式fiが算出される。そして、回帰式算出部104により算出された回帰fi(i=1,・・・.12)は、記憶部110に記憶される。なお、図10では、回帰式fiによって表される回帰曲線を図示している。
As a result, as shown in FIG. 10, i=1, . 12, a regression equation f i corresponding to the posture Q i (that is, the posture class C i ) is calculated. Then, the regression f i (i=1, . . . 12) calculated by the regression
<体重推定処理>
次に、推定対象の豚Pの体重を推定するための体重推定処理について、図11を参照しながら説明する。図11は、本実施形態に係る体重推定処理の一例を示すフローチャートである。
<Weight estimation process>
Next, a weight estimation process for estimating the weight of the pig P to be estimated will be described with reference to FIG. 11. FIG. 11 is a flowchart illustrating an example of the weight estimation process according to this embodiment.
ステップS201:取得部101は、推定対象の豚Pを撮影した撮影画像を記憶部110又はカメラ装置20から取得する。
Step S201: The
ステップS202:次に、前処理部102は、図6のステップS102と同様に、撮影画像に対して前処理を行う。なお、学習処理で前処理が行われた場合(前処理後の撮影画像を学習データとして取得した場合も含む)は当該撮影画像に対しても前処理を行う一方で、学習処理で前処理が行われなかった場合は当該撮影画像に対しても前処理を行わない。
Step S202: Next, the
ステップS203:次に、姿勢クラス分類部103は、図6のステップS103と同様の手法により、当該撮影画像を姿勢クラスに分類する。このとき、姿勢クラス分類部103は、当該撮影画像から第1の特徴量を抽出して、この第1の特徴量を用いて当該撮影画像を姿勢クラスのいずれかに分類する。これにより、当該撮影画像が姿勢クラスC1~C12のいずれかの姿勢クラスに分類される。
Step S203: Next, the posture
ステップS204:次に、体重推定部105は、上記のステップS203で分類された姿勢クラスに対応する回帰式を用いて、豚Pの体重を算出する。すなわち、体重推定部105は、当該撮影画像から第2の特徴量を抽出して、この第2の特徴量を用いて当該回帰式により豚Pの体重を算出する。これにより、豚Pの体重が推定される。
Step S204: Next, the
なお、体重推定部105により推定された体重は、例えば、記憶部110に記憶されても良いし、ディスプレイ等の表示装置に出力されても良い。これ以外にも、例えば、体重推定装置10とネットワークを介して接続される他の装置等に出力されても良い。
Note that the weight estimated by the
<まとめ>
以上のように、本実施形態に係る体重推定システム1は、予め準備した学習データを用いて、豚の姿勢毎に回帰式(推定モデル)を作成する。そして、本実施形態に係る体重推定システム1は、豚の体重の推定する場合に、推定対象の豚の姿勢に対応する推定モデルを用いて、体重を推定する。これにより、推定対象の豚の姿勢が様々であったとしても、その姿勢に応じて、高い精度で当該豚の体重を推定することができるようになる。
<Summary>
As described above, the body
なお、本実施形態では、豚の姿勢を12の姿勢に分類したが、これは一例であって、分類の方法や分類数が異なっていても良い。特に、例えば、豚の種別(例えば、ヨークシャー種、ランドレース種等)によって分類の仕方や分類数が異なっていても良いし、推定対象の種類(例えば、豚、牛、馬、羊、鶏等)によって分類の仕方や分類数が異なっていても良い。 Note that in this embodiment, the postures of the pigs are classified into 12 postures, but this is just an example, and the classification method and number of classifications may be different. In particular, the classification method and number of classifications may differ depending on the type of pig (e.g. Yorkshire, Landrace, etc.), or the type of estimation target (e.g. pig, cow, horse, sheep, chicken, etc.) ) The method of classification and the number of classifications may be different depending on the type of classification.
本発明は、具体的に開示された上記の実施形態に限定されるものではなく、特許請求の範囲から逸脱することなく、種々の変形や変更が可能である。 The present invention is not limited to the above-described specifically disclosed embodiments, and various modifications and changes can be made without departing from the scope of the claims.
1 体重推定システム
10 体重推定装置
20 カメラ装置
100 体重推定処理部
101 取得部
102 前処理部
103 姿勢クラス分類部
104 回帰式算出部
105 体重推定部
110 記憶部
1
Claims (4)
前記取得手段により取得された前記第1の画像における前記推定対象の姿勢が、予め定義された複数の姿勢のうちのいずれの姿勢であるかを分類する分類手段と、
前記分類手段により分類された姿勢に対応する推定モデルを用いて、前記第1の画像から前記推定対象の体重を推定する推定手段と、
を有し、
前記複数の姿勢は、左右方向の曲り有無と、首部分の高さと体部分の高さと尻部分の高さの順位との組み合わせ毎に定義された姿勢であり、
前記分類手段は、
前記第1の画像に基づいて、前記推定対象の左右方向の曲り有無と、首部分の高さと体部分の高さと尻部分の高さの順位とから前記複数の姿勢のうちのいずれの姿勢であるかを分類する、ことを特徴とする体重推定装置。 Acquisition means for acquiring a first image of a subject for weight estimation;
a classification means for classifying which of a plurality of predefined postures the posture of the estimation target in the first image acquired by the acquisition means is;
Estimating means for estimating the weight of the estimation target from the first image using an estimation model corresponding to the posture classified by the classifying means;
has
The plurality of postures are postures defined for each combination of the presence or absence of bending in the left and right direction, and the ranking of the height of the neck part, the height of the body part, and the height of the buttocks part,
The classification means is
Based on the first image, which of the plurality of postures is determined based on the presence or absence of bending of the estimation target in the left and right direction, and the ranking of the height of the neck, the height of the body, and the height of the buttocks. A weight estimation device characterized by classifying whether there is a weight or not.
前記取得手段は、
体重が既知の対象を撮影した第2の画像の集合を学習データとして取得し、
前記分類手段は、
前記取得手段により取得された前記学習データに含まれる各第2の画像における前記対象の姿勢が、前記複数の姿勢のうちのいずれの姿勢であるかを分類し、
前記モデル作成手段は、
前記姿勢毎に、該姿勢と分類された前記第2の画像と、該第2の画像における前記対象の体重とを用いて、前記姿勢に対応する推定モデルを作成する、ことを特徴とする請求項1に記載の体重推定装置。 comprising a model creation means for creating an estimation model corresponding to the orientation for each orientation;
The acquisition means is
Obtain a second set of images of objects whose weight is known as learning data,
The classification means is
classifying which of the plurality of postures the target posture is in each second image included in the learning data acquired by the acquisition means;
The model creation means includes:
A claim characterized in that, for each posture, an estimation model corresponding to the posture is created using the second image classified as the posture and the weight of the subject in the second image. The weight estimation device according to item 1.
前記取得手順で取得された前記第1の画像における前記推定対象の姿勢が、予め定義された複数の姿勢のうちのいずれの姿勢であるかを分類する分類手順と、
前記分類手順で分類された姿勢に対応する推定モデルを用いて、前記第1の画像から前記推定対象の体重を推定する推定手順と、
をコンピュータが実行し、
前記複数の姿勢は、左右方向の曲り有無と、首部分の高さと体部分の高さと尻部分の高さの順位との組み合わせ毎に定義された姿勢であり、
前記分類手順は、
前記第1の画像に基づいて、前記推定対象の左右方向の曲り有無と、首部分の高さと体部分の高さと尻部分の高さの順位とから前記複数の姿勢のうちのいずれの姿勢であるかを分類する、ことを特徴とする体重推定方法。 an acquisition procedure of acquiring a first image of a subject for weight estimation;
a classification procedure for classifying which of a plurality of predefined postures the estimation target posture in the first image acquired in the acquisition procedure is;
an estimation step of estimating the weight of the estimation target from the first image using an estimation model corresponding to the posture classified in the classification step;
The computer executes
The plurality of postures are postures defined for each combination of the presence or absence of bending in the left and right direction, and the ranking of the height of the neck part, the height of the body part, and the height of the buttocks part,
The classification procedure is
Based on the first image, which of the plurality of postures is determined based on the presence or absence of bending of the estimation target in the left and right direction, and the ranking of the height of the neck, the height of the body, and the height of the buttocks. A method for estimating body weight, which is characterized by classifying whether it is present or not.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2023120539A JP2023129574A (en) | 2018-12-27 | 2023-07-25 | Body weight estimation device, method for estimating body weight, and program |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018246095A JP2020106422A (en) | 2018-12-27 | 2018-12-27 | Weight estimation device, weight estimation method, and program |
JP2023120539A JP2023129574A (en) | 2018-12-27 | 2023-07-25 | Body weight estimation device, method for estimating body weight, and program |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018246095A Division JP2020106422A (en) | 2018-12-27 | 2018-12-27 | Weight estimation device, weight estimation method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2023129574A true JP2023129574A (en) | 2023-09-14 |
Family
ID=71448850
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018246095A Pending JP2020106422A (en) | 2018-12-27 | 2018-12-27 | Weight estimation device, weight estimation method, and program |
JP2023120539A Pending JP2023129574A (en) | 2018-12-27 | 2023-07-25 | Body weight estimation device, method for estimating body weight, and program |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018246095A Pending JP2020106422A (en) | 2018-12-27 | 2018-12-27 | Weight estimation device, weight estimation method, and program |
Country Status (1)
Country | Link |
---|---|
JP (2) | JP2020106422A (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112990014A (en) * | 2021-03-15 | 2021-06-18 | 深圳喜为智慧科技有限公司 | Pig weight estimation method, system, device and storage medium |
CN115294185B (en) * | 2022-06-14 | 2023-10-03 | 中国农业科学院北京畜牧兽医研究所 | Pig weight estimation method and related equipment |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2613527B2 (en) * | 1992-06-19 | 1997-05-28 | 秀夫 皆川 | Livestock weight estimation method by image processing |
JP2002243527A (en) * | 2001-02-20 | 2002-08-28 | Hideo Minagawa | Non-contact weight measuring method for domestic animal |
JP2002286421A (en) * | 2001-03-28 | 2002-10-03 | Hideo Minagawa | Apparatus for measuring weight of animal |
KR20120000071A (en) * | 2009-02-27 | 2012-01-03 | 보디 설피스 트랜스레이션 인크. | Estimating physical parameteres using three dimensional representations |
US8369566B2 (en) * | 2009-05-01 | 2013-02-05 | Texas Tech University System | Remote contactless stereoscopic mass estimation system |
JP6083638B2 (en) * | 2012-08-24 | 2017-02-22 | 国立大学法人 宮崎大学 | Weight estimation apparatus for animal body and weight estimation method |
JP2016059300A (en) * | 2014-09-17 | 2016-04-25 | 国立大学法人広島大学 | Cow body diagnostic system and cow body diagnostic method |
JP7057971B2 (en) * | 2018-06-06 | 2022-04-21 | 全国農業協同組合連合会 | Animal body weight estimation device and weight estimation method |
-
2018
- 2018-12-27 JP JP2018246095A patent/JP2020106422A/en active Pending
-
2023
- 2023-07-25 JP JP2023120539A patent/JP2023129574A/en active Pending
Also Published As
Publication number | Publication date |
---|---|
JP2020106422A (en) | 2020-07-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6433149B2 (en) | Posture estimation apparatus, posture estimation method and program | |
JP2023129574A (en) | Body weight estimation device, method for estimating body weight, and program | |
JP6777948B2 (en) | Health condition estimator | |
Mortensen et al. | Weight prediction of broiler chickens using 3D computer vision | |
JPWO2018051944A1 (en) | People flow estimation device, people flow estimation method and program | |
JP2016099982A (en) | Behavior recognition device, behaviour learning device, method, and program | |
JP7057971B2 (en) | Animal body weight estimation device and weight estimation method | |
JP6346007B2 (en) | Motion recognition device and motion recognition method | |
JP6020439B2 (en) | Image processing apparatus, imaging apparatus, and image processing program | |
WO2022002443A1 (en) | Autonomous livestock monitoring | |
Li et al. | hSMAL: Detailed horse shape and pose reconstruction for motion pattern recognition | |
WO2022065020A1 (en) | Information processing method, program, and information processing device | |
JP7092624B2 (en) | Behavior identification device, behavior identification method and program | |
JP2015219868A (en) | Information processor, information processing method and program | |
Monteiro et al. | A depth-map approach for automatic mice behavior recognition | |
JP6893812B2 (en) | Object detector | |
KR20150144179A (en) | The Method and Apparatus of Object Part Position Estimation | |
WO2021191976A1 (en) | Weight estimation device, weight estimation method, and program | |
Pistocchi et al. | Kernelized Structural Classification for 3D dogs body parts detection | |
JP7414962B2 (en) | Weight estimation device, weight estimation method and program | |
JP2021081804A (en) | State recognition device, state recognition method, and state recognition program | |
US20220398867A1 (en) | Information processing apparatus and facial expression determination method | |
Liu et al. | Estimation of Weight and Body Measurement Model for Pigs Based on Back Point Cloud Data | |
JP7233610B2 (en) | Information processing device, program and information processing method | |
KR102594017B1 (en) | Livestock management system and method of operating thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230725 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20240326 |