Grayscale medical image segmentation method based on 2D&3D object detection with deep learning