Joseph Redmon
2015-10-09 c40cdeb4021fc1a638969563972f13c9f5e90d74
src/yolo.c
@@ -65,7 +65,6 @@
    if(weightfile){
        load_weights(&net, weightfile);
    }
    detection_layer layer = get_network_detection_layer(net);
    int imgs = 128;
    int i = *net.seen/imgs;
@@ -74,11 +73,16 @@
    int N = plist->size;
    paths = (char **)list_to_array(plist);
    if(i*imgs > N*80){
        net.layers[net.n-1].objectness = 0;
        net.layers[net.n-1].joint = 1;
    }
    if(i*imgs > N*120){
        net.layers[net.n-1].rescore = 1;
    }
    data train, buffer;
    detection_layer layer = get_network_detection_layer(net);
    int classes = layer.classes;
    int background = layer.objectness;
    int side = sqrt(get_detection_layer_locations(layer));
@@ -290,14 +294,16 @@
    set_batch_network(&net, 1);
    srand(2222222);
    clock_t time;
    char input[256];
    char buff[256];
    char *input = buff;
    while(1){
        if(filename){
            strncpy(input, filename, 256);
        } else {
            printf("Enter Image Path: ");
            fflush(stdout);
            fgets(input, 256, stdin);
            input = fgets(input, 256, stdin);
            if(!input) return;
            strtok(input, "\n");
        }
        image im = load_image_color(input,0,0);