mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
merged
This commit is contained in:
parent
ffa8c699a8
commit
6fc177fa5c
@ -13,7 +13,7 @@ def sample(probs):
|
|||||||
return len(probs)-1
|
return len(probs)-1
|
||||||
|
|
||||||
def c_array(ctype, values):
|
def c_array(ctype, values):
|
||||||
arr = (ctype * len(values))()
|
arr = (ctype*len(values))()
|
||||||
arr[:] = values
|
arr[:] = values
|
||||||
return arr
|
return arr
|
||||||
|
|
||||||
@ -153,4 +153,6 @@ if __name__ == "__main__":
|
|||||||
net = load_net("cfg/tiny-yolo.cfg", "tiny-yolo.weights", 0)
|
net = load_net("cfg/tiny-yolo.cfg", "tiny-yolo.weights", 0)
|
||||||
meta = load_meta("cfg/coco.data")
|
meta = load_meta("cfg/coco.data")
|
||||||
r = detect(net, meta, "data/dog.jpg")
|
r = detect(net, meta, "data/dog.jpg")
|
||||||
print r
|
print(r)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user