Skip to content

Commit

Permalink
Merge pull request #57 from lilohuang/Fix-crash-on-detect-command
Browse files Browse the repository at this point in the history
Fix crash (SIGSEGV) on running ./darknet detect command
  • Loading branch information
pjreddie authored May 14, 2017
2 parents 40c9afa + 0701770 commit 2634051
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/darknet.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "connected_layer.h"

extern void predict_classifier(char *datacfg, char *cfgfile, char *weightfile, char *filename, int top);
extern void test_detector(char *datacfg, char *cfgfile, char *weightfile, char *filename, float thresh, float hier_thresh);
extern void test_detector(char *datacfg, char *cfgfile, char *weightfile, char *filename, float thresh, float hier_thresh, char *outfile, int fullscreen);
extern void run_voxel(int argc, char **argv);
extern void run_yolo(int argc, char **argv);
extern void run_detector(int argc, char **argv);
Expand Down Expand Up @@ -423,7 +423,9 @@ int main(int argc, char **argv)
} else if (0 == strcmp(argv[1], "detect")){
float thresh = find_float_arg(argc, argv, "-thresh", .24);
char *filename = (argc > 4) ? argv[4]: 0;
test_detector("cfg/coco.data", argv[2], argv[3], filename, thresh, .5);
char *outfile = find_char_arg(argc, argv, "-out", 0);
int fullscreen = find_arg(argc, argv, "-fullscreen");
test_detector("cfg/coco.data", argv[2], argv[3], filename, thresh, .5, outfile, fullscreen);
} else if (0 == strcmp(argv[1], "cifar")){
run_cifar(argc, argv);
} else if (0 == strcmp(argv[1], "go")){
Expand Down

0 comments on commit 2634051

Please sign in to comment.