(img, bbox)
Check whether bbox is out of the range of the image
Check whether bbox is out of the range of the image
Check whether bbox is out of the range of the image
def check_bbox(img, bbox):
    '''
    Check whether bbox is out of the range of the image
    '''
    img_w, img_h = img.shape
    if bbox.x > 0 and bbox.y > 0 and bbox.right < img_w and bbox.bottom < img_h:
        return True
    else:
        return False
def check_bbox ( img , bbox ) : img_w , img_h = img . shape if bbox . x > 0 and bbox . y > 0 and bbox . right < img_w and bbox . bottom < img_h : return True else : return False