bendangnuksung / mrcnn_serving_ready

🛠 Mask R-CNN Keras to Tensorflow and TFX models + Serving models using TFX GRPC & RESTAPI
https://github.com/matterport/Mask_RCNN
MIT License
103 stars 35 forks source link

Rest Api Error #27

Closed varghesealex90 closed 4 years ago

varghesealex90 commented 4 years ago

Hello,

Below are the steps I followed:

Docker image was used using Tensorflow 1.14 version 1) python main.py (COCO weights were used) ---> Successfully returns frozen and serving_model

Using Docker image Tensorflow 2.1 version

2) install tensorflow_server_model (https://medium.com/@noone7791/how-to-install-tensorflow-serving-load-a-saved-tf-model-and-connect-it-to-a-rest-api-in-ubuntu-48e2a27b8c2a)

3) python3 inferencing/saved_model_inference.py -t restapi -p test_image/monalisa.jpg

Error 1: mrcnn not found. Solution: Copied mrcnn folder from matterport to inferencing

3) python3 inferencing/saved_model_inference.py -t restapi -p test_image/monalisa.jpg

Error : File "inferencing/saved_model_inference.py", line 106, in result = detect_mask_single_image_using_restapi(image) File "inferencing/saved_model_inference.py", line 78, in detect_mask_single_image_using_restapi response = requests.post(RESTAPI_URL, data=json.dumps(data), headers={"content-type":"application/json"}) File "/usr/local/lib/python3.6/dist-packages/requests/api.py", line 116, in post return request('post', url, data=data, json=json, kwargs) File "/usr/local/lib/python3.6/dist-packages/requests/api.py", line 60, in request return session.request(method=method, url=url, kwargs) File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 533, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 646, in send r = adapter.send(request, kwargs) File "/usr/local/lib/python3.6/dist-packages/requests/adapters.py", line 516, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: