diff --git a/.gitmodules b/.gitmodules index 221b57d02..e69de29bb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "lexci_models"] - path = lexci_models - url = git@github.com:astro-informatics/lexci_models.git diff --git a/cpp/tests/cppflow_model.cc b/cpp/tests/cppflow_model.cc index 21ad884f8..0db42537d 100644 --- a/cpp/tests/cppflow_model.cc +++ b/cpp/tests/cppflow_model.cc @@ -32,7 +32,7 @@ TEST_CASE("Cppflow Model"){ cppflow::tensor input_tensor = sopt::cppflowutils::convert_image_to_tensor(image, image_rows, image_cols); // Read in model - cppflow::model model(std::string(sopt::notinstalled::models_directory() + "/DnCNN/snr_15_model.pb/")); + cppflow::model model(std::string(sopt::notinstalled::models_directory() + "/snr_15_model.pb/")); // Run model on image // TODO: Automatically detect the string parameters, see issue #320 diff --git a/images/M31T.tiff b/cpp/tests/test_data/M31T.tiff similarity index 100% rename from images/M31T.tiff rename to cpp/tests/test_data/M31T.tiff diff --git a/images/cameraFS_Dirty.tiff b/cpp/tests/test_data/cameraFS_Dirty.tiff similarity index 100% rename from images/cameraFS_Dirty.tiff rename to cpp/tests/test_data/cameraFS_Dirty.tiff diff --git a/images/cameraFS_L1.tiff b/cpp/tests/test_data/cameraFS_L1.tiff similarity index 100% rename from images/cameraFS_L1.tiff rename to cpp/tests/test_data/cameraFS_L1.tiff diff --git a/images/cameraFS_SARA.tiff b/cpp/tests/test_data/cameraFS_SARA.tiff similarity index 100% rename from images/cameraFS_SARA.tiff rename to cpp/tests/test_data/cameraFS_SARA.tiff diff --git a/images/cameraFS_TV.tiff b/cpp/tests/test_data/cameraFS_TV.tiff similarity index 100% rename from images/cameraFS_TV.tiff rename to cpp/tests/test_data/cameraFS_TV.tiff diff --git a/images/cameraIP_Db8.tiff b/cpp/tests/test_data/cameraIP_Db8.tiff similarity index 100% rename from images/cameraIP_Db8.tiff rename to cpp/tests/test_data/cameraIP_Db8.tiff diff --git a/images/cameraIP_Dirty.tiff b/cpp/tests/test_data/cameraIP_Dirty.tiff similarity index 100% rename from images/cameraIP_Dirty.tiff rename to cpp/tests/test_data/cameraIP_Dirty.tiff diff --git a/images/cameraIP_SA.tiff b/cpp/tests/test_data/cameraIP_SA.tiff similarity index 100% rename from images/cameraIP_SA.tiff rename to cpp/tests/test_data/cameraIP_SA.tiff diff --git a/images/cameraIP_SARA.tiff b/cpp/tests/test_data/cameraIP_SARA.tiff similarity index 100% rename from images/cameraIP_SARA.tiff rename to cpp/tests/test_data/cameraIP_SARA.tiff diff --git a/images/cameraIP_TV.tiff b/cpp/tests/test_data/cameraIP_TV.tiff similarity index 100% rename from images/cameraIP_TV.tiff rename to cpp/tests/test_data/cameraIP_TV.tiff diff --git a/images/cameraman256.tiff b/cpp/tests/test_data/cameraman256.tiff similarity index 100% rename from images/cameraman256.tiff rename to cpp/tests/test_data/cameraman256.tiff diff --git a/images/logo.png b/cpp/tests/test_data/logo.png similarity index 100% rename from images/logo.png rename to cpp/tests/test_data/logo.png diff --git a/cpp/tests/test_data/snr_15_model.pb/saved_model.pb b/cpp/tests/test_data/snr_15_model.pb/saved_model.pb new file mode 100644 index 000000000..48c4f8030 Binary files /dev/null and b/cpp/tests/test_data/snr_15_model.pb/saved_model.pb differ diff --git a/cpp/tests/test_data/snr_15_model.pb/variables/variables.data-00000-of-00001 b/cpp/tests/test_data/snr_15_model.pb/variables/variables.data-00000-of-00001 new file mode 100644 index 000000000..51f90c200 Binary files /dev/null and b/cpp/tests/test_data/snr_15_model.pb/variables/variables.data-00000-of-00001 differ diff --git a/cpp/tests/test_data/snr_15_model.pb/variables/variables.index b/cpp/tests/test_data/snr_15_model.pb/variables/variables.index new file mode 100644 index 000000000..ad6f33e8a Binary files /dev/null and b/cpp/tests/test_data/snr_15_model.pb/variables/variables.index differ diff --git a/cpp/tests/tf_inpainting.cc b/cpp/tests/tf_inpainting.cc index 09b0f2868..e82e56dbf 100644 --- a/cpp/tests/tf_inpainting.cc +++ b/cpp/tests/tf_inpainting.cc @@ -31,7 +31,8 @@ using Image = sopt::Image; TEST_CASE("Inpainting"){ extern std::unique_ptr mersenne; std::string const input = "cameraman256"; - std::string const model_path = static_cast(sopt::notinstalled::models_directory() + "/DnCNN/snr_15_model.pb/"); + + std::string const model_path = std::string(sopt::notinstalled::models_directory() + "/snr_15_model.pb/"); Image const image = sopt::notinstalled::read_standard_tiff(input); diff --git a/cpp/tools_for_tests/directories.in.h b/cpp/tools_for_tests/directories.in.h index db024b5cc..8ebd8d9f4 100644 --- a/cpp/tools_for_tests/directories.in.h +++ b/cpp/tools_for_tests/directories.in.h @@ -6,10 +6,10 @@ namespace sopt::notinstalled { //! Holds images and such -inline std::string data_directory() { return "@PROJECT_SOURCE_DIR@/images"; } +inline std::string data_directory() { return "@PROJECT_SOURCE_DIR@/cpp/tests/test_data"; } //! Output artefacts from tests inline std::string output_directory() { return "@PROJECT_BINARY_DIR@/outputs"; } //! Tensorflow models -inline std::string models_directory() { return "@PROJECT_SOURCE_DIR@/lexci_models"; } +inline std::string models_directory() { return "@PROJECT_SOURCE_DIR@/cpp/tests/test_data"; } } // namespace sopt::notinstalled #endif diff --git a/lexci_models b/lexci_models deleted file mode 160000 index eada5efae..000000000 --- a/lexci_models +++ /dev/null @@ -1 +0,0 @@ -Subproject commit eada5efae3ac45d973c476796b750ad571f88adf