removing changes for pull request, but those files don't work well anymore anyways

This commit is contained in:
Daniel Gordon
2018-03-15 18:21:21 -07:00
parent 2e251da027
commit 1d37c74824
3 changed files with 15 additions and 22 deletions

1
.gitignore vendored
View File

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

View File

@@ -38,23 +38,18 @@ import darknet as dn
# Darknet
net = dn.load_net("cfg/tiny-yolo.cfg", "tiny-yolo.weights", 0)
meta = dn.load_meta("cfg/coco.data")
import time
tStart = time.time()
for i in range(10):
r = dn.detect(net, meta, "data/dog.jpg")
print(time.time() - tStart)
r = dn.detect(net, meta, "data/dog.jpg")
print(r)
# scipy
arr= imread('data/dog.jpg')
tStart = time.time()
for i in range(10):
r = dn.detect(net, meta, arr)
print(time.time() - tStart)
im = array_to_image(arr)
r = detect2(net, meta, im)
print(r)
# OpenCV
arr = cv2.imread('data/dog.jpg')
im = array_to_image(arr)
dn.rgbgr_image(im)
r = detect2(net, meta, im)
print r
print(r)

View File

@@ -13,15 +13,14 @@ dn.set_gpu(0)
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
print(r)
# And then down here you could detect a lot more images like:
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
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)