The traditional design method for terahertz metasurface biosensors is cumbersome and time-consuming, requires expertise, and often leads to significant discrepancies between expected and actual values. This paper presents a novel approach for the fast, efficient, and convenient inverse design of THz metasurface sensors, leveraging convolutional neural network techniques based on deep learning. During the model training process, the magnitude data of the scattering parameters collected from the numerical simulation of the THz metasurface served as features, paired with corresponding surface structure matrices as labels to form the training dataset. During the validation process, the thoroughly trained model precisely predicted the expected surface structure matrix of a THz metasurface. The results demonstrate that the proposed algorithm realizes time-saving, high-efficiency, and high-precision inversion methods without complicated data preprocessing and additional optimization algorithms. Therefore, deep learning algorithms offer a novel approach for swiftly designing and optimizing THz metasurface sensors in biomedical detection, bypassing the complex and specialized design process of electromagnetic devices, and promising extensive prospects for their application in the biomedical field.