run_resnet50_270.sh 851 B

123456789101112131415161718192021222324252627
  1. #! /bin/bash
  2. CURRENT_DIR=$(dirname $(readlink -f $0) )
  3. pushd $CURRENT_DIR
  4. mkdir -p cache
  5. # download 270 model and labels
  6. if [ ! -f "cache/resnet50_offline.cambricon" ]; then
  7. wget -O cache/resnet50_offline.cambricon http://video.cambricon.com/models/MLU270/Classification/resnet50/resnet50_offline.cambricon
  8. fi
  9. if [ ! -f "cache/synset_words.txt" ]; then
  10. wget -O cache/synset_words.txt http://video.cambricon.com/models/MLU270/Classification/resnet50/synset_words.txt
  11. fi
  12. model_file="${CURRENT_DIR}/cache/resnet50_offline.cambricon"
  13. label_path="${CURRENT_DIR}/cache/synset_words.txt"
  14. data_path="${CURRENT_DIR}/../data/videos/cars.mp4"
  15. ../bin/classification \
  16. --model_path $model_file \
  17. --label_path $label_path \
  18. --data_path $data_path \
  19. --show=false \
  20. --save_video=true \
  21. --wait_time 0 \
  22. --repeat_time 0
  23. popd