detector.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:pedestrianSys 作者: PhilipChicco 项目源码 文件源码
def display(self, frame, face_locations):
        """
        - Display results on screen with bboxes
        :param frame: window frame
        :return: window with resulting predictions on faces
        """
        # Display the results
        scale = 1
        if self.resize:
            scale = 4

        if not len(face_locations) == 0:  # nothing detected
            for (top, right, bottom, left) in face_locations:
                # Scale back up face locations since the frame we detected in was scaled to 1/4 size
                top * scale
                right * scale
                bottom * scale
                left * scale

                # Draw a box around the face
                cv2.rectangle(frame, (left, top), (right, bottom), (0, 255, 255), 2)
                # else
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号