KumarLabJax / JABS-behavior-classifier

Behavior Classifier Component from the Jax Animal Behavior System
Other
12 stars 2 forks source link

Apple silicon compatibility #13

Closed anshu957 closed 1 year ago

anshu957 commented 1 year ago

Description: This pull request adds support for Mac M1/M2 devices by setting the QT_MAC_WANTS_LAYER environment variable to 1. This is required to ensure proper rendering of the application's graphical interface.

Changes:

Testing: Tested this on 2 different mac M1 devices and verified that the application's graphical interface is rendered correctly.

SkepticRaven commented 1 year ago

Although it was linked to the issue, it was not mentioned in this pull request:

Going from shapely 1.7 -> 2.0 seems to change the way of accessing centroid keypoints. This patch should fix it: https://github.com/KumarLabJax/JABS-behavior-classifier/pull/27/commits/188fe7a654d55a4a34b2c689f1f8fe457ea66929

It appears that centroid keypoints are only accessed erroneously in multimouse features (via the social distance angles), so single mouse projects are fine.

SkepticRaven commented 1 year ago

Added the 2 patches and bumped the version. I didn't run extensive tests, but I did run initialize_project.py on a multimouse project (via the venv libraries) to make sure the patches were compatible.

If @anshu957 wanted to do one last check for this, you can... otherwise I think we can merge/release.

anshu957 commented 1 year ago

Thanks @SkepticRaven. I just validated it for a single mouse dataset and I could train and export with all three algorithms without any problem. It is displaying the overlaying poses and tracks correctly as well. I think we can merge it and release it.