static L> runYolo(File image) { ret runYolo(f2s(image)); } static L> runYolo(S imagePath) { File yoloPath = homeFile("dev/darknet"); //set backtick_keepScript; S result = backtick_raw(print("cd " + bashQuote(yoloPath) + " && ./darknet detector test cfg/voc.data cfg/tiny-yolo-voc.cfg tiny-yolo-voc.weights " + bashQuote(imagePath))); //pnl(result); new L> out; new Matches m; for (S line : lines(result)) if (regexpMatchGroups("(\\w+):\\s*(\\d+)%", line, m)) out.add(pair(m.get(0), parseInt(m.get(1)))); ret out; }