Smart Defect Detection