static L<Pair<S, Int>> runYolo(File image) { ret runYolo(f2s(image)); } static L<Pair<S, Int>> 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<Pair<S, Int>> 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; }
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, iveijnkanddl, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1013256 |
Snippet name: | runYolo |
Eternal ID of this version: | #1013256/4 |
Text MD5: | 908dae69d3ce0d86b6fd6f36231ff957 |
Author: | stefan |
Category: | javax / image recognition |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-02 23:16:36 |
Source code size: | 597 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 452 / 479 |
Version history: | 3 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |