def __init__(self): self.__appConfigSingleton = AppConfigSingleton() self.__visDetctRstSingleton = VisionDetecedSingleton() self.__ItemControlRefList = [] for info in self.__appConfigSingleton.sessionContentList: self.__ItemControlRefList.append(ItemControlRef(info[0], int(info[1])))
def __init__(self): super(VisionDetectionModel, self).__init__() self.daemon = True self.__appConfigSingleton = AppConfigSingleton() self.__visDetctRstSingleton = VisionDetecedSingleton() self.netMain = darknet.load_net_custom( self.__appConfigSingleton.yoloConfigPath.encode("ascii"), self.__appConfigSingleton.yoloWeightPath.encode("ascii"), 0, 1) self.metaMain = darknet.load_meta( self.__appConfigSingleton.yoloMetaPath.encode("ascii")) #camera open and configuration self.cap = cv2.VideoCapture(0) #self.cap = cv2.VideoCapture("MODEL/yolo/test.mp4") #self.cap = cv2.VideoCapture("MODEL/yolo/test.webm") self.cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1920) self.cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 1080) self.cap.set(cv2.CAP_PROP_FPS, 30) self.cap.set(cv2.CAP_PROP_FOURCC, cv2.VideoWriter.fourcc('M', 'J', 'P', 'G')) # Create an image we reuse for each detect self.darknet_image = darknet.make_image( darknet.network_width(self.netMain), darknet.network_height(self.netMain), 3) self.__stopFlg = False self.__pauseFlg = True
def __init__(self, parent, view=None, model=None): super(MainController, self).__init__(parent=parent) self.__circleTime = 0 self.__appConfig = AppConfigSingleton() self.__pView = ProcessingView(self.parent_view, self) self.__vView = ValidationView(self.parent_view, self) self.set_view(self.__vView) self.__vModel = VisionDetectionModel() self.__vModel.register_observer(self) self.__sModel = StateMachineModel() self.__sModel.register_observer(self)
def __init__(self): super(StateMachineModel, self).__init__() self.daemon = True self._lock = threading.RLock() self.__fidInputString = "None" self.__errorMessage = "None" self.__States = APPSTUS.SESSION_STOPED self.__itemStatusMap = {} self.__stopFlg = False self.__appConfigSingleton = AppConfigSingleton() self.__sessionStates = SessionStoped() for item in self.__appConfigSingleton.sessionContentList: self.__itemStatusMap[item[0]] = CheckItemRef( item[0], const.ITEM_RESET_COLOR)
def __init__(self, parent, controller): super(ValidationView, self).__init__(parent, controller) self.__appConfig = AppConfigSingleton() self.__entryWidgetList = []
def __init__(self, parent, controller): super(ProcessingView, self).__init__(parent, controller) self.__appConfig = AppConfigSingleton() self.__checkItemColorBuf = {}
def __init__(self): SessionStates.__init__(self) self.__appConfigSingleton = AppConfigSingleton() pass