Real-time dim space target detection is a significant challenge in space situation awareness. This paper proposes a single-frame space object segmentation and detection method based on deep learning. Firstly, Channel and Space Attention U-net (CSAU-Net) is presented based on space image features. We remove unnecessary feature layers and add attention modules in the traditional encoder and decoder structure to enhance feature fusion and better use original feature layers. The proposed network structure can achieve accurate segmentation of space objects with fewer data training. At the same time, we construct a space target dataset for training, which contains targets with different signal-to-noise ratios to enhance the generalization of convolutional neural networks. After obtaining the segmentation masks, a simple connected component labeling method is applied to extract the centroid of the space target. Experiments show that our approach can achieve an ideal segmentation effect when the signal-to-noise ratio of the space target in the simulated dataset is 0.3. In addition, the proposed algorithm can realize fast segmentation and achieve an accuracy of 98.5%, which is similar to the traditional multi-frame space target detection method in real space image detection.