Update module object object_detection

Change model path
This commit is contained in:
Diego Inácio
2020-02-12 15:12:27 -03:00
parent c30245e399
commit 3d5ffa6bdb

View File

@ -6,12 +6,12 @@ import numpy as np
class ObjectDetection: class ObjectDetection:
def __init__(self): def __init__(self):
self.MODEL = cv2.dnn.readNet( self.MODEL = cv2.dnn.readNet(
'model/yolov3.weights', 'models/yolov3.weights',
'model/yolov3.cfg' 'models/yolov3.cfg'
) )
self.CLASSES = [] self.CLASSES = []
with open("model/coco.names", "r") as f: with open("models/coco.names", "r") as f:
self.CLASSES = [line.strip() for line in f.readlines()] self.CLASSES = [line.strip() for line in f.readlines()]
self.OUTPUT_LAYERS = [self.MODEL.getLayerNames()[i[0] - 1] for i in self.MODEL.getUnconnectedOutLayers()] self.OUTPUT_LAYERS = [self.MODEL.getLayerNames()[i[0] - 1] for i in self.MODEL.getUnconnectedOutLayers()]