mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
I WISH I HAD SOME TESTS THOUGH
This commit is contained in:
@ -7,11 +7,12 @@ import sys, os
|
||||
sys.path.append(os.path.join(os.getcwd(),'python/'))
|
||||
|
||||
import darknet as dn
|
||||
import pdb
|
||||
|
||||
dn.set_gpu(0)
|
||||
net = dn.load_net("cfg/tiny-yolo.cfg", "tiny-yolo.weights", 0)
|
||||
meta = dn.load_meta("cfg/coco.data")
|
||||
r = dn.detect(net, meta, "data/dog.jpg")
|
||||
net = dn.load_net("cfg/yolo-thor.cfg", "/home/pjreddie/backup/yolo-thor_final.weights", 0)
|
||||
meta = dn.load_meta("cfg/thor.data")
|
||||
r = dn.detect(net, meta, "data/bedroom.jpg")
|
||||
print r
|
||||
|
||||
# And then down here you could detect a lot more images like:
|
||||
|
@ -62,7 +62,7 @@ void optimize_picture(network *net, image orig, int max_layer, float scale, floa
|
||||
cuda_free(net->delta_gpu);
|
||||
net->delta_gpu = 0;
|
||||
#else
|
||||
net->input = im.data;
|
||||
copy_cpu(net->inputs, im.data, 1, net->input, 1);
|
||||
net->delta = delta.data;
|
||||
forward_network(net);
|
||||
copy_cpu(last.outputs, last.output, 1, last.delta, 1);
|
||||
|
Reference in New Issue
Block a user