-
Notifications
You must be signed in to change notification settings - Fork 1
/
yolor.py
37 lines (25 loc) · 939 Bytes
/
yolor.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import multirpocessing as mp
from yolov3 import YOLOV3
class consumer:
def __init__(self, inqueue, outqueue):
self.inqueue = inqueue
self.outqueue = outqueue
def run(self):
proc_name = self.name
print("Process for yolor: {}".format(proc_name))
while True:
fmr_data = self.inqueue.get()
if fmr_data is None:
print("Exiting stream in {}".format(proc_naem))
break
yolo_data = yv3detector(fmr_data)
self.outqueue.put((fmr_data, yolo_data),)
return
def yv3detector():
pass
if __name__ == '__main__':
manager = mp.Manager()
streams = 2
framer_queues = [manager.Queue() for stream in range(streams)]
yolo_out_queues = [manager.Queue() for stream in range(streams)]
yolov3 = YOLOV3("cfg/yolo_2k_reanchored.cfg", "weights/yolo_2k_reanchored_70000.weights", "cfg/2k_aug.data")