forked from pjreddie/darknet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
output filename changed | node controlled darknet script
- Loading branch information
1 parent
96f08de
commit 55815a7
Showing
7 changed files
with
2,771 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
GPU=0 | ||
CUDNN=0 | ||
GPU=1 | ||
CUDNN=1 | ||
CUDNN_HALF=0 | ||
OPENCV=0 | ||
OPENCV=1 | ||
AVX=0 | ||
OPENMP=0 | ||
LIBSO=0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const { spawn } = require('child_process'); | ||
|
||
const darknet = spawn( | ||
'./darknet', | ||
[ | ||
'detector', | ||
'test', | ||
'cfg/coco.data', | ||
'yolov4-csp.cfg', | ||
'yolov4-csp.weights', | ||
'-ext_output', | ||
'-dont_show' | ||
] | ||
); | ||
|
||
const images = ['dog.jpg', 'eagle.jpg', 'giraffe.jpg', 'horses.jpg', 'person.jpg', 'scream.jpg'] | ||
|
||
darknet.stdout.on('data', (data) => { | ||
let output = data.toString(); | ||
console.log(output); | ||
if (output.includes('Enter Image Path:')) { | ||
const image = images.pop(); | ||
if (image === undefined) { | ||
darknet.kill(); | ||
} | ||
darknet.stdin.write(`data/${image}\n`); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.