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

[~user] > pip install peekingduck --no-dependencies
[~user] > [ install additional dependencies as specified within requirements.txt ]

Verify the installation using:

Terminal Session

[~user] > peekingduck verify-install

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.

  1. Prerequisites:

    • Install homebrew

    • Install miniforge using homebrew:

    Terminal Session

    [~user] > brew install miniforge
  2. Create 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 typeguard
  3. Install 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-metal
    • For 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.0
  4. Install PyTorch (currently CPU-only):

    Terminal Session

    [~user] > pip install torch torchvision
  5. Install PeekingDuck and verify installation:

    Terminal Session

    [~user] > pip install peekingduck --no-dependencies
    [~user] > peekingduck verify-install

    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 (taken from here) with bounding boxes overlaid as shown below:

../_images/verify_install.gif
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.