A Quality Inspection System For Precision Machinery Based On Generative Modeling