Accurate measurement of subcutaneous adipose tissue (SAT) and visceral adipose tissue (VAT) in the thorax is important for understanding the impact of body composition upon various clinical disorders. The aim of this paper is to explore a practical system for the automatic localization of the axial slices through the thorax at the T7 and T8 vertebral levels in computed tomography (CT), and automatic segmentation of VAT in T7 slice and SAT at T8 slice via deep learning (DL). The methodology mainly consists of two models: the localization model based on AlexNet and the segmentation model based on UNet. For the first one, two slices (T7 and T8) at the middle of the seventh and eighth thoracic vertebrae, respectively, from the full or partial body scan of each patient are automatically detected. For the second one, all the CT images and the associated adipose tissue ground truth segmentations are used for training, where just T7 and T8 slices are tested by the two-label Unet. The datasets from four universities (Penn, Duke, Columbia, and Iowa) are used for training and validation of the models. In the experiments, relevant statistical parameters including Mean Distance (MD), Standard Deviation (SD), True Positive Rate (TPR), and True Negative Rate (TNR) indicate that the proposed algorithm has high reliability and may be useful for fully automated body composition analysis with high accuracy.