def nr_P_N(Y_data, X_data):
    """
    A function to calculate the total number of P:s (positives) and N:s (negatives) in the Target data. Excludes the
    padding and data from bounding boxes with a width smaller than 60 pixels.
    :param Y_data: Target data
    :param X_data: Feature data, used to identify padding
    :return: The total number of P:s and N:s
    """
    nr_ped = len(Y_data)
    nr_P = 0
    nr_N = 0
    for i in range(nr_ped):
        for j in range(len(Y_data[i])):
            if X_data[i][j][0] != -1.0 and X_data[i][j][2]*1500 >= 60:
                if Y_data[i][j][0] == 1:
                    nr_P += 1
                if Y_data[i][j][0] == 0:
                    nr_N += 1
    return nr_P, nr_N