| | |
| | | if(weightfile){ |
| | | load_weights(&net, weightfile); |
| | | } |
| | | detection_layer layer = get_network_detection_layer(net); |
| | | int imgs = 128; |
| | | int i = *net.seen/imgs; |
| | | |
| | |
| | | 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)); |
| | |
| | | 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); |