Skip to content

Commit

Permalink
feat: adds download of all or maximum precisions
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyluks committed Oct 8, 2020
1 parent 8cd7faf commit 50041f2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,10 @@ To run this project the following setup must be completed (tested on Ubuntu 16.0
```
python3 -m pip install -r requirements.txt
```
- Download the required model. Optionally other models could be used and replace them.
- Download the required model. Optionally other models could be used and replace them.
Use the ```--all_available_precisions``` flag to download all available precisions!
```
./download_models.sh
./download_models.sh --all_available_precisions
```
This creates a new directory ```models/``` and downloads the models (face-detection-adas-binary-0001, head-pose-estimation-adas-0001, landmarks-regression-retail-0009, gaze-estimation-adas-0002) in all available precisions into this new directory using the OpenVINO model downloader.
Expand Down
26 changes: 17 additions & 9 deletions download_models.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
echo "========== Creating output directory: models/"
echo "==================== Creating output directory: models/"
mkdir models/

echo "========== Models can be found in: $(pwd)/models/"
echo "==================== Models can be found in: $(pwd)/models/"



echo "========== Starting OpenVINO model download"
echo "==================== Starting OpenVINO model download"
# model downloader path variable
md_path="/opt/intel/openvino/deployment_tools/tools/model_downloader/downloader.py"

# download
python3 $md_path --name face-detection-adas-binary-0001 --output_dir models/
python3 $md_path --name head-pose-estimation-adas-0001 --output_dir models/
python3 $md_path --name landmarks-regression-retail-0009 --output_dir models/
python3 $md_path --name gaze-estimation-adas-0002 --output_dir models/

echo "========== [SUCCESS] Download finished"
if [ "$1" = "--all_available_precisions" ] ; then
echo "==================== Starting download of all available precisions"
python3 $md_path --name face-detection-adas-binary-0001 --output_dir models/
python3 $md_path --name head-pose-estimation-adas-0001 --output_dir models/
python3 $md_path --name landmarks-regression-retail-0009 --output_dir models/
python3 $md_path --name gaze-estimation-adas-0002 --output_dir models/
else
echo "==================== Starting download off maximum precisions"
python3 $md_path --name face-detection-adas-binary-0001 --output_dir models/ --precisions FP32-INT1
python3 $md_path --name head-pose-estimation-adas-0001 --output_dir models/ --precisions FP32
python3 $md_path --name landmarks-regression-retail-0009 --output_dir models/ --precisions FP32
python3 $md_path --name gaze-estimation-adas-0002 --output_dir models/ --precisions FP32
fi
echo "==================== [SUCCESS] Download finished"

0 comments on commit 50041f2

Please sign in to comment.