Stacked pellet particle size detection based on Segment Anything
The reasonable distribution of pellet size is crucial for ensuring their quality.Through in-depth study of existing methods and addressing issues such as incomplete segmentation and over-segmentation of pellet size detec-tion,Pellet-SAM(PelSAM)segmentation method was proposed,which inherited the structure of Segment Any-thing(SAM),with key operations involving freezing relevant parameters of the image encoder and prompt encoder.It introduced lightweight spatial and channel adapters to the image encoder and fine-tuned the mask decoder.The network was trained using labeled dataset for pellet segmentation,enabling accurate image segmentation of pellets.Since the contour of the segmented pellet appeared almost circular,in order to make it easier to calculate the pellet diameter,the least squares method was used to perform circle fitting on the contour of the segmented pellet.Apply-ing the principles of pinhole imaging and considering factors such as the distance between the camera and pellet sur-face,as well as the camera's focal length,a scaling factor was computed.This factor was then used to calculate the actual size of pellet particles in the image.Finally,based on the actual size of pellet particles,the distribution of pel-lets was categorized into four ranges,less than 8,[8,12],(12,16],and greater than 16 mm,where pellets ran-ging from[8,16]mm were considered qualified.Experimental results show that this method achieves an accuracy of 96.8%on the pellet segmentation data set,which is 21.0 and 12.6 percent poin higher than the UNet and Deep-Labv3 methods respectively.In the actual factory environment,the pellet particle size distribution calculated by this method is similar to the result of manual screening measurement,with a maximum error of only 1.74 percent point.The research provides a feasible solution for efficient pellet size analysis.