Build bounding box map for training sets