## 2 Related Work
### Organ Segmentation
The model is trained end-to-end using a fully convolutional network (FCN) architecture, which is based on the VGG-16 model. It achieved high accuracy for both heart detection and segmentation. [PERSON], [PERSON] et al. also propose a two-stage deep-learning algorithm for detecting and segmenting the heart in chest X-ray images [44]. In the first stage, the authorsuse a Faster region-based Convolutional Neural Network (R-CNN) to detect the heart. In the second stage, a convolutional encoder-decoder network is used for the segmentation task. It creates a new dataset of 2692 chest X-ray images and compares the results with other state-of-the-art algorithms. They report high accuracy for both detection and segmentation tasks. Segmentation of multi-organs  
Y.-T. [PERSON] et al. use the U-Net model and the enhanced training set for multi-organ segmentation in chest X-ray images [45]. The model was trained on the input image size of 128 \(\times\) 128 and validated using a dataset of 200 patients in the test. In this algorithm, data amplification methods are used, including random rotation, horizontal flip, vertical flip, etc., to increase the diversity of the training set. The final results show that the algorithm has a good prediction accuracy on multiple organs. Deep-learning methods are used for multi-organ segmenting. [PERSON] et al. use a cascading structure containing multiple U-Net networks in cardiac CT scans, each of which is used for multi-organ specific structure segmentation, and finally the result is cascaded together to obtain a complete structure segmentation [46]. The algorithm uses a large amount of data for training and uses techniques such as data amplification to increase the diversity of the training set. The final results show that the algorithm performs well in cardiac structure segmentation and measurement, including left ventricular myocardium, right ventricular myocardium, pericardium, atria, and ventricles. [PERSON] et al only use limited training data to detect multiple organs in chest X-rays with a deep-learning methods [47]. The method based on the convolutional neural network is used in the algorithm, and data amplification and transfer learning are carried out to improve the performance and effect of the model. The results of the algorithm show that convolutional neural networks have better performance and effect in the case of limited data sets than traditional machine learning methods, but more data and deeper network structures may be required for the detection of some organs to achieve better results. Each of the above algorithms has made new breakthroughs in addressing specific issues. In a Chest X-ray, it is important considering the changes of organs, which can be caused by patient posture, the angle of incidence, disease, and other factors. Solving the problem of positional changes and rotation in image segmentation is very valuable for evaluating and diagnosing subsequent changes in patients' conditions, but there is relatively little literature available. The original assumption that the network has linear invariant characteristics was not verified in subsequent experiments. Therefore, we propose a novel network with respect to the position and direction to improve the accuracy of heart segmenting with image position and direction in small databases. In this paper, we use convolutional neural networks (CNNs) to solve the problem of segmenting the heart in CXR images. This paper has three main goals. First, the relationship between pixels is used instead of the pixels themselves as the network input for training, which addresses the low robustness of networks trained with small amounts of data. Then, we introduce the position and direction adjustment network (PDNet), a new architecture that incorporates different masks in the intermediate layers so that objects with different positions and orientations in CXRs can be segmented.