mirror of https://github.com/AlexeyAB/darknet.git
Minor fixes
This commit is contained in:
parent
bd9989d29a
commit
4d9a2bdac6
2
Makefile
2
Makefile
|
@ -44,7 +44,7 @@ NVCC=nvcc
|
|||
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
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
#!/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
|
||||
|
|
@ -605,7 +605,7 @@ void validate_detector_map(char *datacfg, char *cfgfile, char *weightfile, float
|
|||
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];
|
||||
|
|
|
@ -555,6 +555,9 @@ void custom_get_region_detections(layer l, int w, int h, int net_w, int net_h, f
|
|||
|
||||
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)
|
||||
|
|
|
@ -11,6 +11,7 @@ void backward_yolo_layer(const layer l, network_state state);
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue