Recoding mask database infrastructure and segmentation tools