Skip to content

Commit

Permalink
fix: fixing error when converting dataset 300W in class Landmarks300W…
Browse files Browse the repository at this point in the history
…Converter DefTruth#60
  • Loading branch information
nunenuh committed Aug 13, 2022
1 parent 71d978a commit 63f5a74
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 63f5a74

Please sign in to comment.