Recovering full states from limited observations provides supports for active control of the cavitation, preventing power loss due to cavitation erosion. Recent advances in deep learning provide essential support for constructing accurate state estimators. In this work, the commonly used CNNs (convolutional neural networks)-based encoder for reconstructing the full-state field from sparse observations is carefully investigated. The results reveal that the potential information loss and weak negative correlations between features generated by the encoder can significantly impair the feature representation capability of models. To address these issues, a specially designed transformer-based encoder is employed in this work to generate dense and positively correlated features for the decoder. Tests on the cavitation dataset demonstrate impressive improvements in prediction accuracy. Moreover, visualizations of the training process also confirm the enhanced convergence speed due to the model improvements. Notably, the model represents the first specifically designed deep learning model for predicting velocity fields from sparse pressure observations on the hydrofoil. The proposed model holds the promise to achieve accurate flow field reconstruction, providing support for active cavitation control aimed at enhancing turbine operational efficiency and reducing power loss.