HOME  >  Research    
DooMoo:Contactless Pig Weight Measurement

Introduction

In the Karen and Muser communities of Chiang Mai, black pigs are a vital source of income and cultural heritage. However, farmers in these remote mountainous areas lack accessible tools to measure pig weight accurately. Currently, they rely on visual estimation or traditional bamboo measurements, which lead to unfair pricing and lost earnings.

Furthermore, traditional physical weighing is labor-intensive and highly stressful for the animals. For young piglets, excessive handling can lead to mother pigs rejecting or even cannibalizing them due to scent changes. To solve this, our project introduces a contactless, smartphone-based weight estimation system that uses Artificial Intelligence to provide accurate measurements without ever touching the pig.

Key Features

  • Contactless Measurement: Eliminates animal stress and farmer injury by estimating weight from a single smartphone photograph.
  • AI-Powered Segmentation: Automatically isolates the pig from complex backgrounds like mud, fences, or other livestock.
  • Monocular Depth Estimation: Uses advanced AI to "see" distance without requiring expensive LiDAR or stereo-camera hardware.
  • Metric Conversion: Employs geometric principles (similar triangles) to convert image pixels into real-world physical centimeters.
  • Farmer-Centric Mobile App: An intuitive interface built with Flutter, designed for users with minimal technical experience in rural environments.

Development and Innovation

Our solution leverages a sophisticated three-stage AI processing pipeline to turn a 2D image into a weight value.

1. Computer Vision Segmentation

We utilize DeepLabV3 with a ResNet-101 backbone to perform pixel-level classification. Unlike standard object detection, this allows the system to understand the precise boundary and shape of the pig.

2. Depth and Scale Recovery

Since standard photos don't contain "size" information, we integrated Depth Pro (developed by Apple ML Research). This model predicts the distance from the camera to the pig in metric units. By combining this depth with EXIF metadata (focal length), the system calculates the pig's real physical length.

3. Regression-Based Weight Prediction

The extracted physical features (Body Length and Width) are fed into a machine learning regression model. This model was trained on real-world datasets where visual measurements were paired with actual scale weights, allowing the AI to learn the correlation between body dimensions and mass.

Impact and Future Directions

By introducing this digital tool, we are empowering remote farming communities with data-driven fair trade.

  • Economic Fair Play: Accurate weight data ensures farmers receive fair market value for their livestock, directly boosting household income.
  • Animal Welfare: By removing the need for physical restraint and scales, we significantly reduce the risk of injury and "scent-rejection" in piglets.
  • Data-Driven Farming: As the app is used, more data is collected, allowing the AI to be retrained for even higher accuracy across different growth stages and pig breeds.

Future Roadmap:

  • Offline Inference: Integrating PyTorch Lite to allow the AI models to run directly on the smartphone without needing an internet connection—crucial for deep mountain villages.
  • Posture Correction: Developing "Eccentricity" filters to ensure accuracy even if the pig is curved or in a non-standing position during the photo.

Project Advisor(s)

Dr. Boonyarit Changaival
Adjunct Faculty Member

Research Team member(s)

Phasin Noomkan
Undergraduate Student
Phurich Amornnara
Undergraduate Student
Thanakit Thanasuwanditee
Undergraduate Student
Puttipong Srisuwantat
Undergraduate Student
Chayenchanadhip Sevikul
Undergraduate Student