Ultrasound imaging is safe, relatively affordable, and capable of real-time performance. This technology has been utilized for many real-time medical applications. Recently, ultrasound is used for visualizing and characterizing human tongue shape and motion in a real-time speech to study healthy or impaired speech production in applications such as visual second language training  or silent speech interfaces . However, it requires expertise for non-expert users to recognize tongue shape and motion in noisy and low-contrast ultrasound data. To address this problem and to have a quantitative analysis, tongue surface (dorsum) can be extracted, tracked, and visualized superimposed on the whole tongue region. Delineating the tongue surface from each frame is a cumbersome, subjective, and error-prone task. Moreover, the rapidity and complexity of tongue gestures have made it a challenging task, and manual segmentation is not a feasible solution for real-time applications.
Over the years, several image processing techniques, such as active contour models , have shown their capability for automatic tongue contour extraction. In many of those traditional methods, manual labelling, initialization, monitoring, and manipulation are frequently needed. Furthermore, those methods are computationally expensive whereas the image gradient should be calculated for each frame . In recent years, convolutional neural networks (CNN) have been the method of choice for medical image analysis with outstanding results . In a few studies, automatic tongue contour extraction  and tracking  using CNN have been already investigated. In spite of their excellent results on a specific dataset from one ultrasound device, the generalization of those methods on test data with different distributions from different ultrasound device is often not investigated and evaluated. Although ultrasound tongue datasets have different distributions, there is always a correlation between movements of the tongue and its possible positions in the mouth. Therefore, domain adaptation might provide a universal solution for automatic, real-time tongue contour extraction, applicable to the majority of ultrasound datasets.
In transfer learning 
, a marginal probability distribution, where defined on a feature space of can be used for expressing a domain . On a specific domain , comprises of pair of a label space and an objective function in a form of , the objective function can be optimized and learned the training data, which consists of pairs , where and in a supervised fashion using one CNN model. After termination of the optimization process, the trained CNN model denoted by can predict the label of a new instance . Transfer learning is defined as the procedure of enhancing the target prediction function in using the information in and , whereas a source domain with a learning task and a target domain with learning task are given and , or . Therefore, the prediction function first is trained on the source domain and then fine-tuned for the target domain . Conversely, is initially trained for the target task, and then it is domain-adapted on the source dataset.
Fully convolutional networks (FCNs) consist of consecutive convolutional and pooling layers (encoder), and one up-sampling layer (decoder) was successfully exploited for the semantic segmentation problem in a study by . Due to the loss of information in polling layers, only one layer of up-sampling cannot retrieve the input-sized resolution in the output prediction map. Concatenation of feature maps from deconvolutional layers (DeconvNet)  and encoder layers in U-net  improved significantly the segmentation accuracy. The encoder of U-net learns simple visual image features especially in the first few layers, while the decoder aims to reconstruct the input-sized output prediction map from the complicated, abstract, and task-dependent features of the last layer of the encoder. Although encoder-decoder models like U-net have been used for tongue contour extraction, still it is not obvious how much knowledge is preserved during the transfer learning process for domain adaptation.
In this study, the performance of the U-net in different scenarios was analyzed to answer some fundamental questions in domain adaptation. We investigated how many layers from the decoder part should be fine-tuned to achieve the best segmentation accuracy in both the source and target domain at the same time (we called that a balanced point). Furthermore, the efficacy of dataset size in target domain along with the skip operation and concatenation on the performance of the U-net were explored on the problem of ultrasound tongue contour extraction.
2 Materials and Method
Ultrasound video frames were randomly selected from recorded videos of a linear transducer connected to a Sonix Tablet ultrasound device at the University of Ottawa as well as videos from Seeing Speech project . Using informed undersampling method 
, we generated two 2050 image datasets with different distributions, dataset I (uOttawa) and dataset II (SeeingSpeech). In this method, an average intensity image is calculated over the entire dataset, then one score is assigned for each frame depends on its intensity distance to the average image. After sorting the data by ranking order, we selected 2000 frames with the highest rank (high variance) and 50 images with the lowest grade (low variation).
Ground truth labels corresponding to each data was annotated semi-automatically by two experts using our custom annotation software. Off-line augmentation comprises of natural transformations in ultrasound data (e.g., horizontal flipping, restricted rotation and zooming) was employed to create larger datasets (50K for each). We split each dataset into training, validation, and test sets using ratios.
2.2 Network Architecture and Training
Fully convolutional networks (FCNs) can be considered as dense classification networks (e.g., VGG-nets) with consecutive convolutional and pooling layers such that a fully convolutional layer substitutes the fully connected layer (e.g., softmax in the last layer). Similarly, DeconvNet is an FCN network with several deconvolutional layers in the up-sampling path. In U-net  which is a DeconvNet architecture, feature maps (coarse contextual information) skips from each down-sampling layer to concatenate with deconvolutional layers for increasing the accuracy of output segmentation. Structural details of U-net have been presented in Fig. 1.
The DeconvNet comprises of 9 double convolutional layers of
filters with Rectified Linear Unit (ReLU) activation function as non-linearity. Activations of all layers were normalized using batch normalization layers to speed up the convergence. In the downsampling path, there are four max-pooling layers for the sake of translation invariance and saving memory by decreasing learnable parameters. In contrast, in the up-sampling path, there are four deconvolutional layers which retrieve the original receptive filed and spatial resolution. Finally, the high-level reasoning is done by a fully convolutional layer at the end layer.
Network models were deployed using the publicly available TensorFlow framework on Keras API as the backend library. For initialization of network parameters, randomly distributed values have been selected. Adam optimization was chosen with a fixed momentum value of 0.9 for finding the optimum solution on a binary cross-entropy loss function. Each network model was trained using the mini-batch method employing one NVIDIA 1080 GPU unit which was installed on a Windows PC with Core i7, 4.2 GHz speed, and 32 GB of RAM. Our results from hyper-parameter tuning revealed that, besides network architecture size, learning rate has the most significant effect on the performance of each architecture in terms of accuracy. Testing fixed and scheduled decaying learning rate showed that the variable learning rate might provide better results, but it requires different initialization of decay factor and decay steps. Therefore, for the sake of a fair comparison, we only reported results using fixed learning rates. To alleviate the over-fitting problem, we regularized our networks by drop-out rate of 0.5. Networks were trained for a maximum of five epochs, each of which for 5000 iterations and mini-batch size of 10.
2.3 Domain Adaptation Scenarios
Models for were built from several scenarios with transferring the learned weights from when we froze the encoder and some parts of the decoder sections. Specifically, in scenario I, we transferred weights of the whole encoder as well as portions of the DeconvNet decoder as which was learned on the dataset I (), then we froze those sections up to the th deconvolutional layer and fine-tuned the remaining () deconvolutional layers using the Dataset II () (see the circled numbers in Fig 1). In scenario II, we investigated the opposite transferring case by switching source and target datasets to build model to see the effect of negative transferring. In similar scenarios, we repeated the same experiments by considering the impact of skip operator and concatenation in U-net to investigate the effect of transferring knowledge by injecting feature maps to the decoder from the encoder.
3 Experimental Results
To evaluate models, we investigated and compared different scenarios of tongue contour extraction as described in the previous section. In each situation, we first trained the whole DeconvNet and U-net on the source domains (named base models) and directly apply them on two source and target domains to see the weakness of each model in terms of generalization from one domain to another. From table 1, as it was anticipated, in both scenarios, base networks predicted better instances for their source domains than their target domains. The result of each scenario related to DeconvNet and U-net have been presented in table 1.
Results of the table reveal that on average fine-tuning the whole decoder section is the best for achieving the best accuracy in target domain while the negative transferring can be seen clearly in these cases. For instance, in the scenario I, in case of U-net base model, it achieved a Dice coefficient of 0.6884 for the source domain and 0.4664 for the target domain. At the same time, when the whole decoder fine-tuned a better Dice coefficient of 0.6306 was achieved in the target domain and 0.5818 in the source domain. As it can be seen, by freezing more layer in the decoder section (conv7, conv8, and conv9) the difference between the Dice coefficient values in source and target domains significantly increases. For the case of DeconvNet, this is not true and the difference decrease in higher layers. Table 1 also indicate considerable result improvement in the scenario I for the U-net compare to the DeconvNet due to the concatenation and skip operation.
|DecNet||Transferred up to||U-net||Transferred up to|
|Base||Encod||conv 7||conv 8||conv 9||Base||Encod||conv 7||conv 8||conv 9|
|DecNet||Transferred up to||U-net||Transferred up to|
|Base||Encod||conv 7||conv 8||conv 9||Base||Encod||conv 7||conv 8||conv 9|
To identify the sufficient size of the target dataset for transfer learning, in separate experiments, we turned two transferred U-net models (encoder and conv 9) on three datasets with sizes of 100, 1000, and 10000. We used the same network architecture and training procedure among the different experiments. Figure 2 shows the difference values between dice coefficients and cross-entropy losses in source and target domains for scenario I. It can be seen that more data samples enhance the performance of each model in terms of accuracy.
Fig 3 illustrates the qualitative results of the scenario I for U-net model applied on a test instance. The U-net (base model) was trained on the set of images from the source domain (), achieved a Dice coefficient of 0.65 and Binary cross-entropy loss of 0.28 while for the same model, the value of Dice score and loss for the target domain was 0.50 and 0.49 without fine-tuning. It means that although the result of the target domain is not significant, U-net base model can still predict instances in both source and target domains. Nevertheless, in case of real-time testing when some frames contain rapid tongue movement along with noisy dorsum region with artifacts (see Fig. 3.c), the model fails in prediction for the target domain.
Our experimental results revealed that fine-tuning of the whole decoder of the U-net alleviates this problem significantly. For instance, dice score and loss values approximately become 0.58 and 0.34 for both source and target domains when the whole decoder fine-tuned on the target domain. In general, we observed a balance point for the number of refined layers considering both source and target domains. On the balance point, the model can achieve similar acceptable results in both source, and target domains whereas the segmentation accuracy is worse than the model’s performance on only one domain (see Fig. 3.d).
4 Discussion and Conclusions
In transfer learning literature, researchers usually focus on finding which demonstrates a decent performance on a source domain . Then they try domain adaptation from source to target task to find . However, a reliable and universal method is the one which can provide acceptable results in the opposite path from target to source domain as well. Our experimental results showed that there is a balance point for U-net model where it can provide reasonable predictions on both the source and the target domain (). For instance, transferring the whole decoder of U-net on the target domain, it provided Binary cross-entropy loss values of 0.3034 and 0.3129 for source and target test data.
Furthermore, qualitative study shows that domain adaptation can improve segmentation result for frames with significant noise and artifacts. Impact of using skip operator and concatenation and increasing dataset size in target domain indicate a slight improvement in final results. In contrast with other research fields with large datasets, the size of a usual ultrasound tongue dataset is not more than frames, and it makes more sense to fine-tune one model on several datasets to find the knowledge balance point as a universal model for use in real-time applications on various ultrasound devices. Using smaller learning rates in the target domains might increase the accuracy of the source and target domain segmentation further on the balance point.
-  Berry, J., Fasel, I., Fadiga, L., Archangeli, D.: Training deep nets with imbalanced and unlabeled data. In: Thirteenth Annual Conference of the International Speech Communication Association (2012)
-  Csapó, T.G., Grósz, T., Gosztolya, G., Tóth, L., Markó, A.: Dnn-based ultrasound-to-speech conversion for a silent speech interface (2017)
-  Ghafoorian, M., Mehrtash, A., Kapur, T., Karssemeijer, N., Marchiori, E., Pesteie, M., Guttmann, C.R., de Leeuw, F.E., Tempany, C.M., van Ginneken, B., et al.: Transfer learning for domain adaptation in mri: Application in brain lesion segmentation. In: International Conference on Medical Image Computing and Computer-Assisted Intervention. pp. 516–524. Springer (2017)
-  Gick, B., Bernhardt, B., Bacsfalvi, P., Wilson, I., Zampini, M.: Ultrasound imaging applications in second language acquisition. Phonology and second language acquisition 36, 315–328 (2008)
-  Laporte, C., Ménard, L.: Multi-hypothesis tracking of the tongue surface in ultrasound video recordings of normal and impaired speech. Medical image analysis 44, 98–114 (2018)
-  Lawson, E., Stuart-Smith, J., Scobbie, J.M., Nakai, S., Beavan, D., Edmonds, F., Edmonds, I., Turk, A., Timmins, C., Beck, J.M., et al.: Seeing speech: an articulatory web resource for the study of phonetics [website] (2015)
-  Li, M., Kambhamettu, C., Stone, M.: Automatic contour tracking in ultrasound images. Clinical linguistics & phonetics 19(6-7), 545–554 (2005)
-  Litjens, G., Kooi, T., Bejnordi, B.E., Setio, A.A.A., Ciompi, F., Ghafoorian, M., Van Der Laak, J.A., Van Ginneken, B., Sánchez, C.I.: A survey on deep learning in medical image analysis. Medical image analysis 42, 60–88 (2017)
-  Mozaffari, M.H., Guan, S., Wen, S., Wang, N., Lee, W.S.: Guided learning of pronunciation by visualizing tongue articulation in ultrasound image sequences. In: 2018 IEEE International Conference on Computational Intelligence and Virtual Environments for Measurement Systems and Applications (CIVEMSA). pp. 1–5. IEEE (2018)
-  Noh, H., Hong, S., Han, B.: Learning deconvolution network for semantic segmentation. In: Proceedings of the IEEE international conference on computer vision. pp. 1520–1528 (2015)
-  Pan, S.J., Yang, Q.: A survey on transfer learning. IEEE Transactions on knowledge and data engineering 22(10), 1345–1359 (2010)
-  Ronneberger, O., Fischer, P., Brox, T.: U-net: Convolutional networks for biomedical image segmentation. In: International Conference on Medical image computing and computer-assisted intervention. pp. 234–241. Springer (2015)
-  Zhu, J., Styler, W., Calloway, I.C.: Automatic tongue contour extraction in ultrasound images with convolutional neural networks. The Journal of the Acoustical Society of America 143(3), 1966–1966 (2018)