1. A device, comprising: one or more processors, in communication with a memory, to: determine, based on a first iteration of applying an algorithm that is applicable iteratively in three or more iterations, a first representation of a contour that delineates a region of an image from another region of the image; generate a first hash value, corresponding to the first representation, by applying a first hash function to the first representation; determine that an oscillation of representations of the contour occurs by comparing the first hash value and a second hash value that corresponds to a second representation of the contour, the second representation of the contour being determined based on a second iteration of the algorithm applied before the first iteration and before a third iteration of the algorithm that occurs between the second iteration and the first iteration, the second hash value being generated by applying a second hash function to the second representation of the contour; and determine, based on determining that the oscillation of the representations occurs, that the representations of the contour have converged around the contour.