Skip to content

Commit

Permalink
Merge pull request #62 from DefTruth/dev
Browse files Browse the repository at this point in the history
fix(converters): fixed error when converting dataset 300W (#60)
  • Loading branch information
DefTruth authored Aug 14, 2022
2 parents 71d978a + ce9cb0f commit df5a6af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torchlm/data/_converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,8 @@ def _process_annotation(
# crop padded face
crop = image[int(ymin):int(ymax), int(xmin):int(xmax), :]
# adjust according to left-top corner
landmarks[:, 0] -= float(xmin)
landmarks[:, 1] -= float(ymin)
landmarks[:, 0] = landmarks[:, 0] - float(xmin)
landmarks[:, 1] = landmarks[:, 1] - float(ymin)

if self.target_size is not None and self.resize_op is not None:
crop, landmarks = self.resize_op(crop, landmarks)
Expand Down

0 comments on commit df5a6af

Please sign in to comment.