File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6868n = 65
6969img_name = landmarks_frame .iloc [n , 0 ]
7070landmarks = landmarks_frame .iloc [n , 1 :]
71- landmarks = np .asarray (landmarks )
72- landmarks = landmarks .astype ('float' ).reshape (- 1 , 2 )
71+ landmarks = np .asarray (landmarks , dtype = float ).reshape (- 1 , 2 )
7372
7473print ('Image name: {}' .format (img_name ))
7574print ('Landmarks shape: {}' .format (landmarks .shape ))
@@ -144,8 +143,7 @@ def __getitem__(self, idx):
144143 self .landmarks_frame .iloc [idx , 0 ])
145144 image = io .imread (img_name )
146145 landmarks = self .landmarks_frame .iloc [idx , 1 :]
147- landmarks = np .array ([landmarks ])
148- landmarks = landmarks .astype ('float' ).reshape (- 1 , 2 )
146+ landmarks = np .array ([landmarks ], dtype = float ).reshape (- 1 , 2 )
149147 sample = {'image' : image , 'landmarks' : landmarks }
150148
151149 if self .transform :
You can’t perform that action at this time.
0 commit comments