Digital Dermatitis (DD)

Digital dermatitis (DD) is the most prevalent bovine infectious claw disease in North American and global cattle industries. The disease is responsible for painful circumscribed ulcerative lesions on the interdigital space of the hoof in both dairy and beef cattle. Moreover, DD is associated with massive herd outbreaks of lameness and influences cattle welfare and production. Additionally, the disease results in major losses for the cattle industry because of severe lameness, decreased milk production, and increased infertility rate. Therefore, early detection can lead to prompt treatment, reduce costs, and decrease lameness within the herd. Lesions are scored using the M-stage classification system by a trained investigator where cattle with normal skin was observed on the foot were classified as M0 whereas cattle with acute, active ulcerative DD lesions greater than or equal to 20 mm in diameter were classified as M2. However, early identification and prompt intervention requires extensive employee training in an industry with a high employee turnover rate.

Traditionally, DD is determined through visual inspection or clinical experiments, but both methods require time and labor in addition to lacking the ability of early detection. Recent advances in computational power and algorithms have made object detection and classification possible through machine learning techniques. Computer vision can be used to perform object detection and calculate the associated class probabilities from a series of images or videos. Such methods for animal detection have been used to assess the health of livestock in agriculture. However, applications for the classification of health events are still rare in veterinary medicine. There exists many unexplored applications in veterinary medicine and an untapped potential of machine learning algorithms to predict relevant biological outcomes. Thus, computer vision provides a unique opportunity to improve early detection of DD and optimized treatment plans for all cattle.

Object Detection

Some of the common model architectures used for object detection include variations of convolutional neural networks (CNNs) and region-based convolutional neural networks (R-CNNs). For the purposes of the study, You Only Look Once (YOLO), Single Shot MultiBox Detector (SSD), and Fast and Faster R-CNNs will be used since the methods are expected to be faster with a comparable or higher accuracy versus other computational approaches. Such models will be used for real-time predictions to predict bounding boxes and class probabilities from an image in a single evaluation. The study will compare and contrast the four latest versions of YOLO: YOLOv3, Tiny YOLOv3, YOLOv4, and Tiny YOLOv4 for differences in performance in addition to the other object detection algorithms.

Object detectors are mainly divided into two-stage object detectors and one-stage object detectors. In the former, R-CNN was among the earliest CNN-based detectors with the pipeline of bounding box regression and classification. Progressive improvements were proposed for better efficiency and effectiveness. Fast R-CNN introduced the ROI pooling in the detection framework to achieve better accuracy and faster inference. Faster R-CNN proposed the Region Proposal Networks to effectively generate region proposals instead of hand-crafted ones. In the latter, SSD and YOLO directly predicted the bounding box and the class without region proposal generation, such that real-time inference was achieved on GPUs with competitive accuracy. Though these one-stage object detectors have achieved high performance on a high-end GPU, they are subjected to real-time detection on embedded devices because of their high memory requirement. To address the issue, Tiny-YOLO is a lightweight network architecture based on YOLO for constrained environments, greatly reducing the model size and computation cost.

Purpose

Consequently, the study aims to design, develop, and implement an application for the real-time detection of DD in dairy cattle with the intention of minimizing the effects of DD and lameness in all cattle via early detection and prompt treatments. First, various computer vision models will be trained for detection and scoring of DD including using over 2,000 images of M0 and M2 images of DD. Next, computer vision models will be compared for detection and scoring of DD using accuracy, precision-recall, and mean average precision (mAP) at intersection over union (IoU) of 0.5. Then, computer vision models will be compared for speed using frames per second (FPS). Lastly, the best computer vision model will be automated for detection of DD in application using video and real-time detection. Such tools have not yet been implemented and will help cattlemen improve DD prevention strategies for early intervention as well as helping increase cattle welfare and production.

Approach

The approach involves the following five steps:

  1. Label images for M-stages of DD using the M-stage DD classification system images for DD in dairy cattle.
  2. Process library of labeled images to generate training dataset robust to oversampling and noise.
  3. Train computer vision models: SSD, SSD Lite, Faster R-CNN, Cascade R-CNN, YOLOv3, Tiny YOLOv3, YOLOv4, and Tiny YOLOv4.
  4. Evaluate computer vision models: precision-recall, mAP, and FPS.
  5. Implement application based on the top-performing model using image, video, and real-time detection.