During the moulding of valve-stem seals, different fault types can occur. This paper discusses how rules and neural networks have been applied in an automated visual inspection system for the rejection of faulty components, and more importantly, to provide information about the faults that may be used by an on-line quality improvement system. Rules have been used to implement an attentional mechanism which detects discontinuities on the sealing lip contour, and neural networks have been employed to classify surface defects by their geometrical outline features. The paper describes-the types of faults to be discriminated by the system, the optical and mechanical hardware employed, the different algorithms developed and their practical validation.