SthPhoenix / InsightFace-REST

InsightFace REST API for easy deployment of face recognition services with TensorRT in Docker.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

post numpy array to server

yuxianmin opened this issue · comments

hi,
ask a question, how to post cv numpy array list directly to fastapi?
currently, I encode the cv array to base64. In some scenarios, base64 encoding take some time.

thanks.

Hi! You can use msgpack as quick replacement for json, it can serialize binary data. Though image decoded to numpy array might be pretty heavy, so transfer overhead may neglect benefits of decoding image in separate process, if I understand your use case correctly.

Yeah, thank you so much for your suggestion.