File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 1- # Download models used in tests
2- # (this is disabled unless VISP_TESTS is enabled)
1+ # Download models used in tests (happens only if VISP_TESTS is enabled)
32
43message (STATUS "Checking for models/MobileSAM-F16.gguf" )
54file (DOWNLOAD
@@ -22,4 +21,10 @@ file(DOWNLOAD
2221 EXPECTED_HASH "SHA256=c9f241e96fb5a791f9494fc7d4c2dd793297ae95f05b8423f547d19bea465b81"
2322 SHOW_PROGRESS
2423)
25- # TODO: ESRGAN
24+ message (STATUS "Checking for models/RealESRGAN-x4plus_anime-6B-F16.gguf" )
25+ file (DOWNLOAD
26+ "https://huggingface.co/Acly/Real-ESRGAN-GGUF/resolve/main/RealESRGAN-x4plus_anime-6B-F16.gguf"
27+ ${CMAKE_CURRENT_LIST_DIR} /RealESRGAN-x4plus_anime-6B-F16.gguf
28+ EXPECTED_HASH "SHA256=b741e68720d7ad6251dee2120bf7579ef816ea16da18299b39f6cbcb0e13ecf0"
29+ SHOW_PROGRESS
30+ )
Original file line number Diff line number Diff line change 11#include " util/string.hpp"
22#include " visp/vision.hpp"
33
4-
54#include " testing.hpp"
65
76namespace visp {
@@ -48,7 +47,8 @@ VISP_BACKEND_TEST(test_birefnet)(backend_type bt) {
4847 image_data input = image_load (input_path.string ().c_str ());
4948 image_data output = birefnet_compute (model, input);
5049
51- compare_images (name, output);
50+ float tolerance = bt == backend_type::cpu ? 0 .01f : 0 .3f ; // TODO: GPU is non-deterministic
51+ compare_images (name, output, tolerance);
5252}
5353
5454VISP_BACKEND_TEST (test_migan)(backend_type bt) {
@@ -69,7 +69,7 @@ VISP_BACKEND_TEST(test_migan)(backend_type bt) {
6969}
7070
7171VISP_BACKEND_TEST (test_esrgan)(backend_type bt) {
72- path model_path = test_dir ().models / " RealESRGAN_x4plus_anime_6Bh .gguf" ;
72+ path model_path = test_dir ().models / " RealESRGAN-x4plus_anime-6B-F16 .gguf" ;
7373 path input_path = test_dir ().input / " vase-and-bowl.jpg" ;
7474 std::string name = " esrgan" ;
7575 name += bt == backend_type::cpu ? " -cpu.png" : " -gpu.png" ;
You can’t perform that action at this time.
0 commit comments