Skip to content
Snippets Groups Projects
Commit 5bc941d4 authored by uvos's avatar uvos
Browse files

shuffle image to remove biases

parent 0812c3cb
No related branches found
No related tags found
No related merge requests found
#include <iostream>
#include <filesystem>
#include <algorithm>
#include <opencv2/highgui.hpp>
static constexpr char OUTPUT_DIR[] = "./out";
......@@ -48,6 +49,11 @@ int main(int argc, char** argv)
return 1;
}
std::random_shuffle(images.begin(), images.end());
for(const std::filesystem::path& path : images)
std::cout<<"Found: "<<path.filename()<<'\n';
std::filesystem::path outDirPath(OUTPUT_DIR);
if(!std::filesystem::is_directory(outDirPath) && !std::filesystem::create_directory(outDirPath))
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment