local changes

This commit is contained in:
Daniel Gordon 2017-11-07 16:27:06 -08:00
parent c725270342
commit 98b363a84b
4 changed files with 23 additions and 17 deletions

3
.gitignore vendored
View File

@ -25,3 +25,6 @@ ehthumbs.db
Icon?
Thumbs.db
*.swp
*.weights
*.a
*.so

View File

@ -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 \

View File

@ -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

View File

@ -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)