deephealthproject / ecvl

European Computer Vision Library (ECVL). A general-purpose computer vision library developed to support healthcare use cases within the DeepHealth project, with the aim of facilitating the integration of existing state-of-the-art libraries.
https://deephealthproject.github.io/ecvl
MIT License
17 stars 1 forks source link

Can't get dataset split by SplitType #35

Closed simleo closed 3 years ago

simleo commented 3 years ago

Change:

diff --git a/examples/example_dataset_generator.cpp b/examples/example_dataset_generator.cpp
index 57d4a5b..8f3d7bc 100644
--- a/examples/example_dataset_generator.cpp
+++ b/examples/example_dataset_generator.cpp
@@ -45,7 +45,7 @@ int main()
     vector<int> mask;
     vector<int> black;

-    auto& training = d_segmentation.GetSplit("training");
+    auto& training = d_segmentation.GetSplit(SplitType::training);
     for (auto& sample_index : training) {
         if (d_segmentation.samples_[sample_index].label_path_.value().filename().compare("black.png") == 0) {
             black.emplace_back(sample_index);

Output:

terminate called after throwing an instance of 'std::runtime_error'
  what():  [Error]: This split does not exist in the dataset file
Aborted (core dumped)