| #!/usr/bin/env bash |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| set -euo pipefail |
|
|
| |
| OMZ_BASE="https://storage.openvinotoolkit.org/repositories/open_model_zoo/2023.0/models_bin/1" |
|
|
| echo "--- Installing dependencies ---" |
| pip install -qU openvino opencv-python numpy |
|
|
| |
| |
| download_omz_model() { |
| local model="$1" |
| local precision="$2" |
| local dest="intel/${model}/${precision}" |
| mkdir -p "${dest}" |
| local ext |
| for ext in xml bin; do |
| if [[ ! -f "${dest}/${model}.${ext}" ]]; then |
| wget -q -O "${dest}/${model}.${ext}" \ |
| "${OMZ_BASE}/${model}/${precision}/${model}.${ext}" |
| fi |
| done |
| } |
|
|
| |
| echo "" |
| echo "This script will download:" |
| echo " - Model weights and/or sample files" |
| echo "" |
| read -p "Continue with downloads? (yes/no): " APPROVAL |
| if [[ "${APPROVAL}" != "yes" ]]; then |
| echo "Download cancelled by user." |
| exit 0 |
| fi |
| echo "" |
|
|
| echo "--- Downloading person-detection-retail-0013 (FP16) ---" |
| download_omz_model person-detection-retail-0013 FP16 |
| echo "Ready: person-detection-retail-0013" |
|
|
| echo "--- Downloading person-attributes-recognition-crossroad-0230 (FP16) ---" |
| download_omz_model person-attributes-recognition-crossroad-0230 FP16 |
| echo "Ready: person-attributes-recognition-crossroad-0230" |
|
|
| echo "--- Downloading sample retail-aisle video ---" |
| if [[ ! -f test_video.mp4 ]]; then |
| wget -q -O test_video.mp4 \ |
| "https://github.com/intel-iot-devkit/sample-videos/raw/master/store-aisle-detection.mp4" |
| echo "Downloaded: test_video.mp4" |
| else |
| echo "Already present: test_video.mp4" |
| fi |
|
|
| echo "--- Done ---" |
| echo "Detector : intel/person-detection-retail-0013/FP16/person-detection-retail-0013.xml" |
| echo "Attributes : intel/person-attributes-recognition-crossroad-0230/FP16/person-attributes-recognition-crossroad-0230.xml" |
| echo "Scene : test_video.mp4 (retail-aisle clip with shoppers of varied appearance)" |
|
|