iselect=np.nonzero(LMs.left_eye_center_x.notna() & LMs.right_eye_center_x.notna() &
LMs.nose_tip_x.notna() & LMs.mouth_center_bottom_lip_x.notna())[0]
instead we can use dropna function.
iselect = LMs.dropna(subset=['left_eye_center_x', 'right_eye_center_x', 'nose_tip_x', 'mouth_center_bottom_lip_x'])
much simpler right?
No comments:
Post a Comment