ObjectiveNeuronavigation and classification of craniopharyngiomas can guide surgical approaches and prognostic information. The QST classification has been developed according to the origin of craniopharyngiomas; however, accurate preoperative automatic segmentation and the QST classification remain challenging. This study aimed to establish a method to automatically segment multiple structures in MRIs, detect craniopharyngiomas, and design a deep learning model and a diagnostic scale for automatic QST preoperative classification.MethodsWe trained a deep learning network based on sagittal MRI to automatically segment six tissues, including tumors, pituitary gland, sphenoid sinus, brain, superior saddle cistern, and lateral ventricle. A deep learning model with multiple inputs was designed to perform preoperative QST classification. A scale was constructed by screening the images.ResultsThe results were calculated based on the fivefold cross-validation method. A total of 133 patients with craniopharyngioma were included, of whom 29 (21.8%) were diagnosed with type Q, 22 (16.5%) with type S and 82 (61.7%) with type T. The automatic segmentation model achieved a tumor segmentation Dice coefficient of 0.951 and a mean tissue segmentation Dice coefficient of 0.8668 for all classes. The automatic classification model and clinical scale achieved accuracies of 0.9098 and 0.8647, respectively, in predicting the QST classification.ConclusionsThe automatic segmentation model can perform accurate multi-structure segmentation based on MRI, which is conducive to clearing tumor location and initiating intraoperative neuronavigation. The proposed automatic classification model and clinical scale based on automatic segmentation results achieve high accuracy in the QST classification, which is conducive to developing surgical plans and predicting patient prognosis.