blob: d985942c2d99b825eba3aeef0c1505dbb4f0b55d [file] [log] [blame]
#!/bin/bash
#readonly VIDEO_FILE=""
readonly TEST_DATA="$(python3 -c 'import edgetpu; import os; print(os.path.dirname(edgetpu.__file__))')/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