Training a model to identify certain differences between images?
If your image just slightly changes, all you need is the simple algorithm, just find the keyword &quot;k-Nearest Neighbor&quot; or take a look at this link.
To locate where is the difference, you can find the difference by subtracting two images by this script:
def extract_diff(imageA, imageB):
    '''
    Find the different between two image:
        + Input: two RGB image
        + Output: binary image show different between two image
    Assume the different between two image in each channel will be bigger or equal 30
    '''
    subtract = imageB.astype(np.float32) - imageA.astype(np.float32)
    mask_motion = cv2.inRange(np.abs(subtract),(30,30,30),(255,255,255))
    # mask_motion[mask_motion==255] = 1 # scale to 1 to reduce computation
    return mask_motion

And locate where the position with value 255 in the image. Next time you should this kind of question in the stack overflow community, there is a more active community, they can give you a better solution than mine.