From 0ee4ff36b219f6ae45fee38633a44db509357149 Mon Sep 17 00:00:00 2001 From: Stefano Sinigardi Date: Wed, 14 Apr 2021 15:19:06 +0200 Subject: [PATCH] download weights using a local script, do not rely on vcpkg --- scripts/download_weights.ps1 | 37 ++++++++++++++++++++++++++++++++++++ scripts/setup.ps1 | 2 +- scripts/setup.sh | 4 ++-- 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100755 scripts/download_weights.ps1 diff --git a/scripts/download_weights.ps1 b/scripts/download_weights.ps1 new file mode 100755 index 00000000..bc352606 --- /dev/null +++ b/scripts/download_weights.ps1 @@ -0,0 +1,37 @@ +#!/usr/bin/env pwsh + +$url = "https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights" +Invoke-WebRequest -Uri $url -OutFile "yolov4-tiny.weights" + +$url = "https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights" +Invoke-WebRequest -Uri $url -OutFile "yolov4.weights" + +$url = "https://drive.google.com/u/0/uc?id=18yYZWyKbo4XSDVyztmsEcF9B_6bxrhUY&export=download" +Invoke-WebRequest -Uri $url -OutFile "yolov3-tiny-prn.weights" + +$url = "https://pjreddie.com/media/files/yolov3.weights" +Invoke-WebRequest -Uri $url -OutFile "yolov3.weights" + +$url = "https://pjreddie.com/media/files/yolov3-openimages.weights" +Invoke-WebRequest -Uri $url -OutFile "yolov3-openimages.weights" + +$url = "https://pjreddie.com/media/files/yolov2.weights" +Invoke-WebRequest -Uri $url -OutFile "yolov2.weights" + +$url = "https://pjreddie.com/media/files/yolov3-tiny.weights" +Invoke-WebRequest -Uri $url -OutFile "yolov3-tiny.weights" + +$url = "https://pjreddie.com/media/files/yolov2-tiny.weights" +Invoke-WebRequest -Uri $url -OutFile "yolov2-tiny.weights" + +$url = "https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.conv.29" +Invoke-WebRequest -Uri $url -OutFile "yolov4-tiny.conv.29" + +$url = "https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.conv.137" +Invoke-WebRequest -Uri $url -OutFile "yolov4.conv.137" + +$url = "https://pjreddie.com/media/files/darknet53.conv.74" +Invoke-WebRequest -Uri $url -OutFile "darknet53.conv.74" + +$url = "https://pjreddie.com/media/files/darknet19_448.conv.23" +Invoke-WebRequest -Uri $url -OutFile "darknet19_448.conv.23" diff --git a/scripts/setup.ps1 b/scripts/setup.ps1 index acc29458..b846bab1 100755 --- a/scripts/setup.ps1 +++ b/scripts/setup.ps1 @@ -22,7 +22,7 @@ else { $features = "full" } else{ - $features = "opencv-base,weights,weights-train" + $features = "opencv-base" } } diff --git a/scripts/setup.sh b/scripts/setup.sh index f0970907..12a769b8 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -55,14 +55,14 @@ if [ "$install_cuda" = true ] ; then features="full" else echo "Unable to auto-install CUDA on this Linux OS" - features="opencv-base,weights,weights-train" + features="opencv-base" fi fi else if [[ -v CUDA_PATH ]]; then features="full" else - features="opencv-base,weights,weights-train" + features="opencv-base" fi fi