DOI QR코드

DOI QR Code

Image Processing and Deep Learning Techniques for Fast Pig's Posture Determining and Head Removal

돼지의 빠른 자세 결정과 머리 제거를 위한 영상처리 및 딥러닝 기법

  • 안한세 (고려대학교 컴퓨터정보학과) ;
  • 최원석 (고려대학교 컴퓨터융합소프트웨어학과) ;
  • 박선화 (고려대학교 컴퓨터융합소프트웨어학과) ;
  • 정용화 (고려대학교 컴퓨터융합소프트웨어학과) ;
  • 박대희 (고려대학교 컴퓨터융합소프트웨어학과)
  • Received : 2019.07.08
  • Accepted : 2019.08.20
  • Published : 2019.11.30

Abstract

The weight of pig is one of the main factors in determining the health and growth state of pigs, their shipment, the breeding environment, and the ration of feed, and thus measuring the pig's weight is an important issue in productivity perspective. In order to estimate the pig's weight by using the number of pig's pixels from images, acquired from a Top-view camera, the posture determining and the head removal from images are necessary to measure the accurate number of pixels. In this research, we propose the fast and accurate method to determine the pig's posture by using a fast image processing technique, find the head location by using a fast deep learning technique, and remove pig's head by using light weighted image processing technique. First, we determine the pig's posture by comparing the length from the center of the pig's body to the outline of the pig in the binary image. Then, we train the location of pig's head, body, and hip in images using YOLO(one of the fast deep learning based object detector), and then we obtain the location of pig's head and remove an outside area of head by using head location. Finally, we find the boundary of head and body by using Convex-hull, and we remove pig's head. In the Experiment result, we confirmed that the pig's posture was determined with an accuracy of 0.98 and a processing speed of 250.00fps, and the pig's head was removed with an accuracy of 0.96 and a processing speed of 48.97fps.

양돈 업계에서 돼지의 무게는 돼지의 건강이나 성장 상태, 출하 여부, 사육 환경, 사료 배급을 결정하는 주요 요인 중 하나이며, 따라서 돼지의 무게를 측정하는 것은 돼지의 생산성 측면에서 중요한 문제이다. Top-view 카메라에서 획득한 영상으로부터 돼지의 픽셀 수를 이용하여 돼지의 무게를 추정하고자 할 때, 정확한 픽셀 수 측정에 영향을 주는 돼지의 자세를 결정할 필요가 있으며, 픽셀 수 측정에 영향을 주는 머리부분을 제거할 필요가 있다. 본 논문에서는 빠른 영상처리 기법을 이용하여 돼지의 자세를 빠르게 결정하고, 딥러닝 기반의 빠른 객체탐지 기법인 YOLO를 이용하여 돼지 머리 위치를 파악한 후, 경량화된 영상처리 기법을 이용하여 돼지의 머리와 몸통 경계를 획득하고 머리를 제거하는 방법을 제안한다. 즉, 빠른 영상처리 기법으로 이진화된 돼지의 영상 데이터에서 돼지의 몸통 중심점으로부터 돼지의 외곽선까지의 길이를 비교하여 돼지의 자세를 결정한다. 또한, 돼지의 머리 위치를 탐지하기 위하여 YOLO를 이용하여 영상 데이터 내의 돼지의 머리, 몸통, 엉덩이의 위치를 학습시킨 후, 곧은 자세의 돼지 머리 위치를 획득하고 머리 바깥 영역을 제거한다. 마지막으로 Convex-hull을 이용하여 돼지의 머리와 몸통 경계를 추정한 후, 머리를 제거한다. 실험 결과, 0.98의 정확도와 250.00fps의 수행속도로 돼지의 자세를 결정하였으며, 0.96의 정확도와 48.97fps의 수행속도로 돼지의 머리탐지 및 제거가 가능함을 확인하였다.

Keywords

