Open wangce888 opened 5 years ago
Sorry, I mean image.resize(img_arr, w, h) can turn the image into any size.
I am not sure I understand your question. The "mxnet_vision_service.py" file is completely in the model owners control. The assumption is that the model owner brings in this file, along with other model artifacts to MMS. You could modify the value of "w", "h" on every request based on the image size or the network that you choose (if you have multiple networks in the model).
@aikudexiaohai : Would you be able to give more information about this question or let us know if the above explanation of signature.json help?
@aikudexiaohai : Following up on this question. If you solved your issue, would you be able to share how you solved it?
@vdantu \mxnet-model-server\examples\model_service_template\mxnet_model_service.py line 96, the model will bind the input_shape, can we just comment this line to accept arbitrary size of image?
@JustinhoCHN : Firstly I am assuming that you are talking about the "batch" dimension of the input shape. I don't think MXNet supports arbitrary size for input shape. You might have to rebind every time you get different shape, or pad the incoming requests with 0's if you want to bind it once and reuse that bound MXNet module.
@vdantu sorry, I mean arbitrary w and h, not the batch dimension, since rebind will cost a lot, maybe fix the w and h size would be better. Thanks V~
My input image is [batch, 3, None, None], how to represent any size in the signature.json file. I think a solution is to remove image.resize(img_arr, w, h) in mxnet_vision_servion_service.py. But how can I represent any size in the signature.json file?