Joseph Redmon
2016-03-14 68213b835b9f15cb449ad2037a8b51c17a3de07b
src/yolo.c
@@ -343,8 +343,10 @@
        printf("%s: Predicted in %f seconds.\n", input, sec(clock()-time));
        convert_yolo_detections(predictions, l.classes, l.n, l.sqrt, l.side, 1, 1, thresh, probs, boxes, 0);
        if (nms) do_nms_sort(boxes, probs, l.side*l.side*l.n, l.classes, nms);
        draw_detections(im, l.side*l.side*l.n, thresh, boxes, probs, voc_names, voc_labels, 20);
        //draw_detections(im, l.side*l.side*l.n, thresh, boxes, probs, voc_names, voc_labels, 20);
        draw_detections(im, l.side*l.side*l.n, thresh, boxes, probs, voc_names, 0, 20);
        show_image(im, "predictions");
        save_image(im, "predictions");
        show_image(sized, "resized");
        free_image(im);
@@ -393,13 +395,7 @@
#endif
 */
void demo_yolo(char *cfgfile, char *weightfile, float thresh, int cam_index);
#ifndef GPU
void demo_yolo(char *cfgfile, char *weightfile, float thresh, int cam_index)
{
    fprintf(stderr, "Darknet must be compiled with CUDA for YOLO demo.\n");
}
#endif
void demo_yolo(char *cfgfile, char *weightfile, float thresh, int cam_index, char *filename);
void run_yolo(int argc, char **argv)
{
@@ -424,5 +420,5 @@
    else if(0==strcmp(argv[2], "train")) train_yolo(cfg, weights);
    else if(0==strcmp(argv[2], "valid")) validate_yolo(cfg, weights);
    else if(0==strcmp(argv[2], "recall")) validate_yolo_recall(cfg, weights);
    else if(0==strcmp(argv[2], "demo")) demo_yolo(cfg, weights, thresh, cam_index);
    else if(0==strcmp(argv[2], "demo")) demo_yolo(cfg, weights, thresh, cam_index, filename);
}