Choosing the 1200 sets of images as training set from 200 folders, which represent 200 people. Other 360 sets of images as test set from 60 folders, which represent 60 people.
In image retrieval fields, there are significant differences between different categories, and the similarity of images in the same category is very high,in the most situation. But in this paper, there is a very high degree of similarity between different categories. So in order to distinguish from the general difficulty of image retrieval, the concept of difficulty coefficient is put forward here.
Difficulty coefficient = Total number of categories in the database(training sample)* The mean value of point-to-point pixel difference of images within the class was randomly selected / The average value of randomly selected point-to-point differences between pixels of same class images
After random selection,difficulty coefficient of our task is on the order of 200. However, for the classification of some landscape images, the value of difficulty coefficient is no more than one.So our task is a very difficult task to sort and retrieve. And a lot of the models from other papers do not fit in this situation. In addition,since it is a four-channel image, the traditional three-channel image model is not suitable for this kind of situation.
Residual network is a convolution neural network proposed by four scholars from Microsoft Research. In 2015, the ImageNet Large Scale Visual Recognition Challenge(ILSVRC) won the award for image classification and object recognition. The residual network is easy to optimize, and residual network can improve the accuracy by adding considerable depth, otherwise, the internal residuals block uses a shortcut that alleviates the gradient loss problem caused by adding depth in a deep neural network. These are the main characteristic of the residual network.
The last layer of resnet34 architecture[3] is a fully connected layer. After the fully connected, a one dimensional vector added. And the length of vector is 260. So using the one hot markup classification method[4], a model is trained according to the cross entropy classification method[5]. After this step of training model, another step is put forward. On the basis of the first training method to get a model, transfer learning is second training step. An adatriplet loss function is designed. Refer to the loss function, it is a combination of Adatriplet[6] loss and cross entropy loss with coefficient argument. Adatriplet is an adaptive gradient triplet loss,that is an combination of triplet loss[7] and .
![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfcAAABaCAYAAAClgB+jAAASQElEQVR4nO3dv3ayQJgG8Ic9eymQIifNbjlcgabJNrbpoNTm6yzt0kAp1aa1sglcgVyBJ0Vm9lpmC0D5K5BgRPL8zvGc74sIw8zICy8zaGitNYiIiGgy/uPWBSAiIqJhMbgTERFNDIM7ERHRxDC4ExERTcwfDe4Kvm3AMPIvF9Gti/WblELk2rBzdWDbLiKVvh+5pfoxYNg+1MWVEhHRGLQE97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wX24J1cmrjwVLsLXo6xMJylM9FdfOOYH+ZQ+7xoGjP0LtA7hDFYu0TB7KPtJ2+5Tk35HdVRz3TLXqashypYs1718Te1zS+nPH2c/2el4kFlfGfkzzquu0WZDFCuZQjbsSPgptRvdD3X6/YBL0xLzs62s1dOgs1SuGtyVv68MoTeXazjxCm/ZqM10dGewqY4ATX4JKRxgHnLzCOFzwZ6xyP+6TqeRpQMK5s1T5prKnDNcXfXUoWxAW/k6tM9vidzK06/u0g/7E/DbfarpF+A6mkq7/RW1DzZqfv3qsfjHIriGdfrVuXhlNc7EMR+ektkDwkE49CyVwXIABflUWM1D98tpsXxKXIj0344Oa1LllR8/cLzStkrP3K6so/TjCJV0Y3WA0HlbI8gVN6mtKyc3qKambm5evkvtM2Z/5N7t2PtUb3+k3Yi01obWWg95sjA6yodt7bCQFx6aQbfD9iEiGhwfP0tERDQxE79yj+Aa8+Q5z3AQ1vwqEt0S24eI6BomHtyJiIj+HqbliYiIJobBnYiIaGIY3ImIiCaGwZ2IiGhi/h9EaZtE8cMaCAAAAABJRU5ErkJggg==)
Where λ ∈ R + is a coefficient, ε ∈ [0,2) is a non-negtive strict margin, and β ∈ [0,1] is a relaxing margin. We illustrate the negative gradient field of AdaTriplet with
ε = 0.101,β = 0.001, λ = 1 , and = 0.001
Where φan is the vector distance between an anchor data and negtive data.
Where φap is the vector distance between an anchor data and positive data.
Where θ is a coefficient argument, it serves two purposes. One purpose is to add explanatory reason about classification due to the cross entropy loss. Another purpose is to avoid overfitting, to some extent,due to the loss function is interfered with in small amplitude by θ.
Following common practice, we normalized all feature vectors, and then multiplied by a alpha coefficient, that is called L2 norm[8]. The alpha coefficient is 10, due to an academic paper[9]. Fully connected layer is called FC[10] in short.
The overall structure of the model is shown in the figure as Fig. 1.
In this paper, we explored the method of secondary training, and took some measures to avoid overfitting in the training process, and also reduced the time cost of training. These measures contain a small coefficient argument in loss function, and also contain the method of selecting the triplet child data.
The triplet data contains three parts: anchor data, positive data, and negative data. Anchor data set contains 200 folders of data from training samples, and all folders from training data set should not be lost in anchor data set. Positive data and anchor data are from same folder in training data set, which represent the data from same person. As for negative data, is randomly selected from any group that is not in the same category of positive data. The positive sample data constitute the positive data set, and the negative sample data constitute the negative data set.
After the training,the corresponding feature vectors of three-element subdata of lumbar disc CT images are obtained. The schematic diagram of one group is shown in the figure.
It can be clearly seen that the feature vector[11] training of the two groups is basically the same, and is significantly different from the feature vector of the negative sample. It is shown in Fig. 2.
If all possible results that can be matched to build the triplet data set are adopted as the training samples, it will not only increase the training time,but also make the model overfit. On the contrary, another method to choose the training sample is just choosing no more than 30000 examples. Negative data should not be chosen in a way that all the other samples is selected.Just choosing about 6 negative examples for an anchor data. So, the advantages of the method is reducing the training time, and avoiding overfit.
In order to avoid the phenomenon of underfitting[12], a one-dimensional vector is adopted. The length of the vector is 128. Compared with a short vector, the vector has a better expansion space when learning the difference of features. And some controlled experiments have been done to illustrate this point.