download_vgg.cmake 1.1 KB

123456789101112131415161718192021222324252627282930
  1. function(download_vgg_descriptors dst_dir status_var)
  2. set(OPENCV_3RDPARTY_COMMIT "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d")
  3. set(ids VGG_48 VGG_64 VGG_80 VGG_120)
  4. set(name_VGG_48 "vgg_generated_48.i")
  5. set(name_VGG_64 "vgg_generated_64.i")
  6. set(name_VGG_80 "vgg_generated_80.i")
  7. set(name_VGG_120 "vgg_generated_120.i")
  8. set(hash_VGG_48 "e8d0dcd54d1bcfdc29203d011a797179")
  9. set(hash_VGG_64 "7126a5d9a8884ebca5aea5d63d677225")
  10. set(hash_VGG_80 "7cd47228edec52b6d82f46511af325c5")
  11. set(hash_VGG_120 "151805e03568c9f490a5e3a872777b75")
  12. set(${status_var} TRUE PARENT_SCOPE)
  13. foreach(id ${ids})
  14. ocv_download(FILENAME ${name_${id}}
  15. HASH ${hash_${id}}
  16. URL
  17. "${OPENCV_VGGDESC_URL}"
  18. "$ENV{OPENCV_VGGDESC_URL}"
  19. "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${OPENCV_3RDPARTY_COMMIT}/"
  20. DESTINATION_DIR "${dst_dir}"
  21. ID "xfeatures2d/vgg"
  22. RELATIVE_URL
  23. STATUS res)
  24. if(NOT res)
  25. set(${status_var} FALSE PARENT_SCOPE)
  26. endif()
  27. endforeach()
  28. endfunction()