Skip to main content
. 2018 May 29;18(6):1746. doi: 10.3390/s18061746
Algorithm 2 Separation algorithm of YOLO Processing Module
Input: An image of touching-pigs
Output: An image of individually separated pigs
// BB generation
Generate BBs by YOLO
// BB evaluation
Set RoI
Check BB size, boundary, and coverage conditions
Determine useful BBs
If the number of useful BBs is 0
  Exit this function and go to Image Processing Module
// Segmentation using useful BBsConnect (two points with one or two useful BBs)
If the number of useful BBs is one and the number of generated boundary lines is two
  Exit this function and go to Image Processing Module
// Segmentation quality evaluation
Check segmentation length and size conditions
If conditions are not satisfied,
  Exit this function and go to Image Processing Module
Return;