Ensuring calls default to the values found by the Settings object in indicoio.config

This commit is contained in:
Madison May
2015-02-27 16:33:22 -05:00
parent 110abaf7a6
commit e9fc025e95
11 changed files with 67 additions and 20 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ import numpy as np
from indicoio.utils import image_preprocess, api_handler
import indicoio.config as config
def facial_features(image, cloud=config.cloud, batch=False, auth=None, **kwargs):
def facial_features(image, cloud=config.CLOUD, batch=False, auth=None, **kwargs):
"""
Given an grayscale input image of a face, returns a 48 dimensional feature vector explaining that face.
Useful as a form of feature engineering for face oriented tasks.
@@ -30,7 +30,7 @@ def facial_features(image, cloud=config.cloud, batch=False, auth=None, **kwargs)
"""
return api_handler(image, cloud=cloud, api="facialfeatures", batch=batch, auth=auth, **kwargs)
def image_features(image, cloud=config.cloud, batch=False, auth=None, **kwargs):
def image_features(image, cloud=config.CLOUD, batch=False, auth=None, **kwargs):
"""
Given an input image, returns a 2048 dimensional sparse feature vector explaining that image.
Useful as a form of feature engineering for image oriented tasks.
+1 -1
View File
@@ -6,7 +6,7 @@ import numpy as np
from indicoio.utils import api_handler
import indicoio.config as config
def fer(image, cloud=config.cloud, batch=False, auth=None, **kwargs):
def fer(image, cloud=config.CLOUD, batch=False, auth=None, **kwargs):
"""
Given a grayscale input image of a face, returns a probability distribution over emotional state.
Input should be in a list of list format, resizing will be attempted internally but for best