Custom Install
This section covers advanced PeekingDuck installation steps for users with ARM64 devices or Apple Silicon Macs.
Arm64
To install PeekingDuck on an ARM-based device, such as a Raspberry Pi, include
the --no-dependencies
flag, and separately install the other dependencies
listed in PeekingDuck’s [requirements.txt]:
Terminal Session
Verify the installation using:
Terminal Session
See here for changes to the verify installation command in version 1.3.0.
You should see a video of a person waving his hand with bounding boxes overlaid.
Apple Silicon Mac
Apple released their advanced ARM-based Apple Silicon M1 chip in late 2020, a significant change from the previous Intel processors. We’ve successfully installed PeekingDuck on Apple Silicon Macs running macOS Big Sur and macOS Monterey.
Prerequisites:
Install homebrew
Install miniforge using homebrew:
Terminal Session
[~user] > brew install miniforgeCreate conda virtual environment and install base packages:
Terminal Session
[~user] > conda create -n pkd python=3.8[~user] > conda activate pkd[~user] > conda install click colorama opencv openblas pyyaml requests scipy shapely tqdm typeguardInstall Apple’s Tensorflow build that is optimized for Apple Silicon Macs:
For macOS Monterey:
Terminal Session
[~user] > conda install -c apple tensorflow-deps[~user] > pip install tensorflow-macos tensorflow-metalFor macOS Big Sur:
Terminal Session
[~user] > conda install -c apple tensorflow-deps=2.6.0[~user] > pip install tensorflow-estimator==2.6.0 tensorflow-macos==2.6.0[~user] > pip install tensorflow-metal==0.2.0Install PyTorch (currently CPU-only):
Terminal Session
[~user] > pip install torch torchvisionInstall PeekingDuck and verify installation:
Terminal Session
[~user] > pip install peekingduck --no-dependencies[~user] > peekingduck verify-installSee here for changes to the verify installation command in version 1.3.0.
You should see a video of a person waving his hand (taken from here) with bounding boxes overlaid as shown below:
The video will auto-close when it is run to the end (about 20 seconds, depending on system speed).To exit earlier, click to select the video window and press q.