#pragma once#include <iostream>#include <vector>#include <string>#include <filesystem>namespacePaddleSolution{namespaceutils{inlinestd::stringpath_join(conststd::string&dir,conststd::string&path){std::stringseperator="/";#ifdef _WIN32seperator="\\";#endifreturndir+seperator+path;}// scan a directory and get all files with input extensionsinlinestd::vector<std::string>get_directory_images(conststd::string&path,conststd::string&exts){std::vector<std::string>imgs;for(constauto&item:std::experimental::filesystem::directory_iterator(path)){autosuffix=item.path().extension().string();if(exts.find(suffix)!=std::string::npos&&suffix.size()>0){autofullname=path_join(path,item.path().filename().string());imgs.push_back(item.path().string());}}returnimgs;}}}