MaybeShewill-CV / CRNN_Tensorflow

Convolutional Recurrent Neural Networks(CRNN) for Scene Text Recognition
MIT License
1.03k stars 388 forks source link

{ "error": "Serving signature name: \"serving_default\" not found in signature def" } #275

Closed kspook closed 5 years ago

kspook commented 5 years ago

@MaybeShewill-CV thank you for your code.

I have error. { "error": "Serving signature name: \"serving_default\" not found in signature def" } How can I solve?

----- script -----------

curl -X POST   http://localhost:9001/v1/models/crnn:predict   -H 'cache-control: no-cache'   -H 'content-type: application/json'   -d '{
  "inputs":
    {
    "input": { "b64": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAwICQoJBwwKCQoNDAwOER0TERAQESMZGxUdKiUsKyklKCguNEI4LjE/MigoOk46P0RHSktKLTdRV1FIVkJJSkf/2wBDAQwNDREPESITEyJHMCgwR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0f/wAARCAAfAHQDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDZs9FF1awSfa0jmud/kxFCQ23rlh0qKHRrqeyjuYnhbzd2yLfh2wcHAPXpV+0hN9p2nLBdrbm283zpA4Biycg4yDzVzSDCLDS3YO1yiztAgICucnIJ/lQBz0GmXtxbfaILd5I84yuCfy61AYJhCJjDIIj0cqdp/Gtki3XwvbG4FxuLyNGYsYDdBuzVzTpWRNJgZj5DQzNKh+6w56jvQBytFdHJcSifRLaTY6tEgYOit8rMB3HoBVeX7Pc6tqEL20KLDDKsQiXaMqSQxx34oAxaK3bzSbWBGdgyrFZ5dkbIM27b37Z/lTDo9r9iGJphdfY/tZ4Gzb6euaAMWjNak+i+Xbeat2hZFjM6MpXy9+Mc856/pUV5pE9r5I863macr5axvljnocHHHvQBnk0tTmwu9zKtvIzLIYiFG75gCSOOvANRtFJGDvjdcMVO4EYI6j60AMpaKKACiiigBKVWKkMpII5BFJRQBZh1C9gAWK7mRR0UOcflUiavfpafZVnxDtKbdi9D1GcZqlRQBen1WaWa0laKEPa42FVxkDBAPPTjtjqaZaagYdUN7LGJN5csgOM7gc9c+tU2pKANa51g3Gjm1YMJnmLuwHyspJbH/fRqee/tPskk0VwxmktltlgKH92BjPzdD0P51hUUAdFrOo211ZXJsniUvMivxhpEC8Hn0Oeg9KbsS48W20MEqvFD5YRlOQQig9voawKMGgDrradZPsd1DbNHFJJPdSqGL4KqVzn3J6VHpSRzWNnG8jCbzftsjOeuH29/auainmgz5M0kZIwdrEcenFPS7uI87ZW5jMRyc/Ie3PagDX1KWQWdpAksUjzR+Y8XlbnLSEtwSDjr65qa6j017i1hlgSKF5cxzxptVosY2sc53bsA56e1ZX9q3JlhkcQs8TKysYlB46DIA4qeLWnVwr20X2fyni8qMleHOWIPJzmgBuoR2Ec6xtBLbSquJYkYsFbJ7t14weOOaKq6hcm9u2m8vYCAoXduwAMDJ7/WigD/2Q==" }
  }
}'
{ "error": "Serving signature name: \"serving_default\" not found in signature def" }
MaybeShewill-CV commented 5 years ago

@eldon Thanks a lot. I find out that you modified the tools/export_saved_model.py and write a new script named tfserve/export_saved_model.py at the mean time. What's the difference between them? Is it necessary to keep them both?

MaybeShewill-CV commented 5 years ago

@eldon Seems like the exported saved model have conflicts. Since I prepare to merge your commit to implement the tensorflow serving function I will remove the old exported saved model of mine and use yours instead. Could you please pull a new request when we finished discussing how to merge the conflicts?

MaybeShewill-CV commented 5 years ago

@eldon I have manually merged the conflicts. You may pull and update the code and see if there's something differs from your wish:)

MaybeShewill-CV commented 5 years ago

@eldon You may pull a new request to share your docker file with us if you are willing to. Please let me know if you're confused with the newly updates:)

eldon commented 5 years ago

Hi @MaybeShewill-CV thanks for the notes! Let me respond to the questions:

The tools/export_saved_model.py exports the saved model with the output as the sparse tensor (it is the original saved model exporter, in case you don't want to use tf-serving. tfserve/export_saved_model.py breaks apart the output sparse tensor in case you want to use it with the tfserve client. It's your choice whether or not to keep the original under tools, I just left if there in case.

Thanks for helping with the merge! Really appreciate it. I'll merge on my end and create another PR. I don't end up using a dockerfile, but rather the run command which uses google's tfserving image on dockerhub. Cheers,

eldon commented 5 years ago

Btw, thanks @MaybeShewill-CV for the shout-out in the readme! :)

eldon commented 5 years ago

Ah, this file should take care of it, so let's close the PR? Let me know.

https://github.com/MaybeShewill-CV/CRNN_Tensorflow/blob/master/tfserve/run_tfserve_crnn_gpu.sh

MaybeShewill-CV commented 5 years ago

@eldon I have closed that PR. You're welcome to pull new request:)

eldon commented 5 years ago

Ok, I think we can leave it as is, it's the same as what I use. :) Cheers

MaybeShewill-CV commented 5 years ago

@eldon I will close this issue. Welcome to raise new one:)