End-to-end training of a two-stage neural network for defect detection | IEEE Conference Publication | IEEE Xplore