From 98b363a84bdf0902f621181ab6c81523bbaec0a4 Mon Sep 17 00:00:00 2001 From: Daniel Gordon Date: Tue, 7 Nov 2017 16:27:06 -0800 Subject: [PATCH] local changes --- .gitignore | 3 +++ Makefile | 8 ++++---- examples/detector.py | 27 +++++++++++++++------------ python/darknet.py | 2 +- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index bea19ff4..40b39e0c 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,6 @@ ehthumbs.db Icon? Thumbs.db *.swp +*.weights +*.a +*.so diff --git a/Makefile b/Makefile index 5f6f6e2d..22b40a85 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ -GPU=0 -CUDNN=0 -OPENCV=0 -OPENMP=0 +GPU=1 +CUDNN=1 +OPENCV=1 +OPENMP=1 DEBUG=0 ARCH= -gencode arch=compute_30,code=sm_30 \ diff --git a/examples/detector.py b/examples/detector.py index aa565d61..7ec86938 100644 --- a/examples/detector.py +++ b/examples/detector.py @@ -7,19 +7,22 @@ import sys, os sys.path.append(os.path.join(os.getcwd(),'python/')) import darknet as dn +import pdb -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") -print r +net = dn.load_net("cfg/yolo-tag.cfg", "yolo-tag_final.weights", 0) +meta = dn.load_meta("cfg/openimages.data") +pdb.set_trace() +rr = dn.detect(net, meta, 'data/dog.jpg') +print rr +pdb.set_trace() # And then down here you could detect a lot more images like: -r = dn.detect(net, meta, "data/eagle.jpg") -print r -r = dn.detect(net, meta, "data/giraffe.jpg") -print r -r = dn.detect(net, meta, "data/horses.jpg") -print r -r = dn.detect(net, meta, "data/person.jpg") -print r +rr = dn.detect(net, meta, "data/eagle.jpg") +print rr +rr = dn.detect(net, meta, "data/giraffe.jpg") +print rr +rr = dn.detect(net, meta, "data/horses.jpg") +print rr +rr = dn.detect(net, meta, "data/person.jpg") +print rr diff --git a/python/darknet.py b/python/darknet.py index c8ec9be5..4391525f 100644 --- a/python/darknet.py +++ b/python/darknet.py @@ -122,6 +122,6 @@ if __name__ == "__main__": net = load_net("cfg/tiny-yolo.cfg", "tiny-yolo.weights", 0) meta = load_meta("cfg/coco.data") r = detect(net, meta, "data/dog.jpg") - print r + print(r)