In modern industry, the surface defect inspection of injection moulded products is crucial for controlling product quality and optimising 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, reparameterisation-based convolution modules are employed for feature extraction and feature fusion. A median iterative clustering algorithm based on hierarchical clustering initialisation is proposed to obtain prior anchors that are highly matched with the actual distribution of defect sizes. A novel focus-entire union over covering loss function is utilised 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.1 ms, confirming its effectiveness.