Research on automatic foreground image segmentation of SAM for 3D reconstruction
Aiming at the problem that background redundancy and low efficiency in object recognition and reconstruction in the three-dimensional reconstruction of multi-view images,an improved automatic foreground segmentation method based on the Segment Anything Model(SAM)was proposed.Initially,the SAM image encoder was employed to calculate the image embedding of the input image;pixel coordinates were calculated as prompt embeddings according to the image pixel to predict the foreground mask.The mask obtained from SAM foreground prediction may contain minor misclassifications and edge jaggies,thus Gaussian filtering was introduced to optimize the mask image.Taking artificial structures,plants,and their organs as examples,the mask was applied to the original image,and the segmented image was used for multi-view stereo vision 3D reconstruction and neural radiance field reconstruction.Experimental results based on various image data showed that this method can effectively eliminate background interference,achieve high-quality segmentation results for images centered on objects,and save reconstruction time,thereby improving the efficiency of 3D reconstruction.
foreground segmentationSAMmulti-view3D reconstructionneural radiance field