From 5bc941d49125e1e6d53c1520ce487fa6fc8defcc Mon Sep 17 00:00:00 2001
From: uvos <devnull@uvos.xyz>
Date: Fri, 20 Jan 2023 00:47:17 +0100
Subject: [PATCH] shuffle image to remove biases

---
 main.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/main.cpp b/main.cpp
index bb7047e..b54973c 100644
--- a/main.cpp
+++ b/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))
 	{
-- 
GitLab