pyvino
pyvino copied to clipboard
ubuntu test result
pyvino/tests/detector/test_detector.py .....F.... [ 47%]
pyvino/tests/model/test_model.py .......... [ 95%]
pyvino/tests/segmentor/test_segmentor.py . [100%]
_________________________ TestDetectorHeadpose.test_get_axis _________________________
self = <test_detector.TestDetectorHeadpose object at 0x7fe98af921d0>
def test_get_axis(self):
frame = self.load_image(TEST_FACE)
detector_face = DetectorFace()
detector_face.get_frame_shape(frame)
faces = detector_face.get_pos(frame)
detector_headpose = DetectorHeadpose()
headpose_exps = [(-5.459803 , 17.332203 , -2.9661326),
(-11.929161, 9.150341, -10.437834),
(-5.246365, 22.493275, -2.398564),
(2.904601, 24.449804, 14.927055)]
for face, headpose_exp in zip(faces[0][0], headpose_exps):
xmin, ymin, xmax, ymax = detector_face.get_box(face, frame)
face_frame = detector_face.crop_bbox_frame(frame,
xmin, ymin, xmax, ymax)
headpose = detector_headpose.get_axis(face_frame)
headpose = np.asarray(headpose).astype(np.float32)
headpose_exp = np.asarray(headpose_exp).astype(np.float32)
> np.testing.assert_almost_equal(headpose, headpose_exp)
E AssertionError:
E Arrays are not almost equal to 7 decimals
E
E (mismatch 100.0%)
E x: array([-5.4597893, 17.332212 , -2.9661324], dtype=float32)
E y: array([-5.459803 , 17.332203 , -2.9661326], dtype=float32)
pyvino/tests/detector/test_detector.py:90: AssertionError