##YoloV3の動画での検知結果を出力。別アプリにて取得したいと考えています。
####あるサイトでYoloV3のコマンドの引数でoutとかjsonなんとかというような物を見たのですが、動作しません。
####以下の処理を試してみました。最初にdarknetを起動するバッチファイルを作成。
bat
1c: 2cd C:\darknet-master\build\darknet\x64 3darknet.exe detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights
####これをVS2017のc#デスクトップアプリケーションにて起動する処理を作成。
c#
1string command = @"c:\video.bat"; 2Process p = new Process(); 3p.StartInfo.FileName = command; // 実行するファイル 4p.StartInfo.CreateNoWindow = true; // コンソールを開かない 5p.StartInfo.UseShellExecute = false; // シェル機能を使用しない 6p.StartInfo.RedirectStandardOutput = true; // 標準出力をリダイレクト 7 8p.Start(); // アプリの実行開始 9 10string output = p.StandardOutput.ReadToEnd(); // 標準出力の読み取り 11output = output.Replace("\r\r\n", "\n"); // 改行コードの修正 12Console.WriteLine(output); // [出力]ウィンドウに出力 13 14
####実行したところ、以下の部分のところまでコンソール出力されていたのですが、後の肝心の検知結果が拾えない。opencvの画面は表示され正常に認識されています。現在この状況。
log
1CUDA-version: 10010 (10010), cuDNN: 7.5.0, CUDNN_HALF=1, GPU count: 1 2OpenCV version: 3.4.0 30 : compute_capability = 610, cudnn_half = 0, GPU: GeForce GTX 1060 3GB 4 layer filters size/strd(dil) input output 5 0 conv 32 3 x 3/ 1 416 x 416 x 3 -> 416 x 416 x 32 0.299 BF 6 1 conv 64 3 x 3/ 2 416 x 416 x 32 -> 208 x 208 x 64 1.595 BF 7 2 conv 32 1 x 1/ 1 208 x 208 x 64 -> 208 x 208 x 32 0.177 BF 8 9 10 11105 conv 255 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 255 0.353 BF 12106 yolo 13[yolo] params: iou loss: mse (2), iou_norm: 0.75, cls_norm: 1.00, scale_x_y: 1.00 14Total BFLOPS 65.879 15avg_outputs = 532444 16Allocate additional workspace_size = 52.43 MB 17Loading weights from yolov3.weights...Done! Loaded 107 layers from weights-file
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。