This invention discloses a method and
system for accurate counting of dense
copper sheets based on semantic segmentation and
image processing. The method includes: acquiring a large field-of-view image of dense
copper sheets; labeling and
cropping the
copper sheets in the image, and inputting the cropped image and labels into a Unet semantic segmentation network for training to obtain a trained Unet
network model; setting the input image of the trained Unet
network model to the original image size, and performing
inference on the original image to obtain a preliminary
inference map; performing an opening operation on the preliminary
inference map to filter out small imperfections, and performing dilation to obtain large columns of copper sheets; correcting the angle of the
minimum bounding rectangle of the large columns of copper sheets; and forming a peak-and-valley image through affine transformation, projection integration, and filtering, and counting the number of copper sheets in all large columns of copper sheets in the image by counting the number of peaks. This invention effectively solves the problem of achieving high-precision counting in scenes with mottled and densely arranged copper sheets.