4 files modified
1 files added
| | |
| | | OPTS=-Ofast |
| | | LDFLAGS= -lm -pthread |
| | | COMMON= |
| | | CFLAGS=-Wall -Wfatal-errors -ffp-contract=fast -mavx |
| | | CFLAGS=-Wall -Wfatal-errors -Wno-unused-result -Wno-unknown-pragmas -ffp-contract=fast -mavx |
| | | |
| | | ifeq ($(DEBUG), 1) |
| | | OPTS=-O0 -g |
| New file |
| | |
| | | #!/bin/bash |
| | | |
| | | # Clone COCO API |
| | | git clone https://github.com/pdollar/coco |
| | | cd coco |
| | | |
| | | mkdir images |
| | | cd images |
| | | |
| | | # Download Images |
| | | wget -c https://pjreddie.com/media/files/train2014.zip |
| | | wget -c https://pjreddie.com/media/files/val2014.zip |
| | | |
| | | # Unzip |
| | | unzip -q train2014.zip |
| | | unzip -q val2014.zip |
| | | |
| | | cd .. |
| | | |
| | | # Download COCO Metadata |
| | | wget -c https://pjreddie.com/media/files/instances_train-val2014.zip |
| | | wget -c https://pjreddie.com/media/files/coco/5k.part |
| | | wget -c https://pjreddie.com/media/files/coco/trainvalno5k.part |
| | | wget -c https://pjreddie.com/media/files/coco/labels.tgz |
| | | tar xzf labels.tgz |
| | | unzip -q instances_train-val2014.zip |
| | | |
| | | # Set Up Image Lists |
| | | paste <(awk "{print \"$PWD\"}" <5k.part) 5k.part | tr -d '\t' > 5k.txt |
| | | paste <(awk "{print \"$PWD\"}" <trainvalno5k.part) trainvalno5k.part | tr -d '\t' > trainvalno5k.txt |
| | | |
| | |
| | | int nboxes = 0; |
| | | int letterbox = (args.type == LETTERBOX_DATA); |
| | | float hier_thresh = 0; |
| | | detection *dets = get_network_boxes(&net, 1, 1, thresh, hier_thresh, 0, 1, &nboxes, letterbox); |
| | | detection *dets = get_network_boxes(&net, 1, 1, thresh, hier_thresh, 0, 0, &nboxes, letterbox); |
| | | if (nms) do_nms_sort_v3(dets, nboxes, l.classes, nms); |
| | | |
| | | char labelpath[4096]; |
| | |
| | | |
| | | free(boxes); |
| | | free_ptrs((void **)probs, l.w*l.h*l.n); |
| | | |
| | | //correct_region_boxes(dets, l.w*l.h*l.n, w, h, net_w, net_h, relative); |
| | | correct_yolo_boxes(dets, l.w*l.h*l.n, w, h, net_w, net_h, relative, letter); |
| | | } |
| | | |
| | | void fill_network_boxes(network *net, int w, int h, float thresh, float hier, int *map, int relative, detection *dets, int letter) |
| | |
| | | void resize_yolo_layer(layer *l, int w, int h); |
| | | int yolo_num_detections(layer l, float thresh); |
| | | int get_yolo_detections(layer l, int w, int h, int netw, int neth, float thresh, int *map, int relative, detection *dets, int letter); |
| | | void correct_yolo_boxes(detection *dets, int n, int w, int h, int netw, int neth, int relative, int letter); |
| | | |
| | | #ifdef GPU |
| | | void forward_yolo_layer_gpu(const layer l, network_state state); |