A Low-Complexity Accurate Ranging Algorithm for a Switch Machine Working Component Based on the Mask RCNN