Prediction of mean strain from laser beam welding images and detection of defects via strain curves based on machine learning