The invention discloses an
astragalus membranaceus decoction piece surface defect detection method based on an improved YOLO series model. The method comprises the following steps of: acquiring a high-definition image of the radix astragali decoction pieces through a hardware acquisition device of the radix astragali decoction pieces, constructing a labeling
data set containing three defects of cracks,
mildew spots and damage, and performing data enhancement through
modes of rotating, overturning,
cutting, brightness disturbance and the like; aiming at the characteristics of complex surface texture and irregular defect form of the
astragalus membranaceus decoction pieces, a YOLO series
network structure is improved, linear deformable
convolution is introduced into a
trunk feature extraction network, and partial
convolution and gated linear unit
convolution are further introduced into a
feature fusion module, so that the
feature extraction capability and the reasoning speed are improved; visual
software constructed based on Flask and the like can display detection videos, defect statistics and defect position numbers in real time, automatic screening of the
astragalus membranaceus decoction pieces in a
production line is achieved, the defect detection precision and detection efficiency can be effectively improved, and the method is suitable for
quality control and intelligent transformation of astragalus membranaceus decoction piece production enterprises.