import dlib


class CorrelationTracker(object):
    def init(self, image, bbox):
        self.tracker = dlib.correlation_tracker()
        x, y, x2, y2 = bbox
        x2 += x
        y2 += y
        self.tracker.start_track(image, dlib.rectangle(x, y, x2, y2))
        return True

    def update(self, image):
        self.tracker.update(image)
        out = self.tracker.get_position()
        return True, (out.left(), out.top(), out.right() - out.left(), out.bottom() - out.top())

[((6, 23, 6, 49), 'dlib.correlation_tracker', 'dlib.correlation_tracker', ({}, {}), '()', False, 'import dlib\n'), ((10, 40, 10, 68), 'dlib.rectangle', 'dlib.rectangle', ({(10, 55, 10, 56): 'x', (10, 58, 10, 59): 'y', (10, 61, 10, 63): 'x2', (10, 65, 10, 67): 'y2'}, {}), '(x, y, x2, y2)', False, 'import dlib\n')]