Cattle Weight Estimation Using Fully and Weakly Supervised Segmentation from 2D Images
Abstract
:1. Introduction
2. Materials and Methods
2.1. Database
2.2. Devices and Settings
2.3. Frame Selection for Effective Learning
- The image was converted into a grayscale image and the histograms were computed.
- The sum of the histograms was calculated by adding all the values in each histogram.
- Steps 1 and 2 were executed for successive frames, and the images were selected only when the difference between the histograms of the two images exceeded the threshold value of 50,000.
2.4. Segmentation Methods
2.4.1. FSS
2.4.2. WSS
2.5. Weight Features for FSS and WSS
3. Results and Discussion
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- OECD Statistics. OECD-FAO Agricultural Outlook 2022–2031. Available online: https://stats.oecd.org/# (accessed on 24 August 2022).
- Qiao, Y.; Truman, M.; Sukkarieh, S. Cattle segmentation and contour extraction based on Mask R-CNN for precision livestock farming. Comput. Electron. Agric. 2019, 165, 104958. [Google Scholar] [CrossRef]
- Banos, G.; Coffey, M.P. Prediction of liveweight from linear conformation traits in dairy cattle. J. Dairy Sci. 2012, 95, 2170–2175. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Koenen, E.P.C.; Groen, A.F. Genetic evaluation of body weight of lactating Holstein heifers using body measurements and conformation traits. J. Dairy Sci. 1998, 81, 1709–1713. [Google Scholar] [CrossRef] [PubMed]
- Vallimont, J.E.; Dechow, C.D.; Daubert, J.M.; Dekleva, M.W.; Blum, J.W.; Barlieb, C.M.; Baumrucker, C.R. Genetic parameters of feed intake, production, body weight, body condition score, and selected type traits of Holstein cows in commercial tie-stall barns. J. Dairy Sci. 2010, 93, 4892–4901. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Weber, V.A.M.; Weber, F.D.L.; Gomes, R.D.C.; Oliveira Junior, A.D.S.; Menezes, G.V.; Abreu, U.G.P.D.; Pistori, H. Prediction of Girolando cattle weight by means of body measurements extracted from images. Rev. Bras. Zootec. 2020, 49, e20190110. [Google Scholar] [CrossRef] [Green Version]
- Na, M.H.; Cho, W.H.; Kim, S.K.; Na, I.S. Automatic weight prediction system for Korean cattle using Bayesian ridge algorithm on RGB-D image. Electronics 2022, 11, 1663. [Google Scholar] [CrossRef]
- Weber, V.A.M.; de Lima Weber, F.; da Silva Oliveira, A.; Astolfi, G.; Menezes, G.V.; de Andrade Porto, J.V.; Pistori, H. Cattle weight estimation using active contour models and regression trees Bagging. Comput. Electron. Agric. 2020, 179, 105804. [Google Scholar] [CrossRef]
- Seo, K.W.; Kim, H.T.; Lee, D.W.; Yoon, Y.C.; Choi, D.Y. Image processing algorithm for weight estimation of dairy cattle. J. Biosyst. Eng. 2011, 36, 48–57. [Google Scholar] [CrossRef] [Green Version]
- Hansen, M.F.; Smith, M.L.; Smith, L.N.; Jabbar, K.A.; Forbes, D. Automated monitoring of dairy cow body condition, mobility and weight using a single 3D video capture device. Comput. Ind. 2018, 98, 14–22. [Google Scholar] [CrossRef] [PubMed]
- Wongsriworaphon, A.; Arnonkijpanich, B.; Pathumnaku, S. An approach based on digital image analysis to estimate the live weights of pigs in farm environments. Comput. Electron. Agric. 2015, 115, 26–33. [Google Scholar] [CrossRef]
- He, K.; Gkioxari, G.; Dollár, P.; Girshick, R. Mask R-CNN. In Proceedings of the 2017 IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 2961–2969. [Google Scholar]
- Chollet, F. Xception: Deep learning with depthwise separable convolutions. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 1251–1258. [Google Scholar]
- Ren, S.; He, K.; Girshick, R.; Sun, J. Faster R-CNN: Towards real-time object detection with region proposal networks. IEEE Trans. Pattern Anal. Mach. Intell. 2017, 39, 1137–1149. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Long, J.; Shelhamer, E.; Darrell, T. Fully convolutional networks for semantic segmentation. In Proceedings of the 2015 IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015; pp. 3431–3440. [Google Scholar]
- Jo, S.; Yu, I.-J. Puzzle-CAM: Improved localization via matching partial and full features. In Proceedings of the 2021 IEEE International Conference on Image Processing, Anchorage, AK, USA, 19–22 September 2021; pp. 639–643. [Google Scholar]
- Selvaraju, R.R.; Cogswell, M.; Das, A.; Vedantam, R.; Parikh, D.; Batra, D. Grad-CAM: Visual explanations from deep networks via gradient-based localization. In Proceedings of the 2017 IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 618–626. [Google Scholar]
- Zhou, B.; Khosla, A.; Lapedriza, A.; Oliva, A.; Torralba, A. Learning deep feature for discriminative localization. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 2921–2929. [Google Scholar]
Training Data | Validation Data | Test Data | Total |
---|---|---|---|
4251 | 1063 | 4765 | 9359 |
Feature | Pearson Correlation Coefficient |
---|---|
Area | 0.953 |
Minimum Area Rectangle | 0.941 |
Convex Hull Area | 0.936 |
Minor Axis Length | 0.935 |
Grid Length (Vertical) | 0.852 |
Circumscribed Circle | 0.847 |
Perimeter | 0.836 |
Major Axis Length | 0.785 |
Grid Length (Horizontal) | 0.776 |
Solidity | 0.547 |
Aspect Ratio | 0.127 |
Eccentricity | −0.029 |
Selected Feature | Pearson Correlation Coefficient |
---|---|
Area | 0.763 |
Convex Hull Area | 0.721 |
Circumscribed Circle | 0.651 |
Minimum Area Rectangle | 0.644 |
Major Axis Length | 0.619 |
Perimeter | 0.576 |
Minor Axis Length | 0.539 |
Grid Length (Horizontal) | 0.462 |
Grid Length (Vertical) | 0.450 |
Aspect Ratio | 0.316 |
Eccentricity | 0.141 |
Solidity | 0.057 |
Method | MAE (kg) | MAPE (%) | |
---|---|---|---|
FSS | Ours | 17.31 | 5.5 |
SVR (RBF) | 27.57 | 7.7 | |
SVR (Polynomial) | 41.29 | 11.6 | |
WSS | Ours | 35.91 | 10.1 |
SVR (RBF) | 40.12 | 11.3 | |
SVR (Polynomial) | 51.45 | 14.4 |
Mask | Correlation Coefficient | Number of Features | MAE (kg) | MAPE (%) |
---|---|---|---|---|
FSS | 0 | 12 | 19.14 | 5.3 |
0.5 | 10 | 17.31 | 5.1 | |
0.6 | 9 | 18.37 | 5.1 | |
0.7 | 7 | 23.20 | 6.5 | |
0.8 | 6 | 23.21 | 6.5 | |
0.9 | 4 | 23.77 | 6.6 | |
WSS | 0 | 12 | 35.19 | 9.9 |
0.1 | 11 | 35.53 | 10.0 | |
0.2 = 0.3 | 10 | 35.01 | 9.8 | |
0.4 | 9 | 36.69 | 10.3 | |
0.5 | 7 | 35.91 | 10.1 | |
0.6 | 5 | 37.65 | 10.6 | |
0.7 | 2 | 40.49 | 11.4 |
Mask | Correlation Coefficient | Number of Features | MAE (kg) | MAPE (%) |
---|---|---|---|---|
FSS | 0 | 12 | 28.23 | 7.9 |
0.5 | 10 | 27.57 | 7.7 | |
0.6 | 9 | 28.28 | 7.9 | |
0.7 | 7 | 30.92 | 8.7 | |
0.8 | 6 | 30.11 | 8.4 | |
0.9 | 4 | 28.56 | 8.4 | |
WSS | 0 | 12 | 40.12 | 11.3 |
0.1 | 11 | 40.76 | 11.4 | |
0.2 = 0.3 | 10 | 40.90 | 11.5 | |
0.4 | 9 | 41.27 | 11.6 | |
0.5 | 7 | 44.06 | 12.4 | |
0.6 | 5 | 50.36 | 14.1 | |
0.7 | 2 | 61.62 | 17.3 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Lee, C.-b.; Lee, H.-s.; Cho, H.-c. Cattle Weight Estimation Using Fully and Weakly Supervised Segmentation from 2D Images. Appl. Sci. 2023, 13, 2896. https://doi.org/10.3390/app13052896
Lee C-b, Lee H-s, Cho H-c. Cattle Weight Estimation Using Fully and Weakly Supervised Segmentation from 2D Images. Applied Sciences. 2023; 13(5):2896. https://doi.org/10.3390/app13052896
Chicago/Turabian StyleLee, Chang-bok, Han-sung Lee, and Hyun-chong Cho. 2023. "Cattle Weight Estimation Using Fully and Weakly Supervised Segmentation from 2D Images" Applied Sciences 13, no. 5: 2896. https://doi.org/10.3390/app13052896
APA StyleLee, C.-b., Lee, H.-s., & Cho, H.-c. (2023). Cattle Weight Estimation Using Fully and Weakly Supervised Segmentation from 2D Images. Applied Sciences, 13(5), 2896. https://doi.org/10.3390/app13052896