Example #1
0
class YOLOV2:
    
    def __init__(self):
        options = {"model": "/root/object_detection/yolo2/cfg/yolov2-tiny.cfg", 
                   "load": "/root/object_detection/yolo2/weights/yolov2-tiny.weights", 
                   "threshold": float(os.environ['YOLO_THRESHOLD']),
                   "gpu" : float(os.environ['GPU_MEMORY_FRACTION'])}
        self.tfnet = TFNet(options)

    def append_to_list(self, nparr):
 
        self.tfnet.append_to_list(nparr)

    def inference(self):

        result = self.tfnet.detection()
        
        return result