Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

人脸检测结果为[0 0 0 0] #63

Open
iamfoolberg opened this issue Jun 21, 2023 · 3 comments
Open

人脸检测结果为[0 0 0 0] #63

iamfoolberg opened this issue Jun 21, 2023 · 3 comments

Comments

@iamfoolberg
Copy link

在/usr/local/python3.7.0/lib/python3.7/site-packages/ppgan/apps/first_order_predictor.py的如下函数中

    def extract_bbox(self, image):
        detector = face_detection.FaceAlignment(
            face_detection.LandmarksType._2D,
            flip_input=False,
            face_detector=self.face_detector)

        h, w, _ = image.shape
        print("extract_box: image height=", h)
        print("extract_box: image width=", w)

        frame = [image]
        #frame = image
        predictions = detector.get_detections_for_image(np.array(frame))
        person_num = len(predictions)
        print("extract_box", "person_num=",person_num)
        if person_num == 0:
            return np.array([])
        results = []
        face_boxs = []
        for rect in predictions:
            print("extract_box: a rect in predictions =", rect)

检测输出始终为:

extract_box: image height= 624
extract_box: image width= 656
extract_box person_num= 1
extract_box: a rect in predictions = (0, 0, 0, 0)
1 persons have been detected
Got a person's face in rect: [0 0 0 0 0]

导致后续无法生成视频。

@tangsipeng
Copy link

我也遇到这个问题

@jwmemail
Copy link

请问这个问题怎么解决的呀

@tangsipeng
Copy link

我记得是版本问题,需要各种试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants