<s> from collections import OrderedDict <EOL> import numpy as np <EOL> from . . base import labeller_func , validate_input , connectivity_from_array <EOL> @ labeller_func ( group_label = '<STR_LIT>' ) <EOL> def face_bu3dfe_83_to_face_bu3dfe_83 ( pcloud ) : <EOL> r"""<STR_LIT>""" <EOL> from menpo . shape import PointUndirectedGraph <EOL> n_expected_points = <NUM_LIT> <EOL> validate_input ( pcloud , n_expected_points ) <EOL> reye_indices = np . arange ( <NUM_LIT:0> , <NUM_LIT:8> ) <EOL> leye_indices = np . arange ( <NUM_LIT:8> , <NUM_LIT:16> ) <EOL> rbrow_indices = np . arange ( <NUM_LIT:16> , <NUM_LIT> ) <EOL> lbrow_indices = np . arange ( <NUM_LIT> , <NUM_LIT> ) <EOL> rnose_indices = np . arange ( <NUM_LIT> , <NUM_LIT> ) <EOL> lnose_indices = np . arange ( <NUM_LIT> , <NUM_LIT> ) <EOL> nostril_indices = np . arange ( <NUM_LIT> , <NUM_LIT> ) <EOL> outermouth_indices = np . arange ( <NUM_LIT> , <NUM_LIT> ) <EOL> innermouth_indices = np . arange ( <NUM_LIT> , <NUM_LIT> ) <EOL> jaw_indices = np . arange ( <NUM_LIT> , <NUM_LIT> ) <EOL> reye_connectivity = connectivity_from_array ( reye_indices , close_loop = True ) <EOL> leye_connectivity = connectivity_from_array ( leye_indices , close_loop = True ) <EOL> rbrow_connectivity = connectivity_from_array ( rbrow_indices , <EOL> close_loop = True ) <EOL> lbrow_connectivity = connectivity_from_array ( lbrow_indices , <EOL> close_loop = True ) <EOL> rnose_connectivity = connectivity_from_array ( rnose_indices ) <EOL> nostril_connectivity = connectivity_from_array ( nostril_indices ) <EOL> lnose_connectivity = connectivity_from_array ( lnose_indices ) <EOL> outermouth_connectivity = connectivity_from_array ( outermouth_indices , <EOL> close_loop = True ) <EOL> innermouth_connectivity = connectivity_from_array ( innermouth_indices , <EOL> close_loop = True ) <EOL> jaw_connectivity = connectivity_from_array ( jaw_indices ) <EOL> all_connectivity = np . vstack ( [ <EOL> reye_connectivity , leye_connectivity , <EOL> rbrow_connectivity , lbrow_connectivity , <EOL> rnose_connectivity , nostril_connectivity , lnose_connectivity , <EOL> outermouth_connectivity , innermouth_connectivity , <EOL> jaw_connectivity <EOL> ] ) <EOL> new_pcloud = PointUndirectedGraph . init_from_edges ( pcloud . points , <EOL> all_connectivity ) <EOL> mapping = OrderedDict ( ) <EOL> mapping [ '<STR_LIT>' ] = reye_indices <EOL> mapping [ '<STR_LIT>' ] = leye_indices <EOL> mapping [ '<STR_LIT>' ] = rbrow_indices <EOL> mapping [ '<STR_LIT>' ] = lbrow_indices <EOL> mapping [ '<STR_LIT>' ] = rnose_indices <EOL> mapping [ '<STR_LIT>' ] = lnose_indices <EOL> mapping [ '<STR_LIT>' ] = nostril_indices <EOL> mapping [ '<STR_LIT>' ] = outermouth_indices <EOL> mapping [ '<STR_LIT>' ] = innermouth_indices <EOL> mapping [ '<STR_LIT>' ] = jaw_indices <EOL> return new_pcloud , mapping </s>
