lab2/inference_client/sample-client-camera.py [48:65]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    print("start client")
    #channel = grpc.insecure_channel("unix-abstract:aws.lookoutvision.inference-server")
    with grpc.insecure_channel("unix:///tmp/aws.iot.lookoutvision.EdgeAgent.sock") as channel:
        print("channel set")
        stub = EdgeAgentStub(channel)
        h, w, c = img.shape
        print("shape="+str(img.shape))
        response = stub.DetectAnomalies(
            pb2.DetectAnomaliesRequest(
                model_component="ComponentCircuitBoard",
                bitmap=pb2.Bitmap(
                    width=w,
                    height=h,
                    byte_data=bytes(img.tobytes())
                    ) 
                )
        )
        print(response)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



lab2/inference_client/sample-client-file.py [15:31]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
print("start client")
with grpc.insecure_channel("unix:///tmp/aws.iot.lookoutvision.EdgeAgent.sock") as channel:
    print("channel set")
    stub = EdgeAgentStub(channel)
    h, w, c = img.shape
    print("shape="+str(img.shape))
    response = stub.DetectAnomalies(
        pb2.DetectAnomaliesRequest(
                model_component="ComponentCircuitBoard",
                bitmap=pb2.Bitmap(
                    width=w,
                    height=h,
                    byte_data=bytes(img.tobytes())
                    ) 
                )
    )
    print(response)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



