Detection of product anomalies in the manufacturing process