Skip to content

Commit

Permalink
Merge pull request #13 from KumarLabJax/apple_silicon_compatibility
Browse files Browse the repository at this point in the history
Apple silicon compatibility
  • Loading branch information
SkepticRaven authored Aug 3, 2023
2 parents 2880cf7 + 7a3f41e commit 4d1e057
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 4 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@ The virtual environment can be deactivated if you no longer need it:
deactivate
```

### Installing on Apple M1/M2 Silicone

To install the app on Apple's newer M1/M2 macbooks, the user needs to install via [anaconda](https://www.anaconda.com/download#macos)
using the following instructions:

```commandline
conda env create -n jabs -f environment_jabs.yml
conda activate jabs
python app.py
```

#### Enabling XGBoost Classifier

The XGBoost Classifier has a dependency on the OpenMP library. This does
Expand Down
5 changes: 5 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
import argparse
import sys

#### For Mac M1 compatibility ######
import os
os.environ['QT_MAC_WANTS_LAYER'] = '1'
####################################

from PySide2 import QtWidgets

from src import APP_NAME, APP_NAME_LONG
Expand Down
86 changes: 86 additions & 0 deletions environment_jabs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: jabs
channels:
- conda-forge
- defaults
dependencies:
- bzip2=1.0.8=h3422bc3_4
- ca-certificates=2022.12.7=h4653dfc_0
- gettext=0.21.1=h0186832_0
- giflib=5.2.1=h1a8c8d9_3
- glib=2.76.1=hb5ab8b9_0
- glib-tools=2.76.1=hb5ab8b9_0
- gst-plugins-base=1.21.3=h8b7775e_1
- gstreamer=1.21.3=hcb7b3dd_1
- icu=70.1=h6b3803e_0
- jpeg=9e=h1a8c8d9_3
- krb5=1.19.3=he492e65_0
- lerc=4.0.0=h9a09cb3_0
- libclang=15.0.7=default_h9e54d93_1
- libclang13=15.0.7=default_h7d574e7_1
- libcxx=16.0.1=h75e25f2_0
- libdeflate=1.17=h1a8c8d9_0
- libedit=3.1.20191231=hc8eb9b7_2
- libffi=3.4.2=h3422bc3_5
- libglib=2.76.1=h4646484_0
- libiconv=1.17=he4db4b2_0
- libllvm15=15.0.7=h62b9111_1
- libogg=1.3.4=h27ca646_1
- libopus=1.3.1=h27ca646_1
- libpng=1.6.39=h76d750c_0
- libpq=15.1=h998ac43_1
- libsqlite=3.40.0=h76d750c_0
- libtiff=4.5.0=h5dffbdd_2
- libvorbis=1.3.7=h9f76cd9_0
- libwebp=1.2.4=h999c80f_1
- libwebp-base=1.2.4=h1a8c8d9_0
- libxml2=2.10.3=h67585b2_4
- libxslt=1.1.37=h1bd8bc4_0
- libzlib=1.2.13=h03a7124_4
- mysql-common=8.0.32=h518ea0a_1
- mysql-libs=8.0.32=hcb599eb_1
- ncurses=6.3=h07bb92c_1
- nspr=4.35=hb7217d7_0
- nss=3.89=h789eff7_0
- openssl=3.1.0=h03a7124_0
- packaging=23.1=pyhd8ed1ab_0
- pcre2=10.40=hb34f9b4_0
- pip=23.1=pyhd8ed1ab_0
- ply=3.11=py_1
- pyqt=5.15.7=py310h7aaa74b_3
- pyqt5-sip=12.11.0=py310h0f1eb42_3
- pyqtwebengine=5.15.7=py310h7fde93a_3
- pyside2=5.15.8=py310hbfa27b9_2
- python=3.10.10=h3ba56d0_0_cpython
- python_abi=3.10=3_cp310
- qt-main=5.15.6=h160f5ef_4
- qt-webengine=5.15.4=h3a00a3b_3
- readline=8.2=h92ec313_1
- setuptools=67.6.1=pyhd8ed1ab_0
- sip=6.7.8=py310h0f1eb42_0
- tk=8.6.12=he1e0b03_0
- toml=0.10.2=pyhd8ed1ab_0
- tomli=2.0.1=pyhd8ed1ab_0
- tzdata=2023c=h71feb2d_0
- wheel=0.40.0=pyhd8ed1ab_0
- xz=5.2.6=h57fd34a_0
- zstd=1.5.2=hf913c23_6
- pip:
- h5py==3.8.0
- joblib==1.2.0
- lxml==4.9.2
- markdown2==2.4.8
- numpy==1.24.2
- opencv-python-headless==4.7.0.72
- pip-licenses==4.2.0
- prettytable==3.7.0
- ptable==0.9.2
- pyyaml==6.0
- scikit-learn==1.2.2
- scipy==1.10.1
- shapely==2.0.1
- six==1.16.0
- tabulate==0.9.0
- threadpoolctl==3.1.0
- unittest-xml-reporting==3.2.0
- wcwidth==0.2.6
- xgboost==1.7.5
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ scipy==1.6.1
Shapely==1.7.1
shiboken2==5.15.2
six==1.14.0
sklearn==0.0
tabulate==0.8.8
threadpoolctl==2.1.0
unittest-xml-reporting==3.0.2
Expand Down
2 changes: 1 addition & 1 deletion src/feature_extraction/social_features/social_distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(self, poses: PoseEstimation, identity: int,

self_base_neck_point = points[idx.BASE_NECK, :]
self_nose_point = points[idx.NOSE, :]
other_centroid = np.array(other_shape.centroid)
other_centroid = np.array(other_shape.centroid.coords[0])

view_angle = self.compute_angle(
self_nose_point,
Expand Down
2 changes: 1 addition & 1 deletion src/project/export_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def export_training_data(project: 'Project',
# store the video/identity to group mapping in the h5 file
for group in group_mapping:
dset = out_h5.create_dataset(f'group_mapping/{group}/identity',
(1,), dtype=np.int)
(1,), dtype=np.int64)
dset[:] = group_mapping[group]['identity']
dset = out_h5.create_dataset(f'group_mapping/{group}/video_name',
(1,), dtype=string_type)
Expand Down
2 changes: 1 addition & 1 deletion src/version/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__MAJOR = 0
__MINOR = 16
__PATCH = 2
__PATCH = 3


def version_str():
Expand Down

0 comments on commit 4d1e057

Please sign in to comment.