df8c59406b8d01a5993fb413db006d94c39b5100,homeassistant/components/image_processing/facebox.py,FaceClassifyEntity,process_image,#FaceClassifyEntity#Any#,95
Before Change
def process_image(self, image):
Process an image.
response = {}
try:
response = requests.post(
self._url,
json={"base64": encode_image(image)},
timeout=TIMEOUT
).json()
except requests.exceptions.ConnectionError:
_LOGGER.error("ConnectionError: Is %s running?", CLASSIFIER)
response["success"] = False
if response["success"]:
total_faces = response["facesCount"]
faces = parse_faces(response["faces"])
self._matched = get_matched_faces(faces)
After Change
Process an image.
response = post_image(self._url_check, image)
if response is not None:
response_json = response.json()
if response_json["success"]:
total_faces = response_json["facesCount"]
faces = parse_faces(response_json["faces"])
self._matched = get_matched_faces(faces)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: home-assistant/home-assistant
Commit Name: df8c59406b8d01a5993fb413db006d94c39b5100
Time: 2018-07-09
Author: robmarkcole@gmail.com
File Name: homeassistant/components/image_processing/facebox.py
Class Name: FaceClassifyEntity
Method Name: process_image
Project Name: explosion/spaCy
Commit Name: d4cc736b7c8f042e2385a16816aa3f9316478f8c
Time: 2018-05-20
Author: ines.montani@gmail.com
File Name: spacy/cli/validate.py
Class Name:
Method Name: validate
Project Name: home-assistant/home-assistant
Commit Name: 3b3f5fe6fe2092a5071491fafce11b3851d07ce8
Time: 2015-11-08
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/notify/instapush.py
Class Name:
Method Name: get_service