## 3 The Proposed Model
### Feature Extraction Using RetinaNet Model  
Transfer learning model is applied to enhance the efficiency of the DL model by the use of labeled data. It learns and employs many source processes for enhancing the learning process in relevant domains. It encompasses pre-training approaches which is trained on large scale dataset and is retrained at varying levels of the model on a small training set. The preliminary layer of the pre-training network can be modified upon requirement. The final layer of the model's hyperparameters can be tuned for learning the abilities on new datasets. In this work, the RetinaNet based TL model is applied for deriving feature vectors. An input map was inspired by the individual layer still accomplishing the resulting map. The CNN is designed in an order of layers. Consider \(\in R^{H^{\prime}\times w^{\prime}\times c^{\prime}}((h)\text{: height, }w\text{: width, }c\text{:}\) channel) are RGB images. Each layer gets \(X\) and the set of variables \(W\) as input as well as output images \(y\in R^{H^{\prime}\times w^{\prime}\times c^{\prime}}\), for example, \(y=f(X,\ W)\). This makes an activation map to demonstrate the reaction of that filter at each spatial region. For calculating the input \(X\) with set of filters \(W\in R^{\overline{h}\overline{h}\times\overline{h}\times\overline{h}\times c ^{\prime}}\) and add a bias \(b\in R^{c^{\prime}}\) as follows.  
\[y_{i^{\prime}j^{\prime}k^{\prime}}=f\left(b_{k^{\prime}}+\sum_{i=1}^{ \overline{h}}\sum_{j=1}^{\overline{h}}\sum_{d=1}^{c}W_{ijdk}\times X_{i^{ \prime}+i,j^{\prime}+j,d^{\prime}}\right). \tag{1}\]  
Next, the max-pooling layer is employed to decrease the computation and parameter with the decreased size of imputing shapes. It evaluates the maximum response of every image channel from \(\overline{h}\times W\) sub-windows that implement as sub-sampling function. It can be expressed in the following:  
\[y_{i^{\prime}j^{\prime}k^{\prime}=\max\limits_{1<i<\overline{h}}1<i\overline{ h}}X_{i^{\prime}+i\overline{j^{\prime}}+j,k}. \tag{2}\]  
Finally, fully connected (FC) layer is a set of layers that integrate the data extracted by previous layer (feature). This layer gets an input \(X\), processes them, and the last FC layer generates one dimensional vector of size. RetinaNet mainly consists of [20] two fully convolution network (FCNs), ResNet, and feature pyramid network (FPN). The ResNet employs network layer. The widely employed types of network layers are 50_, 101_ and 152_layers. The 101_layer with optimal trained efficacy is chosen. It could eliminate the structure of echocardiography with ResNet and, after, keep them to following sub-network. An FPN is an approach for efficiently eliminating the feature of each dimension from image with a conventional CNN architecture.  
Focal loss: it can be improved version of the binary cross entropy (\(CE\)), the loss expression is given below:  
\[CE\ (p,\ y)=\begin{cases}-\log(p)&if\ y=1\\ -\log(l-p)&otherwise,\end{cases} \tag{3}\]  
In Equation (3), \(y\in[-1,+1]\) indicates the ground truth type and \(p\in[0,\ 1]\) represents the prediction probability to type \(y=1\).  
\[p_{t}=\begin{cases}p,&if\ y=l\\ l-p,&otherwise\end{cases} \tag{4}\]  
The preceding formula can be abbreviated as follows:  
\[CE\ (p,\ y)=CE(p_{t})=-\ \log\ (p_{t}) \tag{5}\]  
In order to resolve the problem of data imbalance among the negative and positive samples, the new process is changed into the succeeding process:  
\[CE(p_{t})=-\alpha_{t}\log\ (p_{t}). \tag{6}\]Among them,  
\[\alpha_{t}=\begin{cases}\alpha,&\text{if }y=1,\\ l-\alpha&\text{otherwise},\end{cases} \tag{7}\]  
Here, \(\alpha\in[0,\ 1]\) represents the weight factor. In order to resolve the problem, the concentrating variable \(C\) was determined to obtain the final process of focal loss:  
\[FL(p_{t})=-\alpha_{t}(1-p_{t})^{\gamma}\text{ log }(p_{t}). \tag{8}\]