Ejemplo n.º 1
0
def connect(sensor, location, uri, algorithm, algorithmName, resolution,
            zonemap):
    global runva

    try:
        rec2db = Rec2DB(sensor)
        rec2db.start()

        runva = RunVA("crowd_counting")
        runva.loop(
            sensor, location, uri, algorithm, algorithmName, {
                "crowd_count": {
                    "width": resolution["width"],
                    "height": resolution["height"],
                    "zonemap": zonemap,
                },
            })

        print("rec2db stop", flush=True)
        rec2db.stop()
        print("rec2db stopped", flush=True)
        raise Exception("VA exited. This should not happen.")

    except:
        print(traceback.format_exc(), flush=True)
    print("connect stopped", flush=True)
Ejemplo n.º 2
0
def connect(sensor, location, uri, algorithm, algorithmName):
    try:
        rec2db = Rec2DB(sensor)
        rec2db.start()

        runva = RunVA("object_detection", version, stop=stop)
        runva.loop(sensor, location, uri, algorithm, algorithmName)

        rec2db.stop()
        raise Exception("VA exited. This should not happen.")

    except:
        print(traceback.format_exc(), flush=True)
Ejemplo n.º 3
0
def connect(sensor, location, uri, algorithm, algorithmName):
    global runva

    try:
        rec2db=Rec2DB(sensor)
        rec2db.start()

        runva=RunVA("entrance_counting", stop=stop)
        runva.loop(sensor, location, uri, algorithm, algorithmName)

        rec2db.stop()
        raise Exception("VA exited. This should not happen.")

    except:
        print(traceback.format_exc(), flush=True)