diff options
Diffstat (limited to 'megapixels/app/settings')
| -rw-r--r-- | megapixels/app/settings/app_cfg.py | 15 | ||||
| -rw-r--r-- | megapixels/app/settings/types.py | 34 |
2 files changed, 40 insertions, 9 deletions
diff --git a/megapixels/app/settings/app_cfg.py b/megapixels/app/settings/app_cfg.py index 9ea4b72b..d60b83f8 100644 --- a/megapixels/app/settings/app_cfg.py +++ b/megapixels/app/settings/app_cfg.py @@ -4,15 +4,9 @@ import logging import collections from dotenv import load_dotenv -import cv2 as cv - from app.settings import types from app.utils import click_utils -# ----------------------------------------------------------------------------- -# Metadata type names -# ----------------------------------------------------------------------------- - # ----------------------------------------------------------------------------- # Enun lists used for custom Click Params @@ -35,6 +29,7 @@ DIR_DATSET_NAS = join(DIR_DATASETS, 'people') DIR_APPS = join(DATA_STORE,'apps') DIR_APP = join(DIR_APPS,'megapixels') DIR_MODELS = join(DIR_APP,'models') +DIR_PEOPLE = 'people' # # Frameworks DIR_MODELS_CAFFE = join(DIR_MODELS,'caffe') @@ -117,8 +112,12 @@ LOGFILE_FORMAT = "%(log_color)s%(levelname)-8s%(reset)s %(cyan)s%(filename)s:%(l # ----------------------------------------------------------------------------- # S3 storage # ----------------------------------------------------------------------------- -S3_MEDIA_ROOT = 's3://megapixels/v1/media/' -S3_METADATA_ROOT = 's3://megapixels/v1/metadata/' +S3_ROOT_URL = 's3://megapixels/v1/' +S3_MEDIA_URL = join(S3_ROOT_URL, 'media') +S3_METADATA_URL = join(S3_ROOT_URL, 'metadata') +S3_HTTP_URL = 'https://megapixels.nyc3.digitaloceanspaces.com/v1/' +S3_HTTP_MEDIA_URL = join(S3_HTTP_URL, 'media') +S3_HTTP_METADATA_URL = join(S3_HTTP_URL, 'metadata') # ----------------------------------------------------------------------------- # .env config for keys diff --git a/megapixels/app/settings/types.py b/megapixels/app/settings/types.py index 4f403846..685744aa 100644 --- a/megapixels/app/settings/types.py +++ b/megapixels/app/settings/types.py @@ -29,7 +29,7 @@ class HaarCascade(Enum): class DataStore(Enum): """Storage devices. Paths are symlinked to root (eg /data_store_nas)""" - NAS, HDD, SSD = range(3) + NAS, HDD, SSD, S3 = range(4) # --------------------------------------------------------------------- # Logger, monitoring @@ -49,3 +49,35 @@ class Metadata(Enum): class Dataset(Enum): LFW, VGG_FACE2 = range(2) + + +# --------------------------------------------------------------------- +# Face analysis types +# -------------------------------------------------------------------- +class FaceEmotion(Enum): + # Map these to text strings for web display + NEUTRAL, HAPPY, SAD, ANGRY, FRUSTURATED = range(5) + +class FaceBeauty(Enum): + # Map these to text strings for web display + AVERAGE, BELOW_AVERAGE, ABOVE_AVERAGE = range(3) + +class FaceYaw(Enum): + # Map these to text strings for web display + FAR_LEFT, LEFT, CENTER, RIGHT, FAR_RIGHT = range(5) + +class FacePitch(Enum): + # Map these to text strings for web display + FAR_DOWN, DOWN, CENTER, UP, FAR_UP = range(5) + +class FaceRoll(Enum): + # Map these to text strings for web display + FAR_DOWN, DOWN, CENTER, UP, FAR_UP = range(5) + +class FaceAge(Enum): + # Map these to text strings for web display + CHILD, TEENAGER, YOUNG_ADULT, ADULT, MATURE_ADULT, SENIOR = range(6) + +class Confidence(Enum): + # Map these to text strings for web display + VERY_LOW, LOW, MEDIUM, MEDIUM_HIGH, HIGH, VERY_HIGH = range(6)
\ No newline at end of file |
