mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
local changes
This commit is contained in:
parent
c725270342
commit
98b363a84b
3
.gitignore
vendored
3
.gitignore
vendored
@ -25,3 +25,6 @@ ehthumbs.db
|
||||
Icon?
|
||||
Thumbs.db
|
||||
*.swp
|
||||
*.weights
|
||||
*.a
|
||||
*.so
|
||||
|
8
Makefile
8
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 \
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user