Skip to content

Commit afde79a

Browse files
jw098Gin890
authored andcommitted
bug fix: use image_folder_path instead of image_path.
1 parent f4176ac commit afde79a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SerialPrograms/Source/ML/Programs/ML_LabelImages.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,10 @@ void LabelImages::load_image_related_data(const std::string& image_path, size_t
181181

182182
// see if we can load the previously created labels
183183
const std::string anno_filename = std::filesystem::path(image_path).filename().replace_extension(".json").string();
184+
const std::string image_folder_path = std::filesystem::path(image_path).parent_path().string() + "/";
184185

185-
// ensure the folder exists
186186
// std::filesystem::create_directory(ML_ANNOTATION_PATH());
187-
m_annotation_file_path = image_path + anno_filename; // ML_ANNOTATION_PATH() + anno_filename;
187+
m_annotation_file_path = image_folder_path + anno_filename; // ML_ANNOTATION_PATH() + anno_filename;
188188
if (!std::filesystem::exists(m_annotation_file_path)){
189189
cout << "Annotataion output path, " << m_annotation_file_path << " does not exist yet" << endl;
190190
return;

0 commit comments

Comments
 (0)