Boxes from TensorFlow Serving
Closed this issue · 5 comments
Current Behavior:
I trained a Yolov8 model on custom data and would now like to use TensorFlow Serving to get predictions. When I use the Saved Model CLI I see the output for boxes has a shape of (-1, -1, 64). I can save this with keras.saving.save_model, model.save, or tf.saved_model.save and I get the same result. The same result happens when I use a pre-trained model.
Expected Behavior:
I would expect a shape of (-1, -1, 4). I am unsure of how to get bounding boxes from the 64 values I am currently getting.
Steps To Reproduce:
Version:
Keras version: 2.15.0
Keras_cv version: 0.8.2
you need to write custom postprocessing for serving:
i changed your code in here.
@Alparslan-Tamer is right. Thanks for responding @Alparslan-Tamer! Let me know if this addresses your issue @alejones.
@Alparslan-Tamer, Thank you! That solved my issue.
Is there any documentation on how to add a signature or other postprocessing functions. In particular I'd like to be able to return a string with the class name instead of having an int that needs to be mapped to a class name.
Hi @alejones , you can do any customization inside the inference function, I wrote a simple code (you can write a better one) for the problem you mentioned, you can see it from the link below.
@Alparslan-Tamer, Thanks again! This is what I was looking for.