def affine_vertical_flip_matrix(prob=<NUM_LIT:0.5>):
factor = np.random.uniform(<NUM_LIT:0>, <NUM_LIT:1>)<EOL>if prob >= factor:<EOL><INDENT>filp_matrix = np.array([[ <NUM_LIT:1.> , <NUM_LIT:0.>, <NUM_LIT:0.> ],[ <NUM_LIT:0.>, -<NUM_LIT:1.>, <NUM_LIT:0.> ],[ <NUM_LIT:0.>, <NUM_LIT:0.>, <NUM_LIT:1.> ]])<EOL>return filp_matrix<EOL><DEDENT>else:<EOL><INDENT>filp_matrix = np.array([[ <NUM_LIT:1.> , <NUM_LIT:0.>, <NUM_LIT:0.> ],[ <NUM_LIT:0.>, <NUM_LIT:1.>, <NUM_LIT:0.> ],[ <NUM_LIT:0.>, <NUM_LIT:0.>, <NUM_LIT:1.> ]])<EOL>return filp_matrix<EOL><DEDENT>
Create an affine transformation for image vertical flipping.
    NOTE: In OpenCV, x is width and y is height.

    Parameters
    ----------
    prob : float
        Probability to flip the image. 1.0 means always flip.

    Returns
    -------
    numpy.array
        An affine transform matrix.