Open Waidhoferj opened 3 years ago
@bjtat this should help you get started on this:
You can run the server by running python3 main.py -l
, which will use the local mocked database.
You can make a call to the API by using Postman, which I'd recommend as a nice GUI for making post/get requests - you can download it here
Here's my setup to hit the findDepth() function with a valid URL:
This should get you started running that function, and you'll be able to feed it bad URLs, stuff like that to test error handling - just change the raw data being provided by postman. I'm not sure if we have any non-image files in Cloudinary, but you could test with a non-cloudinary URL to a non-image resource (you can use this as an MP4 if you wanna test with non-images).
Let me know if you have any questions!
Timeouts might be something we have to define in Gunicorn, or whatever we use for our production hosting.
The find depth functionality takes in a URL to an image stored in Cloudinary. It should download the image, run the depth estimation algorithm on it and return a 2D array of depth values. Most of this already works, but some edge cases aren't covered.
Handle these edge cases in the
findDepth
function inmain.py