IDEAS home Printed from https://ideas.repec.org/a/gam/jagris/v15y2025i7p696-d1620259.html
   My bibliography  Save this article

Swift Transfer of Lactating Piglet Detection Model Using Semi-Automatic Annotation Under an Unfamiliar Pig Farming Environment

Author

Listed:
  • Qi’an Ding

    (College of Intelligent Manufacturing, Anhui Science and Technology University, Chuzhou 233100, China
    College of Engineering, Nanjing Agricultural University, Nanjing 210031, China)

  • Fang Zheng

    (Key Laboratory of Smart Farming Technology for Agricultural Animals, Ministry of Agriculture and Rural Affairs, Wuhan 430070, China)

  • Luo Liu

    (College of Veterinary Medicine, Nanjing Agricultural University, Nanjing 210014, China)

  • Peng Li

    (College of Engineering, Nanjing Agricultural University, Nanjing 210031, China)

  • Mingxia Shen

    (College of Artificial Intelligence, Nanjing Agricultural University, Nanjing 210031, China)

Abstract

Manual annotation of piglet imagery across varied farming environments is labor-intensive. To address this, we propose a semi-automatic approach within an active learning framework that integrates a pre-annotation model for piglet detection. We further examine how data sample composition influences pre-annotation efficiency to enhance the deployment of lactating piglet detection models. Our study utilizes original samples from pig farms in Jingjiang, Suqian, and Sheyang, along with new data from the Yinguang pig farm in Danyang. Using the YOLOv5 framework, we constructed both single and mixed training sets of piglet images, evaluated their performance, and selected the optimal pre-annotation model. This model generated bounding box coordinates on processed new samples, which were subsequently manually refined to train the final model. Results indicate that expanding the dataset and diversifying pigpen scenes significantly improve pre-annotation performance. The best model achieved a test precision of 0.921 on new samples, and after manual calibration, the final model exhibited a training precision of 0.968, a recall of 0.952, and an average precision of 0.979 at the IoU threshold of 0.5. The model demonstrated robust detection under various lighting conditions, with bounding boxes closely conforming to piglet contours, thereby substantially reducing manual labor. This approach is cost-effective for piglet segmentation tasks and offers strong support for advancing smart agricultural technologies.

Suggested Citation

  • Qi’an Ding & Fang Zheng & Luo Liu & Peng Li & Mingxia Shen, 2025. "Swift Transfer of Lactating Piglet Detection Model Using Semi-Automatic Annotation Under an Unfamiliar Pig Farming Environment," Agriculture, MDPI, vol. 15(7), pages 1-20, March.
  • Handle: RePEc:gam:jagris:v:15:y:2025:i:7:p:696-:d:1620259
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2077-0472/15/7/696/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2077-0472/15/7/696/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Normaisharah Mamat & Mohd Fauzi Othman & Rawad Abdulghafor & Ali A. Alwan & Yonis Gulzar, 2023. "Enhancing Image Annotation Technique of Fruit Classification Using a Deep Learning Approach," Sustainability, MDPI, vol. 15(2), pages 1-19, January.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Mohammed Al-Naeem & M M Hafizur Rahman & Anuradha Banerjee & Abu Sufian, 2023. "Support Vector Machine-Based Energy Efficient Management of UAV Locations for Aerial Monitoring of Crops over Large Agriculture Lands," Sustainability, MDPI, vol. 15(8), pages 1-17, April.
    2. Ali Hakem Alsaeedi & Ali Mohsin Al-juboori & Haider Hameed R. Al-Mahmood & Suha Mohammed Hadi & Husam Jasim Mohammed & Mohammad R. Aziz & Mayas Aljibawi & Riyadh Rahef Nuiaa, 2023. "Dynamic Clustering Strategies Boosting Deep Learning in Olive Leaf Disease Diagnosis," Sustainability, MDPI, vol. 15(18), pages 1-20, September.
    3. Xinyu Jia & Xueqin Jiang & Zhiyong Li & Jiong Mu & Yuchao Wang & Yupeng Niu, 2023. "Application of Deep Learning in Image Recognition of Citrus Pests," Agriculture, MDPI, vol. 13(5), pages 1-19, May.
    4. Bashar Igried & Shadi AlZu’bi & Darah Aqel & Ala Mughaid & Iyad Ghaith & Laith Abualigah, 2023. "An Intelligent and Precise Agriculture Model in Sustainable Cities Based on Visualized Symptoms," Agriculture, MDPI, vol. 13(4), pages 1-20, April.
    5. Yane Li & Ying Wang & Dayu Xu & Jiaojiao Zhang & Jun Wen, 2023. "An Improved Mask RCNN Model for Segmentation of ‘Kyoho’ ( Vitis labruscana ) Grape Bunch and Detection of Its Maturity Level," Agriculture, MDPI, vol. 13(4), pages 1-18, April.
    6. Yanlei Xu & Zhiyuan Gao & Yuting Zhai & Qi Wang & Zongmei Gao & Zhao Xu & Yang Zhou, 2023. "A CNNA-Based Lightweight Multi-Scale Tomato Pest and Disease Classification Method," Sustainability, MDPI, vol. 15(11), pages 1-17, May.
    7. Yanxin Hu & Gang Liu & Zhiyu Chen & Jiaqi Liu & Jianwei Guo, 2023. "Lightweight One-Stage Maize Leaf Disease Detection Model with Knowledge Distillation," Agriculture, MDPI, vol. 13(9), pages 1-22, August.
    8. Yujia Zhang & Luteng Zhong & Yu Ding & Hongfeng Yu & Zhaoyu Zhai, 2023. "ResViT-Rice: A Deep Learning Model Combining Residual Module and Transformer Encoder for Accurate Detection of Rice Diseases," Agriculture, MDPI, vol. 13(6), pages 1-17, June.
    9. Ewa Ropelewska & Dorota E. Kruczyńska & Ahmed M. Rady & Krzysztof P. Rutkowski & Dorota Konopacka & Karolina Celejewska & Monika Mieszczakowska-Frąc, 2023. "Evaluating the Classification of Freeze-Dried Slices and Cubes of Red-Fleshed Apple Genotypes Using Image Textures, Color Parameters, and Machine Learning," Agriculture, MDPI, vol. 13(3), pages 1-16, February.
    10. Yonis Gulzar, 2023. "Fruit Image Classification Model Based on MobileNetV2 with Deep Transfer Learning Technique," Sustainability, MDPI, vol. 15(3), pages 1-14, January.
    11. Shahnawaz Ayoub & Yonis Gulzar & Jaloliddin Rustamov & Abdoh Jabbari & Faheem Ahmad Reegu & Sherzod Turaev, 2023. "Adversarial Approaches to Tackle Imbalanced Data in Machine Learning," Sustainability, MDPI, vol. 15(9), pages 1-17, April.
    12. Poonam Dhiman & Amandeep Kaur & V. R. Balasaraswathi & Yonis Gulzar & Ali A. Alwan & Yasir Hamid, 2023. "Image Acquisition, Preprocessing and Classification of Citrus Fruit Diseases: A Systematic Literature Review," Sustainability, MDPI, vol. 15(12), pages 1-23, June.

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jagris:v:15:y:2025:i:7:p:696-:d:1620259. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.