IBM / powerai-vision-object-detection

Use deep learning to create a model and a REST endpoint to allow your app to detect, locate and count your product on store shelves
https://developer.ibm.com/patterns/locate-and-count-items-with-object-detection/
Apache License 2.0
95 stars 66 forks source link

Can't upload photo from web but work perfectly fine in https request #61

Closed haicheviet closed 3 years ago

haicheviet commented 5 years ago

image The web api return as like that and don't display the image and prediction on web

Tks in advance

nirandiw commented 5 years ago

Any idea how to resolve this? @markstur

nirandiw commented 5 years ago

I found a solution to this problem via stack overflow. Since the response is zipped the console.log(body) prints binary. In the response enable gzip: true and it will return the json string. You might want to integrate it to the code path.

app.js --> app.post()--> request.post() include gzip: true as an option.

horeaporutiu commented 3 years ago

Thank you @HaiCheViet and @nirandiw this is now fixed with https://github.com/IBM/powerai-vision-object-detection/pull/67