singnet / style-transfer-service

MIT License
5 stars 5 forks source link

Return image (.jpg, other) encoded file #10

Closed ramongduraes closed 6 years ago

ramongduraes commented 6 years ago

Generate base64 encoded output for an image file extension (.jpg, others) instead of numpy.ndarray.

Consider adding the output file format as an input to the service.

ferrouswheel commented 6 years ago

Not too hard to figure out from scratch, but most of the image based services I've worked on (that return an image result) have example code for this. e.g. https://github.com/singnet/semantic-segmentation/blob/master/services/mask_rcnn_server.py#L125 uses scikit-image (face-services/face-alignment has an example using opencv2)

ramongduraes commented 6 years ago

Thanks a lot! I'm actually working on this issue right now... The example code I started from uses PIL so I guess I'll have to write a third conversion example hahaha.

I'll make sure to check the examples if it proves troublesome!

ramongduraes commented 6 years ago

Done!