References

  1. Korea Rural Economic Institute [Internet], https://www.krei.re.kr, accessed July 2019.
  2. K. Jun, S. Kim, and H. Ji, "Estimating Pig Weights from Images Without Constraint on Posture and Illumination," Computers and Electronics in Agriculture, Vol.153, pp.169-176, 2018. https://doi.org/10.1016/j.compag.2018.08.006
  3. N. Brandl and E. Jorgensen, "Determination of Live Weight of Pigs from Dimensions Measured Using Image Analysis," Computers and Electronics in Agriculture, Vol.15, No.1, pp.57-72, 1996. https://doi.org/10.1016/0168-1699(96)00003-8
  4. M. Kashiha, C. Bahr, S. Ott, C. Moons, T. Niewold, F. Odberg, and D. Berckmans, "Weight Estimation of Pigs Using Topview Image Processing," in Proceedings International Conference Image Analysis and Recognition, pp.496-503, 2014.
  5. M. Kashiha, C. Bahr, S. Ott, C. Moons, T. Niewold, F. Odberg, and D. Berckmans, "Automatic Weight Estimation of Individual Pigs Using Image Analysis," Computers and Electronics in Agriculture, Vol.107, pp.38-44, 2014. https://doi.org/10.1016/j.compag.2014.06.003
  6. H. Guo, X. Ma, Q. Ma, K. Wang, W. Su, and D. H. Zhu, "LSSA_CAU: An Interactive 3d Point Clouds Analysis Software for Body Measurement of Livestock with Similar Forms of Cows or Pigs," Computers and Electronics in Agriculture, Vol.138, pp.60-68, 2017. https://doi.org/10.1016/j.compag.2017.04.014
  7. C. Shi, G. Teng, and Z. Li, "An Approach of Pig Weight Estimation Using Binocular Stereo System Based on LabVIEW," Computers and Electronics in Agriculture, Vol.129, pp.37-43, 2016. https://doi.org/10.1016/j.compag.2016.08.012
  8. A. Pezzuoloa, M. Guarinob, L. Sartoria, L. Gonzalezc, and F. Marinelloa, "On-barn Pig Weight Estimation Based on Body Measurements by a Kinect v1 Depth Camera," Computers and Electronics in Agriculture, Vol.148, pp.29-36, 2018. https://doi.org/10.1016/j.compag.2018.03.003
  9. M. Lu, T. Norton, A. Youssef, N. Radojkovic, A. Fernandez, and D. Berckmans, "Extracting Body Surface Dimensions from Top-view Images of Pigs," International Journal of Agricultural and Biological Engineering, Vol.11, No.5, pp.182-191, 2018. https://doi.org/10.25165/j.ijabe.20181105.4054
  10. W. Choi, H. Ahn, H. Lee, Y. Chung, and D. Park, "Detection of Pig's Posture for Pig's Head Removal," in Proceedings of the KIPS Spring Conference, Vol.26, No.1, pp.625-628, 2018.
  11. H. Ahn, W. Choi, H. Lee, Y. Chung, and D. Park, "Image Processing for Pig's Head Removal," in Proceedings of the KIPS Spring Conference, Vol.26, No.1, pp.621-624, 2019.
  12. H. Blum, "A Transformation for Extracting New Descriptors of Shape," Models for the Perception of Speech and Visual Form, Vol.19, No.5, pp.362-380, 1967.
  13. Open Source Computer Vision: 'OpenCV'. Available at http://opencv.org, accessed December 2018.
  14. Z. Cao, G. Hidalgo, T. Simon, S. Wei, and Y. Sheikh, "OpenPose: Realtime Multi-person 2D Pose Estimation Using Part Affinity Fields," arXiv preprint arXiv:1812.08008, 2018.
  15. Y. Chen, C. Shen, X. S. Wei, L. Liu, and J. Yang, "Adversarial PoseNet: A Structure-aware Convolutional Network for Human Pose Estimation," in Proceedings of the IEEE International Conference on Computer Vision, pp.1212-1221, 2017.
  16. K. He, G. Gkioxari, P. Dollar, and R. Girshick, "Mask R-CNN," in Proceedings of the IEEE International Conference on Computer Vision, pp.2961-2969, 2017.
  17. J. Lee, L. Jin, D. Park, and Y. Chung, "Automatic Recognition of Aggressive Pig Behaviors Using Kinect Depth Sensor," Sensors, Vol.16, No.5, pp.631, 2016. https://doi.org/10.3390/s16050631
  18. J. Kim, Y. Chung, Y. Choi, J. Sa, H. Kim, Y. Chung, D. Park, and H. Kim, "Depth-based Detection of Standing-pigs in Moving Noise Environments," Sensors, Vol.17, No.12, pp.2757, 2017. https://doi.org/10.3390/s17122757
  19. M. Ju, Y. Choi, J. Seo, J. Sa, S. Lee, Y. Chung, and D. Park, "A Kinect-based Segmentation of Touching-pigs for Real-time Monitoring," Sensors, Vol.18, No.6, pp.1746, 2018. https://doi.org/10.3390/s18061746
  20. J. Sa, Y. Choi, H. Lee, Y. Chung, D. and Park, J. Cho, "Fast Pig Detection with a Top-view Camera Under Various Illumination Conditions," Symmetry, Vol.11, No.2, pp.266, 2019. https://doi.org/10.3390/sym11020266
  21. M. Dillencourt, H. Samet, and M. Tamminen, "A General Approach to Connected-component Labeling for Arbitrary Image Representations," Journal of the ACM, Vol.39, No.8, pp.253-280, 1992. https://doi.org/10.1145/128749.128750
  22. J. Redmon, and A. Farhadi, "YOLO9000: Better, Faster, Stronger," in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp.7263-7271, 2017.
  23. D. McCallum, and D. Avis, "A Linear Algorithm for Finding the Convex Hull of a Simple Polygon," Information Processing Letters, Vol.9, No.5, pp.201-206, 1979. https://doi.org/10.1016/0020-0190(79)90069-3
  24. N. Otsu, "A Threshold Selection Method from Gray-level Histograms," IEEE Transactions on Systems, Man, and Cybernetics, Vol.9, No.1, pp.62-66, 1979. https://doi.org/10.1109/TSMC.1979.4310076
  25. J. Canny, "A Computational Approach to Edge Detection," IEEE Transactions on Pattern Analysis and Machine Intelligence, pp.679-698, 1986.
  26. J. Zunic, and P. Rosin, "A New Convexity Measure for Polygons," IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol.26, No.7, pp.923-934, 2004. https://doi.org/10.1109/TPAMI.2004.19