Spine Detection and Labeling Using a Parts-Based Graphical Model