In modern industry, the surface defect inspection of injection moulded products is crucial for controlling product quality and optimizing the manufacturing process. With the development of optical measurement and computer technology, machine vision inspection methods have been widely adopted instead of manual inspection. However, current machine vision inspection methods are difficult to simultaneously ensure the accuracy and efficiency of surface defect inspection of injection moulded products. Considering this problem, a novel deep learning algorithm applied to machine vision inspection for surface defects of injection moulded products is proposed. To train and evaluate the proposed deep learning algorithm, an image acquisition platform is established and the dataset of surface defects in moulded products is obtained. In the proposed deep learning algorithm, reparameterization-based convolution modules are employed for feature extraction and feature fusion. A median iterative clustering algorithm based on hierarchical clustering initialization is proposed to obtain prior anchors that are highly matched with the actual distribution of defect sizes. A novel Focus-Entire Union over Covering (Focus-EUoC) loss function is utilized for bounding box regression. On these bases, the proposed deep learning algorithm applied to machine vision inspection is evaluated on the dataset of surface defects in moulded products. The experimental results indicate that compared to the traditional inspection algorithms and other deep learning algorithms currently used in machine vision inspection, the proposed deep learning algorithm exhibits superior inspection accuracy and inspection efficiency on the acquired dataset. The inspection precision reaches 0.964, the inspection recall reaches 0.955, and the inference time for each subgraph is only 6.1ms, confirming its effectiveness.