ipazc / vrpwrp Goto Github PK
View Code? Open in Web Editor NEWVRPWRP (Vision-algorithms Requests Processing Wrappers), a pip package for running deep-learning Computer Vision algorithms from the cloud.
License: MIT License
VRPWRP (Vision-algorithms Requests Processing Wrappers), a pip package for running deep-learning Computer Vision algorithms from the cloud.
License: MIT License
HTTP requests that do not provide the desired output may fire an exception that is not correctly handled.
Running this piece of code:
face_detection = FaceDetection()
frame = cv2.imread('image_file.jpg')
bounding_boxes = face_detection.analyze_pil(Image.fromarray(frame))
Gives the following error (JSONDecodeError: Expecting value: line 1 column 1 (char 0)):
File "C:/Users/wsarguroh001/Downloads/Powai_Rainbow_Cropped.py", line 69, in <module>
bounding_boxes = face_detection.analyze_pil(Image.fromarray(frame))
File "C:\Users\wsarguroh001\AppData\Local\Continuum\anaconda3\lib\site-packages\vrpwrp\wrappers\face_detection.py", line 100, in analyze_pil
return self.analyze_bytes(image_bytes)
File "C:\Users\wsarguroh001\AppData\Local\Continuum\anaconda3\lib\site-packages\vrpwrp\wrappers\face_detection.py", line 48, in analyze_bytes
response = self._request("PUT", data=image_bytes, is_binary=True)['bounding_boxes']
File "C:\Users\wsarguroh001\AppData\Local\Continuum\anaconda3\lib\site-packages\vrpwrp\wrappers\APIWrapper.py", line 27, in _request
return response.json()
File "C:\Users\wsarguroh001\AppData\Local\Continuum\anaconda3\lib\site-packages\requests\models.py", line 892, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Users\wsarguroh001\AppData\Local\Continuum\anaconda3\lib\site-packages\simplejson\__init__.py", line 517, in loads
return _default_decoder.decode(s)
File "C:\Users\wsarguroh001\AppData\Local\Continuum\anaconda3\lib\site-packages\simplejson\decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "C:\Users\wsarguroh001\AppData\Local\Continuum\anaconda3\lib\site-packages\simplejson\decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
File "C:\Users\wsarguroh001\AppData\Local\Continuum\anaconda3\lib\site-packages\simplejson\scanner.py", line 79, in scan_once
return _scan_once(string, idx)
File "C:\Users\wsarguroh001\AppData\Local\Continuum\anaconda3\lib\site-packages\simplejson\scanner.py", line 70, in _scan_once
raise JSONDecodeError(errmsg, string, idx)
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
It used to work just fine earlier. Also it works alright on another system but throws this error on mine. Tried uninstalling and reinstalling the wrapper but to no effect.
in an ubuntu 14.04, the default python requests lib is too low. It raises the following error:
print(dTraceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.4/dist-packages/dhub/datasets.py", line 38, in __init__
self.refresh()
File "/usr/local/lib/python3.4/dist-packages/dhub/datasets.py", line 111, in refresh
self.datasets = {d['url_prefix']: dict(definition=d, token=self.token, token_info=self.token_info, server_info=self.server_info, owner=self) for d in self._get_json("datasets")}
File "/usr/local/lib/python3.4/dist-packages/dhub/wrapper/api_wrapper.py", line 115, in _get_json
return self.__do_json_request(requests.get, rel_url, extra_data, json_data).json()
File "/usr/local/lib/python3.4/dist-packages/dhub/wrapper/api_wrapper.py", line 50, in fun
raise last_exception
File "/usr/local/lib/python3.4/dist-packages/dhub/wrapper/api_wrapper.py", line 43, in fun
result = func_wrap(obj, *args, **kwargs)
File "/usr/local/lib/python3.4/dist-packages/dhub/wrapper/api_wrapper.py", line 100, in __do_json_request
response = method("{}/{}".format(self.api_url, rel_url), json=json_data, params=data, timeout=TIMEOUT)
File "/usr/lib/python3/dist-packages/requests/api.py", line 55, in get
return request('get', url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, **kwargs)
TypeError: request() got an unexpected keyword argument 'json'
it would be a good idea to require at least requests-2.18.4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.