1. A method, implemented by a processor, for performing auto-contouring in a medical image, the method comprising: receiving an image containing a region of interest; determining, by the processor, a first contour of the region of interest using a boundary detector; refining, by the processor, the first contour based on a shape dictionary to generate a second contour of the region of interest; and updating at least one of the boundary detector or the shape dictionary based on the second contour.