# Deep Learning-Based Algorithms for Real-Time Lung Ultrasound Assisted Diagnosis
## 1 Introduction
In [10], the authors propose a Vision Transformer (ViT) based architecture able to classify melanoma versus non-cancerous lesions, which was tested on public skin cancer data with good results. In the X-Ray field, several machine learning (ML) approaches are proposed in [11] to distinguish between benign and malign tumors in mammography images, where the best results were obtained with a Naive Bayes algorithm. In [12], a review is provided of ML methods for lung cancer detection and classification with different imaging modalities (X-rays, computer tomography, and magnetic resonance), reporting a sensitivity between 0.81 and 0.99, a specificity between 0.46 and 1.00, and an accuracy from 77.8% to 100%, which reveals the potential of these techniques. Several authors propose the application of AI-based algorithms with ultrasound lung images to address the challenges related to artifacts identification and quantification. There are usually two different approaches to this problem: processing a whole ultrasound video  
Figure 1: Typical LUS artifacts: Pleura (blue), A-lines (green), B-lines (orange), Consolidation (red). and classifying it according to the disease severity, or processing the video frame-by-frame, highlighting the artifacts that are found by labeling the image. The first approach means a classification problem, where the input is a buffer of images, and the output is a severity score. The second one is a segmentation problem, where visual feedback is given to the clinician about the type, position, and extent of the imaging artifact. Segmentation means to detect and isolate a region of interest inside an image, in this case, the A-Line, B-Line and consolidation artifacts, usually highlighting them with a color overlay on the conventional gray-scale image. This feedback would be useful for evaluating the image, but also improves the interpretability of the model, as the physician can confirm that the deep learning model is paying attention to the correct zone of the image. In this work, we propose to combine both approaches, providing frame-by-frame real-time identification and enhancement of artifacts, along with a score of the whole video based on the artifacts found. In [13], the authors propose a deep learning solution capable of assigning a severity score to a lung ultrasound video. They pose the problem as a classification problem where the network learns to assign a score based on the artifacts found in the input to the network. In [14], the authors design an algorithm to extract several images that serve as a summary of the ultrasound examination from a lung ultrasound video. These images are subsequently introduced to a neural classification network to assign a score. The network goes on to evaluate the classification problem on an image-by-image basis. In [15], the authors combine CNN with Long Short-Term Memory (LSTM) networks to extract special and temporal features to classify between healthy and non-healthy at video level. If we talk about image-by-image processing, in [16], the authors propose a deep learning model for B-line detection trained on images from Dengue patients as a classification problem. In [17], different solutions for B-line detection and localization are proposed: as a video-level and frame-level classification problem and as a frame-level segmentation problem. The authors conclude that frame-by-frame segmentation has an advantage over the other solutions because it results in less variability in image interpretability by different physicians. Other works, such as [18], focus on the detection of B lines by visualizing the activation map on the output of a binary classifier convolutional network. Here they contemplate the possibility of using such solutions in real time. The above-mentioned works focus on the detection of a single artifact, the B line, which means that other solutions are needed for the other artifacts typical of pneumonia and lung ultrasound.