Using TorchServe to save images (Segmentation/Super-resolution)

Hi everyone,

I have seen examples of TorchServe being used for tasks such as image classification, object detection where the output are the classes or the bounding box of the objects respectively. These predictions are typically printed on the terminal. Likewise, for the Image_Segmenter case, currently the output is an array with labels for each pixel.

Instead, is it possible to use TorchServe to save images? For the segmentation task, this can be an image with a label for each pixel. For a super-resolution task, this could be the up-sampled image.

I tried modifying the handler to save the input image (For the MNIST example) but I don’t see the output file getting created. Can I get any pointers regarding this issue ?

Thanks

Torchserve handlers are pretty general in what they can accomplish so just make sure that either in the inference or postprocess function that you’re saving the image to disk

If you can share your model handler it may make things easier to repro