@@ -96,7 +96,6 @@ def __getitem__(self, index):
9696img = Image .open (os .path .join (self .data_dir ,self .X_train [index ]+ self .img_ext ))
9797img = img .convert (self .image_mode )
9898mat_path = os .path .join (self .data_dir ,self .y_train [index ]+ self .annot_ext )
99- shape_path = os .path .join (self .data_dir ,self .y_train [index ]+ '_shape.npy' )
10099
101100# Crop the face loosely
102101pt2d = utils .get_pt2d_from_mat (mat_path )
@@ -136,11 +135,8 @@ def __getitem__(self, index):
136135bins = np .array (range (- 99 ,102 ,3 ))
137136binned_pose = np .digitize ([yaw ,pitch ,roll ],bins )- 1
138137
139- # Get shape
140- shape = np .load (shape_path )
141-
142138# Get target tensors
143- labels = torch . LongTensor ( np . concatenate (( binned_pose , shape ), axis = 0 ))
139+ labels = binned_pose
144140cont_labels = torch .FloatTensor ([yaw ,pitch ,roll ])
145141
146142if self .transform is not None :
@@ -171,7 +167,6 @@ def __getitem__(self, index):
171167img = Image .open (os .path .join (self .data_dir ,self .X_train [index ]+ self .img_ext ))
172168img = img .convert (self .image_mode )
173169mat_path = os .path .join (self .data_dir ,self .y_train [index ]+ self .annot_ext )
174- shape_path = os .path .join (self .data_dir ,self .y_train [index ]+ '_shape.npy' )
175170
176171# Crop the face loosely
177172pt2d = utils .get_pt2d_from_mat (mat_path )
@@ -214,11 +209,8 @@ def __getitem__(self, index):
214209bins = np .array (range (- 99 ,102 ,3 ))
215210binned_pose = np .digitize ([yaw ,pitch ,roll ],bins )- 1
216211
217- # Get shape
218- shape = np .load (shape_path )
219-
220212# Get target tensors
221- labels = torch . LongTensor ( np . concatenate (( binned_pose , shape ), axis = 0 ))
213+ labels = binned_pose
222214cont_labels = torch .FloatTensor ([yaw ,pitch ,roll ])
223215
224216if self .transform is not None :