[Paper Review] Panoptic Instance Segmentation on Pigs
This paper proposes a panoptic instance segmentation framework for pigs using deep learning to achieve pixel-accurate body contour detection, outperforming bounding boxes and keypoints. It achieves 95% F1 score on a custom dataset of 1,000 hand-labeled images despite occlusions and poor image quality, enabling precise estimation of pig size and weight for precision livestock farming.
The behavioural research of pigs can be greatly simplified if automatic recognition systems are used. Especially systems based on computer vision have the advantage that they allow an evaluation without affecting the normal behaviour of the animals. In recent years, methods based on deep learning have been introduced and have shown pleasingly good results. Especially object and keypoint detectors have been used to detect the individual animals. Despite good results, bounding boxes and sparse keypoints do not trace the contours of the animals, resulting in a lot of information being lost. Therefore this work follows the relatively new definition of a panoptic segmentation and aims at the pixel accurate segmentation of the individual pigs. For this a framework of a neural network for semantic segmentation, different network heads and postprocessing methods is presented. With the resulting instance segmentation masks further information like the size or weight of the animals could be estimated. The method is tested on a specially created data set with 1000 hand-labeled images and achieves detection rates of around 95% (F1 Score) despite disturbances such as occlusions and dirty lenses.
Motivation & Objective
- Address the limitations of bounding box and keypoint detection in pig behavior monitoring by enabling pixel-level segmentation.
- Develop a unified framework for semantic and instance segmentation tailored to pig-specific challenges like occlusion and low-light conditions.
- Enable accurate estimation of pig size and weight through precise segmentation masks.
- Create a publicly accessible, high-quality dataset with 1,000 hand-labeled images for panoptic segmentation in pig vision research.
- Improve reliability of automated pig monitoring systems by reducing false positives and negatives in complex barn environments.
Proposed method
- Utilizes a deep neural network architecture (ResNet34, Inception-ResNet-v2, or combined) for semantic segmentation of pig bodies.
- Employs multiple network heads to generate instance masks and refine segmentation boundaries.
- Applies postprocessing techniques to extract elliptical contours from segmentation masks, enabling size and weight estimation.
- Uses a novel panoptic evaluation metric (PQ) to assess both instance and semantic segmentation quality.
- Implements data augmentation and clustering-based filtering to handle overlapping pigs and edge-of-frame animals.
- Applies sanity checks (e.g., minimum pixel count) to reduce false positives and negatives in segmentation outputs.
Experimental results
Research questions
- RQ1Can panoptic instance segmentation achieve higher accuracy than bounding box or keypoint detection for pig monitoring in real-world farm conditions?
- RQ2How does the proposed framework perform under common challenges such as occlusion, low lighting, and dirty camera lenses?
- RQ3To what extent can pixel-accurate segmentation improve the estimation of pig size and weight compared to bounding box-based methods?
- RQ4How do different backbone networks (ResNet34, Inception-ResNet-v2) compare in performance on the proposed pig segmentation task?
- RQ5What impact do data quality and annotation consistency have on the generalization and evaluation of segmentation models in pig vision systems?
Key findings
- The proposed panoptic segmentation framework achieves an F1 score of 95.5% on the full test set, with 96.19% F1 in daylight and 94.87% in night vision conditions.
- The method maintains high precision (95.86%) and recall (95.14%) across diverse conditions, including occlusions and low-visibility scenarios.
- The ablation study shows minimal performance differences between ResNet34 and Inception-ResNet-v2 backbones, indicating robustness to architecture choice.
- The framework enables reliable estimation of pig body circumference and volume from segmentation masks, supporting weight and health monitoring.
- Despite challenges like overlapping pigs and edge-of-frame animals, the model achieves consistent performance, with error cases primarily due to annotation ambiguity.
- The study highlights the need for standardized, publicly available datasets with fixed annotation rules to enable fair benchmarking across future works.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.