Exemplo n.º 1
0
 def __init__(self, name='Document'):
   stdAPI.__init__(self, name)
   # create a mqtt client
   self.client = mqtt.Client()
   self.client.on_connect = self.on_connect
   self.client.connect("127.0.0.1", 1883, 60)
   self.client.loop_start()
Exemplo n.º 2
0
 def __init__(self, name='Capture'):
     stdAPI.__init__(self, name)
     self.filename = ''
     self.frame = []
     self.streams = []
     for i in range(10):
         sourceStr = 'sourceId' + str(i)
         if sourceStr in self.cfg.getConfig(self.name):
             if self.getCfgVal(sourceStr) != '':
                 self.streams.append(self.getCfgVal(sourceStr))
Exemplo n.º 3
0
        def __init__(self, name='Model'):
            stdAPI.__init__(self, name)
            #tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.INFO)

            # get TF logger
            log = logging.getLogger('tensorflow')
            log.setLevel(logging.DEBUG)

            # create formatter and add it to the handlers
            formatter = logging.Formatter(
                '%(asctime)s - %(name)s - %(levelname)s - %(message)s')

            # create file handler which logs even debug messages
            fh = logging.handlers.RotatingFileHandler(
                '../projects/' + self.project + '/logs/tensorflow.log', 'a',
                100000, 100)
            fh.setLevel(logging.DEBUG)
            fh.setFormatter(formatter)
            log.addHandler(fh)

            graphPb = '../common/frozen_models/frozen_' + self.getCfgVal(
                'modelName') + '.pb'
            applyai.log("loading frozen graph " + graphPb + " ...",
                        self.logname)
            self.graph = self.load_graph(graphPb)
            applyai.log("loaded frozen graph", self.logname)
            applyai.log("starting tf session ...", self.logname)
            self.session = tf.compat.v1.Session(graph=self.graph)
            applyai.log("started tf session", self.logname)

            self.inputTensor = self.graph.get_tensor_by_name(
                'prefix/image_tensor:0')
            self.y1 = self.graph.get_tensor_by_name('prefix/num_detections:0')
            self.y2 = self.graph.get_tensor_by_name('prefix/detection_boxes:0')
            self.y3 = self.graph.get_tensor_by_name(
                'prefix/detection_scores:0')
            self.y4 = self.graph.get_tensor_by_name(
                'prefix/detection_classes:0')

            self.counter = 1
Exemplo n.º 4
0
 def __init__(self, name='Measure'):
   stdAPI.__init__(self, name)
   self.svg = [] #pd.DataFrame(columns=['id','x1','y1','x2','y2','cx','cy'])
   self.moiId = 0
   self.scaleX = 1
   self.scaleY = 1
Exemplo n.º 5
0
 def __init__(self, name='Calibrate'):
     stdAPI.__init__(self, name)
     self.objpoints = list(self.getCfgVal('objPoints'))
     self.imgpoints = list(self.getCfgVal('imgPoints'))
Exemplo n.º 6
0
 def __init__(self, name='LinesHough'):
   stdAPI.__init__(self, name)
Exemplo n.º 7
0
 def __init__(self, name='FillHoles'):
     stdAPI.__init__(self, name)
Exemplo n.º 8
0
 def __init__(self, name='Classify'):
     stdAPI.__init__(self, name)
Exemplo n.º 9
0
 def __init__(self, name='Ocr'):
     stdAPI.__init__(self, name)
Exemplo n.º 10
0
 def __init__(self, name='Edges'):
     stdAPI.__init__(self, name)
Exemplo n.º 11
0
 def __init__(self, name='TemplateMatch'):
   stdAPI.__init__(self, name)
Exemplo n.º 12
0
 def __init__(self, name='IsolateThread'):
   stdAPI.__init__(self, name)
Exemplo n.º 13
0
 def __init__(self, name='Datamatrix'):
     stdAPI.__init__(self, name)
Exemplo n.º 14
0
 def __init__(self, name='Noise'):
     stdAPI.__init__(self, name)
Exemplo n.º 15
0
 def __init__(self, name='Flir'):
   stdAPI.__init__(self, name)
   applyai.log('in init CameraFeed', self.logname)
   applyai.engine.subscribe('newframe', self.updateFrame)
Exemplo n.º 16
0
 def __init__(self, name='Circles'):
     stdAPI.__init__(self, name)
Exemplo n.º 17
0
 def __init__(self, name='BBox'):
     stdAPI.__init__(self, name)
Exemplo n.º 18
0
 def __init__(self, name='FillGap'):
     stdAPI.__init__(self, name)
     applyai.log('in init', self.logname)
Exemplo n.º 19
0
 def __init__(self, name='Project'):
   stdAPI.__init__(self, name)
   self.lastParamsResp = {}
Exemplo n.º 20
0
 def __init__(self, name='System'):
     stdAPI.__init__(self, name)
Exemplo n.º 21
0
 def __init__(self, name='Calc'):
     stdAPI.__init__(self, name)
     self.cc = 0
Exemplo n.º 22
0
 def __init__(self, name='Color'):
   stdAPI.__init__(self, name)
Exemplo n.º 23
0
 def __init__(self, name='Top'):
     stdAPI.__init__(self, name)
Exemplo n.º 24
0
 def __init__(self, name='GripPos'):
     stdAPI.__init__(self, name)
Exemplo n.º 25
0
 def __init__(self, name='Mask'):
     stdAPI.__init__(self, name)
Exemplo n.º 26
0
 def __init__(self, name='Screws'):
     stdAPI.__init__(self, name)
Exemplo n.º 27
0
 def __init__(self, name='Pixel2mm'):
     stdAPI.__init__(self, name)