Open jrash33 opened 4 years ago
Hi @jrash33 glad to hear this repo helped you. Coming to your question, there is already an inference RESTAPI code in inferencing/saved_model_inference.py
inside there is a method called detect_mask_single_image_using_restapi()
. This method sends a requests and gets a JSON response. You can make changes according to your needs.
hey @bendangnuksung, wow thank you so much for the reply. Much appreciated. Do you have any versions that can accept b64 encoded images as a single input? I'm trying to pass in images through your method to gcp ai platform and the images seem to be too large. Thanks again!
Sorry, I do not have any other version that sends requests using a b64 encoded image. The restapi serving model seems to take only list as an input. I do not have any solution as of now but I can tell you two workaround which can help you:
Unfortunately, I do not have time to do all this. Do let me know if you find any other way.
hey @bendangnuksung ! Wow, this repo seriously saved my life, thank you so much. So using your repo, I have successfully deployed a mask rcnn model to gcp ai platform with no issues. But, for a couple weeks now, I have been hitting a road block on getting a prediction back. In other words, what's an example JSON object i can send that will work? here is the code i used to create the serving model:
for example, i tried the JSON input below to just get any type of response with no luck:
please help!!
p.s. Going the extra mile: How would we be able to adjust the above function to accept b64 encoded images?? :)