# Accurate Needle Localization in the Image Frames of Ultrasound Videos
## 4 Discussion and Conclusions
Unlike most previous needle detection methods that were validated using phantom and _ex vivo_ analyses [10], the method proposed in the current study has been evaluated using both _ex vivo_ and _in vivo_ ultrasound video datasets. The angular, axis, and tip error values presented in Tables 1 and 2 demonstrate the capability of the proposed method to achieve accurate localization of the needle trajectory and tip in the image frames of the _ex vivo_ and _in vivo_ ultrasound videos. Furthermore, the proposed method obtained a failure rate of 0% for the image frames in all _ex vivo_ and _in vivo_ ultrasound videos. This implies that the axis errors computed for all image frames in each video are smaller than 3 mm, which demonstrates the capability of the proposed method to reliably detect the needle trajectory. The results provided in Tables 1 and 2 indicate that the angular, axis, and tip errors that are computed for the _in vivo_ ultrasound videos are slightly higher than the errors computed for the _ex vivo_ ultrasound videos. This can be attributed to several factors that increase the difficulty of detecting the needle _in vivo_ compared to _ex vivo_ imaging settings. For example, human anatomy is composed of different heterogeneous structures such as muscles, bones, fat, and blood vessels. In comparison, _ex vivo_ bovine muscle tissue has a relatively homogeneous structure. Moreover, _in vivo_ ultrasound imaging is conducted under loosely controlled conditions influenced by different physiological processes such as blood flow and tissue perfusion, which do not exist in _ex vivo_ ultrasound imaging settings. As a result, needle visibility in _in vivo_ ultrasound images is degraded by several artifacts, including acoustic shadowing, the bayonet artifact, acoustic attenuation, and tissue motion, which increase the difficulty of detecting the needle [46; 47]. In the current study, the LDA classifier is used to classify the features and generate the QUS image. Unlike other computationally intensive classifiers, such as support vector machines and neural networks, the LDA classifier enables fast predictions, as these predictions involve a linear combination of the features and do not require complex kernels [48]. These fast predictions allowed the proposed method to detect the needle at interactive rates. The run times presented in Tables 1 and 2 demonstrate the ability of the proposed method to localize the needle at interactive rates. The mean run time for the _ex vivo_ ultrasound videos is equal to 0.52 s, while the mean run time for the _in vivo_ ultrasound videos is equal to 0.43 s. This variation in mean run times is attributed to the difference between the size of the _ex vivo_ ultrasound image frames, which is equal to 400 \(\times\) 400 pixels, and the size of the _in vivo_ ultrasound image frames, which is equal to 470 \(\times\) 470 pixels. The run time of the proposed method can be reduced by implementing the method to run on parallel computing architectures, such as Graphics Processing Units. In fact, the three phases of the proposed method can be readily decomposed into parallel tasks that operate on non-overlapping regions in the ultrasound image, which facilitates the parallel implementation of the method. The performance of the proposed method can be enhanced in the future by incorporating deep learning models. In particular, Phase I of the proposed method, which is focused on generating the QUS image, can be improved by combining the speckle variations feature, the local phase feature, and the ultrasound image to generate an artificial RGB image. Using this representation, each one of these components is treated as a color channel of the artificial RGB image. The artificial RGB image can then be processed using a deep learning semantic segmentation model to classify the pixels of the ultrasound image as either needle pixels or background tissue pixels. The needle likelihoods of the pixels that are computed using the deep learning semantic segmentation model can be used to synthesize the QUS images.