Trainable vision-based anomaly detection and diagnosis (TADD) Version 1