// STEP 2 private void MakeImageQueueFileFromFolder_Task() { String CWD = Path.Combine(Properties.Settings.Default.ProjectDir, "ImageBatch"); CmdProcess Proc = new CmdProcess(CWD); Proc.AddToQueue("dir /s/b *.jpg > ImageQueue.txt"); Proc.Execute(); Proc.Dispose(); }
private void TagImages_AlwaysShow_Task(List <String> ImageList, String ImageOutputPath = "ImageTag", String DataOutputPath = "ImageData") { String DarknetDir = Properties.Settings.Default.Darknet_Path; String WorkspaceDir = Properties.Settings.Default.ProjectDir; CmdProcess Proc = new CmdProcess(DarknetDir); foreach (String str in ImageList) { // Section to copy over image String ImageCopyStartPath = Path.Combine(DarknetDir, "predictions.jpg"); String ImageCopyEndPath = Path.Combine(WorkspaceDir, ImageOutputPath, Path.GetFileName(str)); String ResultFileEndPath = Path.Combine(WorkspaceDir, DataOutputPath, Path.GetFileName(str) + ".json"); Proc.AddToQueue(@"darknet.exe detector test cfg/coco.data cfg/yolov3.cfg weights/yolov3.weights -ext_output -out " + ResultFileEndPath + " " + str); Proc.QueueCopy(ImageCopyStartPath, ImageCopyEndPath); } Proc.Execute(); Proc.Dispose(); }