robmarkcole / deepstack-python

Unofficial python API for DeepStack
https://deepstack.cc/
GNU General Public License v3.0
12 stars 11 forks source link

Include image mime in request #25

Closed bestlibre closed 3 years ago

bestlibre commented 4 years ago

Fix for #24 . I have tested with a local install of tensorflow-lite-server, it's working. I don't have an instance of deepstack to test against it and I'm not familiar with the test suite to add test. I hope this PR is still usefull.

robmarkcole commented 4 years ago

@bestlibre how did you find that solution? Possibly here

bestlibre commented 4 years ago

I found the solution based on the curl command in the readme of tensorflow-lite-server and the documentation of requests. The first part of the solution was with a fixed mime type and then I search how to get the mime type from a byte array which lead me to filetype.

robmarkcole commented 4 years ago

Unfortunately on deepstack official this approach raises error: {'success': False, 'error': 'No valid image file found'}

You can run deepstack official with:

docker run -e VISION-DETECTION=True -v localstorage:/datastore -p 5000:5000 -e API-KEY="" --name deepstack deepquestai/deepstack:cpu-x3-beta
robmarkcole commented 3 years ago

stale