Skip to content

Instantly share code, notes, and snippets.

@tomas-wood
Created September 19, 2018 22:58
Show Gist options
  • Select an option

  • Save tomas-wood/bf5f66145dd9e10f9d4b5927a3626f8c to your computer and use it in GitHub Desktop.

Select an option

Save tomas-wood/bf5f66145dd9e10f9d4b5927a3626f8c to your computer and use it in GitHub Desktop.
simple detectron api example
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