Aircraft Skin Damage Visual Testing System Using Lightweight Devices with YOLO: An Automated Real-Time Material Evaluation System
Abstract
:1. Introduction
2. Materials and Methods
2.1. Algorithm Training
- data_path: Specifies the path to the dataset configuration file. This file, typically in YAML format, contains information about the training, validation and testing datasets, as well as the class names and other parameters [14].
- n_epochs: Sets the number of epochs for training. An epoch is one complete pass through the entire training dataset. The number of epochs determines how many times the model will iterate over the dataset during training [1].
- batch_size: Defines the batch size, which is the number of training samples used in one iteration. Batch size impacts the model’s training speed, memory usage and convergence behavior [15].
- patience: Sets the patience parameter for early stopping. This parameter controls how many epochs with no improvement in validation performance will be tolerated before stopping the training early [1].
- optimizer: Specifies the optimizer to be used for training. The optimizer adjusts the model’s parameters based on the computed gradients to minimize the loss function. Common optimizers include “SGD”, “Adam” and “NAdam” [16].
- lr0: Sets the initial learning rate for the optimizer. The learning rate controls the size of the steps the optimizer takes when adjusting the model’s parameters [17].
- momentum: Sets the momentum parameter, which is used to accelerate the optimizer in the relevant direction and dampen oscillations. This parameter is particularly useful for optimizers like SGD and NAdam [18].
- weight_decay: Specifies the weight decay (also known as L2 regularization) parameter, which helps prevent overfitting by adding a penalty to large weights [19].
- device = 0: Specifies the device to be used for training. device = 0 refers to the primary GPU of the computer. This allows users to specify which GPUs to use when there are multiple GPUs available. Setting device = −1 would use the CPU instead of a GPU [20].
- Scheduler: A component used to control the learning rate during model training. A scheduler reduces the learning rate as the training progresses, helping the model make finer updates.
- it represents the number of iterations;
- bs is the batch size;
- e is the number of epochs;
- N is the total number of training samples.
- Pt is the predicted probability for the true class;
- αt is a scaling factor;
- r is the focusing parameter.
- Precision (P): The ratio of correctly predicted positive observations to the total predicted positives. It measures the accuracy of the positive predictions made by the model. High precision indicates a low false positive rate.
- Recall (R): The ratio of correctly predicted positive observations to all observations in the actual class. It measures the model’s ability to detect all relevant instances. High recall indicates a low false negative rate.
- Average Precision (AP): The area under the precision–recall curve for a single class.
- mAP: The mean of the average precision values for all classes.
2.2. Mobile Devices’ Application Development (iOS)
2.3. RTMP Server Construction
rtmp { server { listen 1935; chunk_size 4096; allow publish 127.0.0.1; # IP address of the device(s) deny publish all; application live { live on; }}} |
- Access your router’s web interface;
- Navigate to the port forwarding section;
- Create a new port forwarding rule:
- –
- Service Name: RTMP Server
- –
- Protocol: TCP
- –
- External Port: 1935
- –
- Internal IP Address: (IP address of your Raspberry Pi)
- –
- Internal Port: 1935;
- Save the settings.
2.4. UAV Detection Process
3. Results
3.1. Training Results
3.2. Real-Time Detection
3.3. RTMP Server Latency
4. Discussion
4.1. Application Performance
4.2. Reliability during Continuous Operation
4.3. Possible Alternative Approach
4.4. False Results
5. Conclusions
Author Contributions
Funding
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
UAV | Unmanned Aerial Vehicle |
CNN | Convolutional Neural Network |
YOLO | You Only Look Once |
RTMP | Real-Time Messaging Protocol |
IoT | Internet of Things |
mAP | Mean Average Precision |
CUDA | Compute Unified Device Architecture |
CUDNN | CUDA Deep Neural Network |
OS | Operating System |
SGD | Stochastic Gradient Descent |
NAdam | Nesterov-Accelerated Adaptive Moment Estimation |
DFL | Distribution Focal Loss |
IoU | Intersection Over Union |
YAML | YAML Ain’t Markup Language |
References
- LeCun, Y.; Bengio, Y.; Hinton, G. Deep Learning: Advances and Perspectives. Nat. Rev. Phys. 2023, 5, 436–444. [Google Scholar]
- Bochkovskiy, A.; Wang, C.-Y.; Liao, H.-Y. YOLOv4: Optimal Speed and Accuracy of Object Detection. arXiv 2022, arXiv:2004.10934. [Google Scholar]
- Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.; Berg, A.C. SSD: Single Shot MultiBox Detector. In Proceedings of the 14th European Conference, Amsterdam, The Netherlands, 11–14 October 2016; pp. 21–37. [Google Scholar] [CrossRef]
- Ren, S.; He, K.; Girshick, R.; Sun, J. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. IEEE Trans. Pattern Anal. Mach. Intell. 2017, 39, 1137–1149. [Google Scholar] [PubMed]
- Rodriguez-Gallo, Y.; Escobar-Benitez, B.; Rodriguez-Lainez, J. Robust Coffee Rust detection using UAV-based aerial RGB imagery. AgriEngineering 2023, 5, 1415–1431. [Google Scholar] [CrossRef]
- Wang, X.; Gao, H.; Jia, Z.; Li, Z. BL-YOLOv8: An Impro ved Road Defect Detection Model Based on YOLOv8. Sensors 2023, 23, 8361. [Google Scholar] [CrossRef] [PubMed]
- Arutyunyan, R. GitHub—Arut/Nginx-Rtmp-Module: NGINX-Based Media Streaming Server. Available online: https://github.com/arut/nginx-rtmp-module (accessed on 25 June 2024).
- Apple Inc. iPhone 13—Technical Specifications. Available online: https://support.apple.com/en-us/111872 (accessed on 15 September 2024).
- DJI Enterprise. Support for Mavic 2 Enterprise. Available online: https://www.dji.com/support/product/mavic-2-enterprise (accessed on 15 September 2024).
- Roboflow. What’s New in YOLOv8. 2023. Available online: https://blog.roboflow.com/whats-new-in-yolov8/ (accessed on 25 June 2024).
- Microsoft. Visual Studio Code, Version 1.80. 2024. Available online: https://code.visualstudio.com/ (accessed on 16 June 2024).
- Van Rossum, G.; The Python Development Team. The Python Language Reference Release 3.12.6. Python Software Foundation. 2024. Available online: https://docs.python.org/3/ (accessed on 25 June 2024).
- Jocher, G.; Burhan, Q.; Laughing, Q. YOLOV9. YOLOv9—Ultralytics YOLOv8 Docs. 2024. Available online: https://docs.ultralytics.com/models/yolov8/#can-i-benchmark-yolov8-models-for-performance (accessed on 25 June 2024).
- Evans, C.; döt Net, I.; Ben-Kiki, O. YAML Ain’t Markup Language (YAML). 2023. Available online: https://yaml.org/ (accessed on 25 June 2024).
- Kaplan, J.; McCandlish, S.; Henighan, T.; Brown, T.B.; Chess, B.; Child, R.; Gray, S.; Radford, A.; Wu, J.; Amodei, D. Scaling Laws for Neural Language Models. arXiv 2023, arXiv:2108.04510. [Google Scholar]
- Géron, A. Hands-on Machine Learning with Scikit-Learn, Keras, and TensorFlow, 2nd ed.; O’Reilly Media: Sebastopol, CA, USA, 2022. [Google Scholar]
- Kluska, P.S.; Castelló, A.; Scheidegger, F.; Malossi, C.; Quintana-Ortí, E.S. QAttn: Efficient GPU Kernels for Mixed-precision Vision Transformers. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops 2024, Seattle, WA, USA, 17–21 June 2024; pp. 3648–3657. [Google Scholar]
- Goyal, P.; Dollár, P.; Girshick, R.; Noordhuis, P.; Wesolowski, L.; Kyrola, A.; Tulloch, A.; Jia, Y.; He, K. Accurate, Large Minibatch SGD: Training ImageNet in 1 Hour. arXiv 2022, arXiv:1706.02677. [Google Scholar]
- Loshchilov, I.; Hutter, F. Decoupled Weight Decay Regularization. arXiv 2023, arXiv:1711.05101. [Google Scholar]
- Gohil, P. PyTorch Recipes: A Problem-Solution Approach; Packt Publishing: Birmingham, UK, 2023. [Google Scholar]
- Ultralytics. YOLOv5 Data YAML File. 2023. Available online: https://docs.ultralytics.com/yolov5/tutorials/train_custom_data/ (accessed on 25 June 2024).
- Bengio, Y. A View of Deep Learning’s Impact on Society. Commun. ACM 2022, 65, 58–63. [Google Scholar]
- Tong, C.; Yang, X.; Huang, Q.; Qian, F. NGIoU Loss: Generalized Intersection over Union Loss Based on a New Bounding Box Regression. Appl. Sci. 2022, 12, 12785. [Google Scholar] [CrossRef]
- Zhang, Y.; Ren, W.; Zhang, Z.; Jia, Z.; Wang, L.; Tan, T. Focal and efficient IOU loss for accurate bounding box regression. Neurocomputing 2022, 506, 146–157. [Google Scholar] [CrossRef]
- Wang, X.; Cheng, P.; Liu, X.; Uzochukwu, B. Focal loss dense detector for vehicle surveillance. In Proceeding of the 2018 International Conference on Intelligent Systems and Computer Vision (ISCV), Fez, Morocco, 2–4 April 2018; pp. 1–5. [Google Scholar] [CrossRef]
- Kaur, R.; Singh, S. A comprehensive review of object detection with deep learning. Digit. Signal Process. 2023, 132, 103812. [Google Scholar] [CrossRef]
- Ultralytics. YOLOv8 Models Performance Metrics. 2023. Available online: https://docs.ultralytics.com/guides/yolo-performance-metrics/ (accessed on 25 June 2024).
- Majima, D. Yolov8 RealTime iOS. 2023. Available online: https://github.com/john-rocky/CoreML-Models (accessed on 26 June 2024).
- Canonical Ltd. Ubuntu 20.04.6 LTS, Desktop-amd64 ISO; Canonical Ltd.: London, UK, 2023; Available online: https://ubuntu.com/download/desktop (accessed on 16 June 2024).
- Nurrohman, A.; Abdurohman, M. High Performance Streaming Based on H264 and Real Time Messaging Protocol (RTMP). In Proceedings of the 2018 6th International Conference on Information and Communication Technology (ICoICT), Bandung, Indonesia, 3–5 May 2018; pp. 174–177. [Google Scholar] [CrossRef]
Specification | iPhone 13 | DJI Mavic 2 Enterprise |
---|---|---|
Aperture | f/1.6 (26 mm equivalent) | f/2.8 |
Sensor Type | CMOS (size not stated) | 1/2.3” CMOS |
Megapixels | 12 MP | 12 MP |
ISO Range | 32–6400 | 100–3200 |
Sensor Size | 1/2.55″ | 1/2.3″ |
Pixel Size | 1.7 µm | - |
Resolution | 4032 × 3024 | 4056 × 3040 pixels |
Autofocus System | Dual-Pixel AF | - |
Operating Temperature | 0 °C–35 °C | 0 °C–40 °C |
Model | mAPval 50-95 | Params (M) | FLOPs (B) |
---|---|---|---|
YOLOv8n | 37.3 | 3.2 | 8.7 |
YOLOv8s | 44.9 | 11.2 | 28.6 |
YOLOv8m | 50.2 | 25.9 | 78.9 |
YOLOv8l | 52.9 | 43.7 | 165.2 |
YOLOv8x | 53.9 | 68.2 | 257.8 |
Model | Box Loss | Cls Loss | DFL Loss | Precision | Recall | [email protected] | FLOPs |
---|---|---|---|---|---|---|---|
YOLOv8n | 0.84133 | 0.91269 | 0.91250 | 0.81544 | 0.69233 | 0.75237 | 8.7 |
YOLOv8s | 0.86231 | 0.88650 | 0.94302 | 0.84054 | 0.71552 | 0.78704 | 28.6 |
YOLOv8m | 0.84635 | 0.85201 | 0.91688 | 0.86422 | 0.68707 | 0.78972 | 78.9 |
YOLOv9c | 0.85100 | 0.79952 | 0.92565 | 0.86394 | 0.71658 | 0.79225 | 102.8 |
Model | Box Loss | Cls Loss | DFL Loss | Precision | Recall | [email protected] | FLOPs |
---|---|---|---|---|---|---|---|
YOLOv9c | 0.32843 | 0.39135 | 1.0018 | 0.888 | 0.787 | 0.853 | 102.8 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Liao, K.-C.; Lau, J.; Hidayat, M. Aircraft Skin Damage Visual Testing System Using Lightweight Devices with YOLO: An Automated Real-Time Material Evaluation System. AI 2024, 5, 1793-1815. https://doi.org/10.3390/ai5040089
Liao K-C, Lau J, Hidayat M. Aircraft Skin Damage Visual Testing System Using Lightweight Devices with YOLO: An Automated Real-Time Material Evaluation System. AI. 2024; 5(4):1793-1815. https://doi.org/10.3390/ai5040089
Chicago/Turabian StyleLiao, Kuo-Chien, Jirayu Lau, and Muhamad Hidayat. 2024. "Aircraft Skin Damage Visual Testing System Using Lightweight Devices with YOLO: An Automated Real-Time Material Evaluation System" AI 5, no. 4: 1793-1815. https://doi.org/10.3390/ai5040089
APA StyleLiao, K. -C., Lau, J., & Hidayat, M. (2024). Aircraft Skin Damage Visual Testing System Using Lightweight Devices with YOLO: An Automated Real-Time Material Evaluation System. AI, 5(4), 1793-1815. https://doi.org/10.3390/ai5040089