| Literature DB >> 35681917 |
Guoming Li1, Galen E Erickson2, Yijie Xiong2,3.
Abstract
Individual feedlot beef cattle identification represents a critical component in cattle traceability in the supply food chain. It also provides insights into tracking disease trajectories, ascertaining ownership, and managing cattle production and distribution. Animal biometric solutions, e.g., identifying cattle muzzle patterns (unique features comparable to human fingerprints), may offer noninvasive and unique methods for cattle identification and tracking, but need validation with advancement in machine learning modeling. The objectives of this research were to (1) collect and publish a high-quality dataset for beef cattle muzzle images, and (2) evaluate and benchmark the performance of recognizing individual beef cattle with a variety of deep learning models. A total of 4923 muzzle images for 268 US feedlot finishing cattle (>12 images per animal on average) were taken with a mirrorless digital camera and processed to form the dataset. A total of 59 deep learning image classification models were comparatively evaluated for identifying individual cattle. The best accuracy for identifying the 268 cattle was 98.7%, and the fastest processing speed was 28.3 ms/image. Weighted cross-entropy loss function and data augmentation can increase the identification accuracy of individual cattle with fewer muzzle images for model development. In conclusion, this study demonstrates the great potential of deep learning applications for individual cattle identification and is favorable for precision livestock management. Scholars are encouraged to utilize the published dataset to develop better models tailored for the beef cattle industry.Entities:
Keywords: animal biometrics; cognitive science; computer vision; machine learning; pattern recognition; precision livestock management
Year: 2022 PMID: 35681917 PMCID: PMC9179917 DOI: 10.3390/ani12111453
Source DB: PubMed Journal: Animals (Basel) ISSN: 2076-2615 Impact factor: 3.231
Figure 1The illustration and terminologies of a beef cattle muzzle pattern.
Reference summary from previous cattle muzzle identification studies.
| Cattle Type | Image Size (Pixels) | Image Type | Restrained | Cattle Counts | Images per Cattle | Total Images | Identification Method | Accuracy (%) | Processing Time (ms/Image) | Reference |
|---|---|---|---|---|---|---|---|---|---|---|
| Dairy |
| Printed | Y |
|
| 6 | Manual |
|
| [ |
|
|
| Printed | Y | − |
| 200 | Manual | − |
| [ |
| − |
| Printed | Y | 65 |
| − | Manual |
|
| [ |
| Beef | 256 × 256 | Grayscale | Y |
| − | 43 | DIP | 46.5 |
| [ |
| Beef | 320 × 240 | Printed | Y | 29 | 10 | 290 | ML | 98.9 |
| [ |
| Beef | 200 × 200 | Grayscale |
| 8 | 10 | 80 | DIP | 90.0 |
| [ |
|
|
| Grayscale | − | 15 | 7 | 105 | DIP | 93.3 | 37–879 | [ |
| Beef |
| Printed | Y | 20 | 8 | 160 | DIP | 98.3 |
| [ |
|
| − | Grayscale |
| 53 | 20 | 1060 | DIP | − |
| [ |
| Beef | 300 × 400 | Grayscale | − | 31 | 7 | 217 | ML | 99.5 |
| [ |
|
| − | RGB | − | 28 | 20 | 560 | ML | 100.0 | − | [ |
| − |
| RGB | − | 52 | 20 | 1040 | ML | 96.0 |
| [ |
| Beef |
| RGB | N | 14 | 5 | 70 | DIP | 100.0 |
| [ |
| Beef | 300 × 400 | Grayscale |
| 31 | 7 | 217 | ML | 99.5 |
| [ |
| Beef | 300 × 400 | Grayscale | − | 31 | 7 | 217 | ML | 99.5 | 48–1362 | [ |
| Beef |
| RGB |
| 52 | 6 | 312 | ML | 96.4 | − | [ |
| Dairy | 400 × 400 | RGB |
| 500 | 10 | 5000 | DIP | 93.9 |
| [ |
| Dairy | 200 × 200 | RGB |
| 500 | 10 | 5000 | ML | 94.9 |
| [ |
| Dairy | 200 × 200 | RGB |
| 500 | 10 | 5000 | DL | 98.9 |
| [ |
| Dairy | 200 × 200 | RGB | − | 500 | 10 | 5000 | ML | 93.9 |
| [ |
| Dairy |
| RGB | N | 15 | 7 | 105 | ML | 93.0 | 368–1193 | [ |
| Beef |
| RGB | Y | 60 | 5–10 | 460 | DIP | 98.1 |
| [ |
| Beef | − | RGB |
| 45 | 20 | 900 | ML | 96.5 |
| [ |
| Beef |
| RGB | Y | 431 |
| 1600 | ML | 95.0 | − | [ |
| Dairy | 200 × 200 | RGB |
| 400 | 10 | 4000 | DL | 98.9 |
| [ |
| Beef | 1024 × 1024 | RGB | Y | 300 |
| 2900 | DL | 99.1 | − | [ |
| Dairy | 64 × 64 | RGB |
| 186 | 5 | 930 | ML | 83.4 | − | [ |
Note: ‘’ indicates that information was not provided. DIP, digital image processing; ML, machine learning; DL, deep learning. Cattle species include beef cattle and dairy cattle. Image type is categorized as printed (samples are obtained from a direct compress with cattle noses and then scanned or photographed to form electronic images), grayscale with one-channel data captured directly from cameras, and RGB with three-channel (red, green, and blue) data. ‘Y’ indicates that the animal was restrained during data collection, while ‘N’ indicates that it was not.
Figure 2Sample muzzle images of nine individual mixed-breed beef cattle.
Figure 3Frequency distribution of normalized width/length of a cropped image.
Summary of deep learning image classification models evaluated in this study.
| Model Name and Reference | Model Version | Highlighted Features | Total Parameters (Million) | Model Size (MB) |
|---|---|---|---|---|
| AlexNet [ | AlexNet | First parallelization and distributed training with multiple GPUs. | 61.1 | 221.6 |
| DenseNet [ | DenseNet121 | Connections between each layer and every other layer in a feed-forward fashion. Numbers indicate that the model contains 121, 161, 169, and 201 layers in the networks. | 8.1 | 28.2 |
| DenseNet161 | 29.0 | 104.4 | ||
| DenseNet169 | 14.3 | 50.3 | ||
| DenseNet201 | 20.2 | 72.3 | ||
| DPN [ | DPN68 | Dual-path architecture; feature re-usage; new feature exploration; contains 68 layers. | 13.0 | 46.2 |
| EfficientNet [ | EfficientNet_b0 | Model scaling and balancing network depth, width, and resolution; neural architecture search; b0 to b7 correspond to input sizes of (256, 224), (256, 240), (288, 288), (320, 300), (384, 380), (489, 456), (561, 528), and (633, 600) pixels, respectively. | 5.3 | 16.9 |
| EfficientNet_b1 | 7.8 | 26.6 | ||
| EfficientNet_b2 | 9.1 | 31.3 | ||
| EfficientNet_b3 | 12.2 | 42.9 | ||
| EfficientNet_b4 | 19.3 | 69.5 | ||
| EfficientNet_b5 | 30.4 | 111.2 | ||
| EfficientNet_b6 | 43.0 | 159.0 | ||
| EfficientNet_b7 | 66.3 | 247.6 | ||
| Inception | GoogleNet | Increasing the depth and width of the network while keeping the computational budget constant. | 13.0 | 22.6 |
| InceptionV3 | Factorized convolutions and aggressive regularization. | 27.2 | 96.1 | |
| InceptionV4 | Combination of Inception architectures with residual connections. | 42.7 | 159.1 | |
| InceptionResNetV2 | 55.8 | 209.5 | ||
| Xception | Depth-wise separable convolutions; dubbed Xception. | 22.9 | 81.8 | |
| MnasNet [ | MnasNet_0.5 | Automated mobile neural architecture search approach, model latency, mobile phones, and factorized hierarchical search space; 0.5 and 1.0 indicate the network with depth multipliers of 0.5 and 1.0. | 2.2 | 5.1 |
| MnasNet_1.0 | 4.4 | 13.4 | ||
| MobileNet [ | MobileNetV2 | Inverted residual structure, lightweight depth-wise convolutions, and maintaining representational power. | 3.5 | 10.0 |
| MobileNetV3_Large | Hardware-aware network architecture search complemented by the NetAdapt algorithm. MobileNetV3-Large and MobileNetV3-Small target high- and low-resource use cases. | 2.5 | 17.6 | |
| MobileNetV3_Small | 5.5 | 7.0 | ||
| RegNet [ | RegNetY_400MF | Parametrizing populations of networks, elevated design space level, quantized linear function, and a wide range of flop regimes; RegNetX indicates the network with the X block (a standard residual bottleneck block), and RegNetY indicates the network with the X block and Squeeze-and-Excitation networks; 400MF, 800MF, 1.6GF, 3.2GF, 8.0GF, 16GF, and 32GF represent networks with flop regimes of 400 MB, 800 MB, 1.6 GB, 3.2 GB, 8.0 GB, 16 GB, and 32 GB, respectively. | 4.3 | 15.6 |
| RegNetY_800MF | 6.4 | 22.6 | ||
| RegNetY_1.6GF | 11.2 | 40.7 | ||
| RegNetY_3.2GF | 19.4 | 70.4 | ||
| RegNetY_8.0GF | 39.4 | 145.1 | ||
| RegNetY_16GF | 83.6 | 311.1 | ||
| RegNetY_32GF | 145.0 | 543.7 | ||
| RegNetX_400MF | 5.5 | 20.2 | ||
| RegNetX_800MF | 7.3 | 26.1 | ||
| RegNetX_1.6GF | 9.2 | 32.8 | ||
| RegNetX_3.2GF | 15.3 | 56.0 | ||
| RegNetX_8.0GF | 39.6 | 146.1 | ||
| RegNetX_16GF | 54.3 | 201.9 | ||
| RegNetX_32GF | 107.8 | 405 | ||
| ResNet [ | ResNet18 | Residual learning framework, shortcut connections, avoiding feature vanishing, and achieving decent accuracy in deeper neural networks; 18, 34, 50, 101, and 152 indicate networks with 18, 34, 50, 101, and 152 layers, respectively. | 11.7 | 43.2 |
| ResNet34 | 21.8 | 81.9 | ||
| ResNet50 | 25.6 | 92.1 | ||
| ResNet101 | 44.5 | 164.8 | ||
| ResNet152 | 60.2 | 224.8 | ||
| ResNeXt [ | ResNeXt50_32×4d | Highly modularized network architecture, aggregating a set of transformations with the same topology, and cardinality; 50 and 101 refer to networks with 50 and 101 layers, respectively; 32 refers to networks with 32 paths/cardinalities in the widthwise direction; 4d and 8d refer to networks with 4 and 8 stages/depths of residual blocks. | 25.0 | 90.1 |
| ResNeXt101_32×8d | 88.8 | 334 | ||
| ShuffleNet [ | ShuffleNetV2_×0.5 | Direct metric of computation complexity on the target platform, FLOPs; ×0.5 and ×1.0 refer to networks with 0.5× and 1.0× output channels, respectively. | 1.4 | 2.5 |
| ShuffleNetV2_×1.0 | 2.3 | 6.0 | ||
| SqueezeNet [ | SqueezeNet_1.0 | 50× fewer parameters, and <0.5 MB model sizes; SqueezeNet_1.0 is the original network, while SqueezeNet_1.1 has 2.4× less computation and slightly fewer parameters than the original version. | 1.2 | 3.4 |
| SqueezeNet_1.1 | 1.2 | 3.3 | ||
| VGG [ | VGG11 | Increasing depth using an architecture with very small (3 × 3) convolution filters; 11, 13, 16, and 19 indicate networks with 11, 13, 16, and 19 layers, respectively; BN represents networks with batch normalization. | 132.9 | 495.4 |
| VGG11_BN | 132.9 | 495.5 | ||
| VGG13 | 133.0 | 496.1 | ||
| VGG13_BN | 133.0 | 496.2 | ||
| VGG16 | 138.4 | 516.4 | ||
| VGG16_BN | 138.4 | 516.5 | ||
| VGG19 | 143.7 | 536.6 | ||
| VGG19_BN | 143.7 | 536.7 | ||
| Wide ResNet [ | Wide_ResNet50_2 | Decreasing depth and increasing width of residual networks, and bottleneck network; 50 and 101 refer to networks with 50 and 101 layers, respectively; 2 is used to differentiate the network from ResNet. | 68.9 | 257.4 |
| Wide_ResNet101_2 | 126.9 | 479.1 |
Note: GPU, graphical processing unit; DenseNet, densely connected network; DPN, dual-path network; EfficientNet, efficient network; MnasNet, mobile neural architecture search network; MobileNet, mobile network; RegNet, regular network; ResNet, residual network; ResNeXt, combination of residual network and next dimension; ShuffleNet, a highly efficient architecture with a novel channel shuffle operation; SqueezeNet, squeezed network; VGG very deep convolutional network developed by the Visual Geometry Group.
Model performance parameters (testing accuracy, processing speed, and comprehensive index (Equation (3))) of individual beef cattle classification. The outperformed models for each parameter were highlighted in bold fonts.
| Model | Accuracy (%) | Processing Speed (ms/Image) | CI | Model | Accuracy (%) | Processing Speed (ms/Image) | CI |
|---|---|---|---|---|---|---|---|
| AlexNet | 96.5 | 36.0 | 7.8 | RegNetY_32GF | 94.7 | 564.0 | 22.6 |
| DenseNet121 | 93.0 | 153.5 | 25.6 | RegNetX_400MF | 86.6 | 53.1 | 32.6 |
| DenseNet161 | 94.7 | 278.6 | 21.6 | RegNetX_800MF | 84.6 | 70.0 | 36.2 |
| DenseNet169 | 94.7 | 183.8 | 19.4 | RegNetX_1.6GF | 84.8 | 99.5 | 36.4 |
| DenseNet201 | 94.6 | 224.4 | 21.6 | RegNetX_3.2GF | 86.6 | 142.0 | 35.2 |
| DPN68 | 94.4 | 153.1 | 19.8 | RegNetX_8.0GF | 88.0 | 208.6 | 37.0 |
| EfficientNet_b0 | 49.4 | 122.4 | 48.2 | RegNetX_16GF | 89.8 | 360.4 | 37.4 |
| EfficientNet_b1 | 55.1 | 159.3 | 45.8 | RegNetX_32GF | 92.3 | 574.3 | 32.4 |
| EfficientNet_b2 | 54.7 | 171.3 | 46.8 | ResNet18 | 90.5 | 60.3 | 27.6 |
| EfficientNet_b3 | 60.0 | 221.3 | 44.6 | ResNet34 | 93.7 | 86.2 | 19.4 |
| EfficientNet_b4 | 51.2 | 283.1 | 52.2 | ResNet50 | 91.3 | 153.0 | 29.2 |
| EfficientNet_b5 | 51.0 | 425.6 | 54.2 | ResNet101 | 94.2 | 228.7 | 23.4 |
| EfficientNet_b6 | 47.3 | 468.2 | 56.0 | ResNet152 | 93.7 | 319.1 | 26.8 |
| EfficientNet_b7 | 54.1 | 678.2 | 53.4 | ResNeXt50_32×4d | 93.0 | 180.4 | 25.6 |
| GoogleNet | 59.4 | 78.3 | 40.8 | ResNeXt101_32×8d | 96.1 | 419.6 | 18.8 |
| InceptionV3 | 81.7 | 112.9 | 38.4 | ShuffleNetV2_×0.5 | 1.2 | 32.3 | 47.4 |
| InceptionV4 | 80.6 | 187.0 | 42.0 | ShuffleNetV2_×1.0 | 1.3 | 43.3 | 47.2 |
| InceptionResNetV2 | 66.9 | 244.7 | 44.8 | SqueezeNet_1.0 | 95.0 | 62.1 | 12.6 |
| Xception | 58.3 | 207.0 | 45.6 | SqueezeNet_1.1 | 95.9 | 45.3 | 9.8 |
| MnasNet_0.5 | 2.9 | 46.2 | 46.8 | VGG11 | 96.7 | 127.0 | 10.8 |
| MnasNet_1.0 | 57.6 | 66.1 | 41.6 | VGG11_BN | 98.1 | 141.0 | 6.2 |
| MobileNetV2 | 91.3 | 77.4 | 26.2 | VGG13 | 98.0 | 175.9 | 9.4 |
| MobileNetV3_Large | 95.9 | 60.2 | 11.4 | VGG13_BN | 97.7 | 196.0 | 11.0 |
| MobileNetV3_Small | 93.2 | 35.6 | 18.8 | VGG16 | 97.7 | 211.0 | 12.4 |
| RegNetY_400MF | 90.7 | 59.6 | 26.4 | VGG16_BN | 98.4 | 239.1 | 9.2 |
| RegNetY_800MF | 86.5 | 75.2 | 34.8 | VGG19 | 97.1 | 248.0 | 14.6 |
| RegNetY_1.6GF | 88.8 | 103.8 | 32.6 | VGG19_BN | 98.1 | 276.6 | 11.8 |
| RegNetY_3.2GF | 91.6 | 150.5 | 27.4 | Wide_ResNet50_2 | 89.6 | 243.7 | 36.6 |
| RegNetY_8.0GF | 92.1 | 269.8 | 30.8 | Wide_ResNet101_2 | 90.4 | 404.4 | 37.0 |
| RegNetY_16GF | 93.6 | 370.3 | 28.0 |
Note: CI, comprehensive index. Descriptions of the models are provided in Table 2.
Image counts and assigned weight in weighted cross-entropy loss function for each cattle.
| Cattle ID | Image Counts | Weight | Cattle ID | Image Counts | Weight | Cattle ID | Image Counts | Weight | Cattle ID | Image Counts | Weight |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0100 | 8 | 8.75 | 3812 | 12 | 5.83 | 4680 | 19 | 3.68 | 5143 | 9 | 7.78 |
| 0200 | 10 | 7.00 | 3814 | 13 | 5.38 | 4685 | 11 | 6.36 | 5153 | 5 | 14.00 |
| 0300 | 17 | 4.12 | 3819 | 19 | 3.68 | 4686 | 31 | 2.26 | 5164 | 32 | 2.19 |
| 0400 | 7 | 10.00 | 3832 | 42 | 1.67 | 4716 | 16 | 4.38 | 5165 | 10 | 7.00 |
| 0500 | 14 | 5.00 | 3842 | 14 | 5.00 | 4717 | 5 | 14.00 | 5170 | 40 | 1.75 |
| 0600 | 19 | 3.68 | 3844 | 15 | 4.67 | 4733 | 29 | 2.41 | 5171 | 20 | 3.50 |
| 0700 | 16 | 4.38 | 3847 | 21 | 3.33 | 4739 | 26 | 2.69 | 5197 | 14 | 5.00 |
| 0800 | 18 | 3.89 | 3852 | 29 | 2.41 | 4748 | 15 | 4.67 | 5207 | 18 | 3.89 |
| 0900 | 12 | 5.83 | 3856 | 16 | 4.38 | 4770 | 11 | 6.36 | 5208 | 4 | 17.50 |
| 1000 | 12 | 5.83 | 4208 | 18 | 3.89 | 4775 | 15 | 4.67 | 5215 | 48 | 1.46 |
| 1100 | 11 | 6.36 | 4259 | 6 | 11.67 | 4776 | 25 | 2.80 | 5224 | 28 | 2.50 |
| 1200 | 11 | 6.36 | 4323 | 19 | 3.68 | 4804 | 15 | 4.67 | 5234 | 8 | 8.75 |
| 1300 | 12 | 5.83 | 4326 | 10 | 7.00 | 4819 | 18 | 3.89 | 5235 | 24 | 2.92 |
| 1400 | 13 | 5.38 | 4330 | 28 | 2.50 | 4820 | 38 | 1.84 | 5249 | 24 | 2.92 |
| 1500 | 6 | 11.67 | 4339 | 20 | 3.50 | 4833 | 26 | 2.69 | 5273 | 18 | 3.89 |
| 1600 | 14 | 5.00 | 4347 | 19 | 3.68 | 4839 | 26 | 2.69 | 5275 | 14 | 5.00 |
| 1700 | 12 | 5.83 | 4363 | 21 | 3.33 | 4840 | 16 | 4.38 | 5282 | 6 | 11.67 |
| 1800 | 22 | 3.18 | 4369 | 16 | 4.38 | 4895 | 24 | 2.92 | 5283 | 14 | 5.00 |
| 1900 | 8 | 8.75 | 4381 | 24 | 2.92 | 4915 | 30 | 2.33 | 5297 | 32 | 2.19 |
| 2000 | 14 | 5.00 | 4385 | 23 | 3.04 | 4921 | 14 | 5.00 | 5298 | 25 | 2.80 |
| 2100 | 4 | 17.50 | 4399 | 7 | 10.00 | 4947 | 15 | 4.67 | 5307 | 10 | 7.00 |
| 2200 | 6 | 11.67 | 4421 | 32 | 2.19 | 4951 | 39 | 1.79 | 5314 | 13 | 5.38 |
| 2220 | 6 | 11.67 | 4422 | 22 | 3.18 | 4969 | 12 | 5.83 | 5325 | 36 | 1.94 |
| 2300 | 22 | 3.18 | 4451 | 7 | 10.00 | 4971 | 11 | 6.36 | 5355 | 4 | 17.50 |
| 2320 | 14 | 5.00 | 4454 | 26 | 2.69 | 4984 | 24 | 2.92 | 5359 | 10 | 7.00 |
| 2400 | 23 | 3.04 | 4456 | 29 | 2.41 | 4985 | 11 | 6.36 | 5360 | 35 | 2.00 |
| 2500 | 33 | 2.12 | 4479 | 25 | 2.80 | 4986 | 26 | 2.69 | 5362 | 18 | 3.89 |
| 2510 | 10 | 7.00 | 4488 | 11 | 6.36 | 4995 | 6 | 11.67 | 5373 | 27 | 2.59 |
| 2600 | 27 | 2.59 | 4499 | 29 | 2.41 | 5009 | 17 | 4.12 | 5374 | 27 | 2.59 |
| 2700 | 17 | 4.12 | 4537 | 12 | 5.83 | 5026 | 23 | 3.04 | 5403 | 26 | 2.69 |
| 2710 | 15 | 4.67 | 4539 | 18 | 3.89 | 5028 | 21 | 3.33 | 5404 | 22 | 3.18 |
| 2740 | 8 | 8.75 | 4545 | 29 | 2.41 | 5066 | 14 | 5.00 | 5407 | 40 | 1.75 |
| 2800 | 24 | 2.92 | 4549 | 4 | 17.50 | 5073 | 14 | 5.00 | 5408 | 18 | 3.89 |
| 2900 | 15 | 4.67 | 4551 | 28 | 2.50 | 5077 | 16 | 4.38 | 5410 | 20 | 3.50 |
| 2930 | 6 | 11.67 | 4568 | 23 | 3.04 | 5083 | 29 | 2.41 | 5411 | 31 | 2.26 |
| 3000 | 15 | 4.67 | 4607 | 34 | 2.06 | 5090 | 18 | 3.89 | 5425 | 26 | 2.69 |
| 3100 | 13 | 5.38 | 4613 | 70 | 1.00 | 5097 | 25 | 2.80 | 5427 | 13 | 5.38 |
| 3200 | 16 | 4.38 | 4614 | 25 | 2.80 | 5100 | 8 | 8.75 | 5432 | 19 | 3.68 |
| 3300 | 13 | 5.38 | 4649 | 34 | 2.06 | 5112 | 14 | 5.00 | 5477 | 9 | 7.78 |
| 3400 | 7 | 10.00 | 4668 | 21 | 3.33 | 5132 | 30 | 2.33 | 5507 | 25 | 2.80 |
| 3420 | 4 | 17.50 | 4678 | 19 | 3.68 | 5133 | 12 | 5.83 | 5508 | 25 | 2.80 |
| 3802 | 8 | 8.75 | 4679 | 16 | 4.38 | 5138 | 11 | 6.36 | 5509 | 22 | 3.18 |
| 5519 | 25 | 2.80 | 5781 | 27 | 2.59 | 6124 | 10 | 7.00 | 6295 | 10 | 7.00 |
| 5529 | 29 | 2.41 | 5784 | 16 | 4.38 | 6161 | 18 | 3.89 | 6313 | 34 | 2.06 |
| 5537 | 37 | 1.89 | 5803 | 15 | 4.67 | 6167 | 21 | 3.33 | 6331 | 32 | 2.19 |
| 5556 | 8 | 8.75 | 5804 | 26 | 2.69 | 6171 | 12 | 5.83 | 6333 | 54 | 1.30 |
| 5559 | 21 | 3.33 | 5806 | 14 | 5.00 | 6184 | 16 | 4.38 | 6442 | 13 | 5.38 |
| 5581 | 29 | 2.41 | 5809 | 24 | 2.92 | 6189 | 12 | 5.83 | 6446 | 8 | 8.75 |
| 5604 | 14 | 5.00 | 5815 | 14 | 5.00 | 6191 | 18 | 3.89 | 6458 | 10 | 7.00 |
| 5605 | 14 | 5.00 | 5816 | 9 | 7.78 | 6196 | 17 | 4.12 | 6479 | 15 | 4.67 |
| 5620 | 12 | 5.83 | 5836 | 22 | 3.18 | 6197 | 12 | 5.83 | 6499 | 9 | 7.78 |
| 5630 | 4 | 17.50 | 5844 | 30 | 2.33 | 6199 | 14 | 5.00 | 6505 | 14 | 5.00 |
| 5633 | 13 | 5.38 | 5886 | 25 | 2.80 | 6210 | 10 | 7.00 | 6506 | 18 | 3.89 |
| 5634 | 13 | 5.38 | 5925 | 4 | 17.50 | 6213 | 12 | 5.83 | 6530 | 10 | 7.00 |
| 5639 | 12 | 5.83 | 5932 | 38 | 1.84 | 6216 | 18 | 3.89 | 6606 | 12 | 5.83 |
| 5654 | 53 | 1.32 | 5953 | 30 | 2.33 | 6220 | 12 | 5.83 | 8050 | 4 | 17.50 |
| 5658 | 12 | 5.83 | 5971 | 45 | 1.56 | 6226 | 15 | 4.67 | 8094 | 10 | 7.00 |
| 5670 | 16 | 4.38 | 5986 | 5 | 14.00 | 6237 | 6 | 11.67 | 8095 | 8 | 8.75 |
| 5677 | 12 | 5.83 | 6011 | 32 | 2.19 | 6253 | 8 | 8.75 | 9021 | 10 | 7.00 |
| 5695 | 20 | 3.50 | 6012 | 19 | 3.68 | 6266 | 10 | 7.00 | 9029 | 29 | 2.41 |
| 5697 | 31 | 2.26 | 6017 | 12 | 5.83 | 6276 | 15 | 4.67 | 9634 | 31 | 2.26 |
| 5717 | 16 | 4.38 | 6022 | 8 | 8.75 | 6277 | 12 | 5.83 | 9635 | 8 | 8.75 |
| 5745 | 15 | 4.67 | 6038 | 22 | 3.18 | 6278 | 13 | 5.38 | 9736 | 18 | 3.89 |
| 5761 | 10 | 7.00 | 6066 | 50 | 1.40 | 6282 | 12 | 5.83 | 9742 | 19 | 3.68 |
| 5762 | 7 | 10.00 | 6071 | 26 | 2.69 | 6283 | 5 | 14.00 | 9773 | 10 | 7.00 |
| 5774 | 16 | 4.38 | 6084 | 36 | 1.94 | 6287 | 14 | 5.00 | 9798 | 42 | 1.67 |
| 5777 | 12 | 5.83 | 6098 | 20 | 3.50 | 6294 | 10 | 7.00 | 9801 | 10 | 7.00 |
Figure 4Validation accuracy of the 59 deep learning image classification models. Descriptions of the models are provided in Table 2.
Pearson correlation coefficient (R) matrix among model total parameter and size, accuracy, and processing speed.
| Accuracy | Processing Speed | |
|---|---|---|
| Total parameter | 0.389 | 0.517 |
| Model size | 0.391 | 0.521 |
Accuracy and processing speed for the 20 selected models before and after optimization for class imbalance. The outperformed models for each parameter were highlighted in bold fonts.
| Model | Cross Entropy | Weighted cross Entropy | Data Augmentation | Model Loading Time (ms) | |||
|---|---|---|---|---|---|---|---|
| Accuracy (%) | Processing Speed (ms/Image) | Accuracy (%) | Processing Speed (ms/Image) | Accuracy (%) | Processing Speed (ms/Image) | ||
| AlexNet | 96.5 | 36.0 | 95.8 | 36.3 | 95.7 | 29.7 | 95.7 |
| DenseNet161 | 93.0 | 153.5 | 97.3 | 286.2 | 98.3 | 139.1 | 133.0 |
| DenseNet169 | 94.7 | 278.6 | 97.6 | 176.1 | 97.9 | 90.2 | 807.2 |
| DenseNet201 | 94.7 | 183.8 | 97.1 | 221.5 | 98.2 | 110.5 | 963.3 |
| DPN68 | 94.6 | 224.4 | 97.8 | 151.8 | 98.6 | 80.5 | 1183.2 |
| MobileNetV3_Large | 94.4 | 153.1 | 97.4 | 61.6 | 95.2 | 39.8 | 261.2 |
| MobileNetV3_Small | 96.5 |
| 95.8 |
| 86.6 |
| 186.3 |
| RegNetY_32GF | 94.7 | 564.0 | 97.1 | 553.7 | 95.1 | 297.5 | 244.3 |
| ResNet34 | 93.7 | 86.2 | 97.0 | 88.3 | 97.6 | 54.7 | 767.4 |
| ResNeXt101_32×8d | 96.1 | 419.6 | 98.0 | 419.1 | 98.5 | 210.7 | 2539.9 |
| SqueezeNet_1.0 | 95.0 | 62.1 | 92.6 | 62.0 | 78.3 | 39.6 | 120.0 |
| SqueezeNet_1.1 | 95.9 | 45.3 | 94.1 | 44.7 | 93.9 | 32.4 | 127.7 |
| VGG11 | 96.7 | 127.0 | 96.5 | 128.2 | 97.2 | 77.8 | 3391.3 |
| VGG11_BN | 98.1 | 141.0 | 98.2 | 141.8 | 98.0 | 83.3 | 3237.8 |
| VGG13 | 98.0 | 175.9 | 95.6 | 176.2 | 98.2 | 99.3 | 3227.4 |
| VGG13_BN | 97.7 | 196.0 | 97.9 | 199.6 | 98.5 | 109.5 | 3279.0 |
| VGG16 | 97.7 | 211.0 | 96.9 | 213.4 | 97.4 | 117.9 | 3435.4 |
| VGG16_BN | 98.4 | 239.1 | 97.7 | 238.5 | 98.7 | 125.2 | 3414.0 |
| VGG19 | 97.1 | 248.0 | 95.7 | 249.5 | 97.8 | 137.3 | 3525.2 |
| VGG19_BN | 98.1 | 276.6 | 98.5 | 274.8 | 97.8 | 159.6 | 3554.4 |
| Average ± SD | 96.1 ± 1.6 | 192.9 ± 129.8 | 96.7 ± 1.5 | 188.0 ± 131.5 | 95.9 ± 5.0 | 103.2 ± 66.5 | 1724.7 ± 1494.2 |
Note: ‘Cross-entropy’ indicates models developed with the cross-entropy loss function and without any class imbalance optimization. Descriptions of the models are provided in Table 2.
Figure 5A ridgeline chart illustrating the probabilities of identification accuracy for individual cattle using (top) VGG16_BN without class imbalance optimization, (middle) VGG19_BN with weighted cross-entropy loss function, and (bottom) VGG16_BN with data augmentation.
Accuracy and processing speed before and after optimization for class imbalance.
| Development Strategy | Number of Cattle with 0% Identification Accuracy | Number of Cattle 100% Accurately Identified | Accuracy (%, Excluding 100% and 0%) |
|---|---|---|---|
| Cross-entropy | 4 | 248 | 96.2 ± 15.1 |
| Weighted cross-entropy | 4 | 254 | 97.5 ± 13.3 |
| Data augmentation | 3 | 255 | 97.7 ± 12.3 |
Note: The model used was VGG16_BN for cross-entropy and data augmentation and VGG19_BN for weighted cross-entropy.