Created
September 19, 2018 22:58
-
-
Save tomas-wood/bf5f66145dd9e10f9d4b5927a3626f8c to your computer and use it in GitHub Desktop.
simple detectron api example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import urllib3 | |
| import pickle | |
| import json | |
| http = urllib3.PoolManager() | |
| url = "http://localhost:5000/detectron" | |
| img_url="https://cdn7.dissolve.com/p/D1028_98_301/D1028_98_301_1200.jpg" | |
| r = http.request('PUT', url, fields={'data':img_url}) | |
| cls_boxes = pickle.loads(json.loads(r.data)['cls_boxes']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment