Physicians are required to spend a significant amount of reading time of magnetically controlled capsule endoscopy. However, current deep learning models are limited to completing a single recognition task and cannot replicate the diagnostic process of a physician. This study aims to construct a multi-task model that can simultaneously recognize gastric anatomical sites and gastric lesions. A multi-task recognition model named Mul-Recog-Model was established. The capsule endoscopy image data from 886 patients were selected to construct a training set and a test set for training and testing the model. Based on the same test set, the model in this study was compared with the current single-task recognition model with good performance. The sensitivity and specificity of the model for recognizing gastric anatomical sites were 99.8% (95% confidence intervals: 99.7-99.8) and 98.5% (95% confidence intervals: 98.3-98.7), and for gastric lesions were 98.8% (95% confidence intervals: 98.3-99.2) and 99.4% (95% confidence intervals: 99.1-99.7). Moreover, the positive predictive value, negative predictive value, and accuracy of the model were more than 95% in recognizing gastric anatomical sites and gastric lesions. Compared with the current single-task recognition model, our model showed comparable sensitivity, specificity, positive predictive value, negative predictive value, and accuracy (p < 0.01, except for the negative predictive value of ResNet, p > 0.05). The Areas Under Curve of our model were 0.985 and 0.989 in recognizing gastric anatomical sites and gastric lesions. Furthermore, the model had 49.1M parameters and 38.1G Float calculations. The model took 15.5ms to recognize an image, which was less than the superposition of multiple single models (p < 0.01). The Mul-Recog-Model exhibited high sensitivity, specificity, PPV, NPV, and accuracy. The model demonstrated excellent performance in terms of parameters quantity, Float computation, and computing time. The utilization of the model for recognizing gastric images can improve the efficiency of physicians' reports and meet complex diagnostic requirements.