Example #1
0
 def __init__(self):
     print const.landmark_predictor_path
     self.extractor = mooddeck.get_landmark_extractor(
         const.landmark_predictor_path)
     self.classifier = mooddeck.get_classifier()
     self.classifier.load()
from __future__ import division

import numpy

import mood.mooddeck as mooddeck
import mood.imagedb as imgdb
import mood.settings.const as const

db_path = "/Users/i851474/Development/iot/datasets/cohn-kanade-db"
emotions = imgdb.get_emotions(db_path)
# emotions = numpy.array(emotions)[0:20]

extractor = mooddeck.get_landmark_extractor(const.landmark_predictor_path)
classifier = mooddeck.get_classifier()
all_features = []

def load_model():
    global classifier

    classifier.load()

def load_database_features():
    global all_features
    global emotions

    all_features = []
    for e in emotions:
        subject = e[0]
        sequence = e[1]
        img_path = imgdb.get_image_path(db_path, subject, sequence)
        features = extractor.extract(img_path)
Example #3
0
 def __init__(self):
     print const.landmark_predictor_path
     self.extractor = mooddeck.get_landmark_extractor(const.landmark_predictor_path)
     self.classifier = mooddeck.get_classifier()
     self.classifier.load()
Example #4
0
from __future__ import division

import numpy

import mood.mooddeck as mooddeck
import mood.imagedb as imgdb
import mood.settings.const as const

db_path = "/Users/i851474/Development/iot/datasets/cohn-kanade-db"
emotions = imgdb.get_emotions(db_path)
# emotions = numpy.array(emotions)[0:20]

extractor = mooddeck.get_landmark_extractor(const.landmark_predictor_path)
classifier = mooddeck.get_classifier()
all_features = []


def load_model():
    global classifier

    classifier.load()


def load_database_features():
    global all_features
    global emotions

    all_features = []
    for e in emotions:
        subject = e[0]
        sequence = e[1]