The method and system for detection of anomalous work pieces during a production process, comprising computing for each production process step of the production process at least one deviation data signal for a target data signal of a target work piece with respect to reference data signals recorded for a corresponding production process step of a set of reference work pieces, wherein the deviation data signal comprises a number of deviation data samples for different production time steps, t, or path length steps, 1, of the respective production process step; performing a stepwise anomaly detection by data processing of the at least one computed deviation data signal and a process type indicator indicating a type of the production process step using a trained anomaly detection data modelto calculate for each time step, t, or path length step, 1, of the production process step an anomaly probability, p, that the respective time step, t, or path length step, 1, is anomalous; and classifying (S3) the target work piece and / or the production process step as being anomalous or not anomalous on the basis of the calculated anomaly probabilities, p, of the time steps, t, or path length steps, 1, of the production process step, wherein if the target work piece and / or the production process step is classified as anomalous, a warning signal for a user and / or a control signal for a production machine can be generated automatically.