shuffle image to remove biases
This commit is contained in:
parent
0812c3cb97
commit
5bc941d491
6
main.cpp
6
main.cpp
@ -1,5 +1,6 @@
|
||||
#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))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user