Macular edema is the accumulation of fluid leakage from retinal capillaries.Optical coherence tomography (OCT) images can show changes in the retinal tissue caused by ophthalmological diseases, such as fluid accumulation. Therefore, the segmentation of retinal fluid is important. Some methods based on image processing and machine learning often require large amounts of labeled data and rich domain knowledge. This study proposes a self-ensembling semisupervised model based on uncertainty guidance, namely, UGNet. The model is trained end-to-end with a few labeled data and plenty of unlabeled data, and contains a teacher model and a student model with the same architecture. The two models consist of an encoder and three decoders, which are used to predict the probability map, contour map, and distance map. The segmentation result is the fusion result of the three maps generated by the student model. The selective kernel module (SKM) is embedded in the decoder to make the model adaptively adjust the receptive field according to the size of the fluid. The uncertainty of teacher model evaluation guides the student model to learn more reliable knowledge. The proposed method is trained and evaluated on the RETOUCH challenge dataset. The experimental results show that our method achieves better segmentation results than other start-of-the-art methods.