blob: fbab807d0240dae2e266140b6e3e407bf70067f6 [file] [log] [blame]
#!/bin/bash
#readonly VIDEO_FILE=""
readonly EDGETPU_DIR=$(python3 -c 'import edgetpu; import os; print(os.path.dirname(edgetpu.__file__))')
readonly TEST_DATA_DIR="${EDGETPU_DIR}/test_data"
readonly TPU_MODEL_FILE="${TEST_DATA}/mobilenet_ssd_v2_coco_quant_postprocess_edgetpu.tflite"
readonly LABELS_FILE="${TEST_DATA}/coco_labels.txt"
if [ "$1" = "--device" ]; then
python3 -m edgetpuvision.detect \
--source "${VIDEO_FILE}" \
--model="${TPU_MODEL_FILE}" \
--labels="${LABELS_FILE}" \
--fullscreen
elif [ "$1" = "--stream" ]; then
python3 -m edgetpuvision.detect_server \
--source "${VIDEO_FILE}" \
--model="${TPU_MODEL_FILE}" \
--labels="${LABELS_FILE}"
else
echo "Run on-device inference:"
echo " $0 --device"
echo "Run streaming server:"
echo " $0 --stream"
fi