def hunmen_detect_in_img(origin_img, img_name):
    detector = joblib.load(params.model_path)

    img = np.copy(gamma_normalize.gamma_normalize(origin_img))

    pos_windows_scaled_coordinates = []
    pos_feature_vector_in_img = []
    pos_windows_scale = []

    v, h = img.shape

    scale = 0  # to record the resizing times

    while params.window_height <= v and params.window_width <= h:

        print img.shape

        pos_windows_in_single_scale, pos_feature_vector_in_scale = classifier_trainer.search_a_scale(detector, img)
        for i in xrange(pos_feature_vector_in_scale.__len__()):
            pos_windows_scale.append(scale)

        pos_feature_vector_in_img += pos_feature_vector_in_scale
        pos_windows_scaled_coordinates += pos_windows_in_single_scale

        img = cv2.resize(img, None, fx=params.scale_gap, fy=params.scale_gap)
        v, h = img.shape
        scale += 1

    mark(pos_windows_scaled_coordinates, pos_windows_scale, origin_img, img_name)

    return pos_windows_scaled_coordinates, pos_feature_vector_in_img