The efficiency of basketball shooting training has always been an urgent problem to be solved in basketball sports. Applying computer virtual image technology to basketball sports training is the key to improve basketball shooting ability and improve the effect of basketball sports training. Therefore, based on the design of basketball shooting automatic recognition system based on the background difference method, this study puts forward the specific application of computer virtual image technology in modern sports training. By analyzing the techniques of image denoising, image detection, and image calibration, a goal detection algorithm for modern sports basketball shooting training is designed. Firstly, the camera is used for image capture, the RGB image is converted into gray image, and the median filter is used to suppress the noise in the image. Then, the background difference method is used to detect the moving region, and the background modeling is combined with the mean method. After obtaining the background reference model, the image is differentiated, the gray image after image difference is binarized, and then the binary image is postprocessed by morphological middle closure operation. Finally, the image calibration technology is used to extract the basketball feature information. Through the region segmentation algorithm, the basketball shooting part is segmented and judged, so as to realize the basketball shooting training goal detection. The experimental results show that the proposed method has a good effect on basketball shooting training goal detection and can effectively improve the detection accuracy and efficiency.