Embedded Deep Learning System for Defects Detection