add code to compute potentials for regions using a trained RCNN model