Open leeping-ng opened 3 years ago
After installation I tried:
peekingduck init
then peekingduck run
. Got the following error:
❯ peekingduck run 2021-10-19 11:44:32 peekingduck.declarative_loader INFO: Successfully loaded run_config file. 2021-10-19 11:44:32 peekingduck.declarative_loader INFO: Initialising input.live node... 2021-10-19 11:44:34 peekingduck.pipeline.nodes.input.live INFO: Device resolution used: 1280 by 720 2021-10-19 11:44:34 peekingduck.declarative_loader INFO: Initialising model.yolo node... 2021-10-19 11:44:35 peekingduck.pipeline.nodes.model.yolov4.yolo_files.detector INFO: Yolo model loaded with following configs: Model type: v4tiny, Input resolution: 416, IDs being detected: [0] Max Detections per class: 50, Max Total Detections: 50, IOU threshold: 0.5, Score threshold: 0.2 Metal device set to: Apple M1
systemMemory: 16.00 GB maxCacheSize: 5.33 GB
2021-10-19 11:44:36 peekingduck.declarative_loader INFO: Initialising draw.bbox node... 2021-10-19 11:44:36 peekingduck.declarative_loader INFO: Initialising output.screen node... /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShaders/MetalPerformanceShaders-124.2.1/MPSNDArray/Kernels/MPSNDArrayMultiaryKernel.mm:833: failed assertion `Error: Invalid KernelDAG, inputArray.dataType == DAG->_placeholderOps->at(i)->_outputs->at(0)->_dType (i = 0) failed' [1] 63447 abort peekingduck run
Hmm... interesting. I've never seen this error before. I also checked and don't have the /AppleInternal folder. My ~/Library/Caches also don't have com.apple.xbs. This is confounding... Looks like we need more test samples for M1 Mac installs.
PeekingDuck M1 Mac Installation for macOS Monterey/Big Sur (update 2022-03-02)
Prerequisites
brew install miniforge
Setup Conda Environment
conda create -n pkd python=3.8
conda activate pkd
conda install click colorama opencv openblas pyyaml requests scipy shapely tqdm
Install Tensorflow (macOS Monterey)
conda install -c apple tensorflow-deps==2.7.0
pip install tensorflow-estimator==2.7.0 tensorflow-macos==2.7.0 tensorflow-metal==0.3.0
Install Tensorflow (macOS Big Sur)
conda install -c apple tensorflow-deps==2.6.0
pip install tensorflow-estimator==2.6.0 tensorflow-macos==2.6.0 tensorflow-metal==0.2.0
Install PyTorch (currently CPU-only)
pip install torch torchvision
Install PeekingDuck
pip install peekingduck --no-dependencies
Notes:
conda install
to pip install
when installing a new package. Use pip only if the package is unavailable on conda, or the conda package is incompatible with existing ones.For the latest updates, please see https://peekingduck.readthedocs.io/en/stable/getting_started/03_custom_install.html#apple-silicon-mac
Please see updated instructions below.