Skip to content

Commit 202cc44

Browse files
authored
Merge pull request #37 from KumarLabJax/fix-corner-features
Fix corner features
2 parents 913a063 + e3ef844 commit 202cc44

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/feature_extraction/features.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from .segmentation_features import SegmentationFeatureGroup
1616

1717

18-
FEATURE_VERSION = 7
18+
FEATURE_VERSION = 8
1919

2020
_FEATURE_MODULES = [
2121
BaseFeatureGroup,

src/feature_extraction/landmark_features/corner.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ def get_distances(self, identity: int) -> typing.Tuple[np.ndarray, np.ndarray]:
4747
except KeyError:
4848
return distances, bearings
4949

50+
# points and convex hulls are in y,x
51+
# corners are x,y so flip them to match points and convex hulls
52+
corners = np.flip(corners, axis=-1)
53+
5054
for frame in range(self._poses.num_frames):
5155

5256
# don't scale the point coordinates by the pixel_scale value,

0 commit comments

Comments
 (0)