RedisGears / AnimalRecognitionDemo

An example of using Redis Streams, RedisGears and RedisAI for Realtime Video Analytics (i.e. filtering cats)
https://redisgears.io
Apache License 2.0
42 stars 18 forks source link

execute_command #12

Closed huwade closed 4 years ago

huwade commented 4 years ago

Hi, I am new for Redis In init.py, line 37, what does execute_command mean? and how to set the parameters

Thanks

MeirShpilraien commented 4 years ago

execute_command means performing a command on the redis server. Regarding parameters, not sure what you mean, what parameters do you want to set?

huwade commented 4 years ago

Thanks for you reply, I found this website https://oss.redislabs.com/redisai/commands/ can solve my problem. thanks again.

MeirShpilraien commented 4 years ago

@huwade Pls notice that in this demo RedisGears uses the C api exposed by RedisAI to integrate with RedisAI: From : https://github.com/RedisGears/AnimalRecognitionDemo/blob/master/app/gear.py

    # converting the matrix color to Tensor
    v1 = redisAI.createTensorFromBlob('FLOAT', [1, 224, 224, 3], img_ba)

    # creating the graph runner, 'g1' is the key in redis on which the graph is located
    graphRunner = redisAI.createModelRunner('mobilenet:model')
    redisAI.modelRunnerAddInput(graphRunner, 'input', v1)
    redisAI.modelRunnerAddOutput(graphRunner, 'MobilenetV2/Predictions/Reshape_1')

So the api is a little different then issuing commands to redis..

MeirShpilraien commented 4 years ago

@huwade did you found all the answers you were looking for? Can we close this issue?

huwade commented 4 years ago

yes, thx.