Skip to content

Commit

Permalink
Merge pull request #61 from nunenuh/main
Browse files Browse the repository at this point in the history
Fixing Issue #60 Error on Converting 300W dataset in class Landmarks300WConverter with message UFuncTypeError: Cannot cast ufunc 'subtract' output...
  • Loading branch information
DefTruth authored Aug 14, 2022
2 parents cfc6d87 + 63f5a74 commit ce9cb0f
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 ce9cb0f

Please sign in to comment.