This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get a reference to webcam | |
video_capture = cv2.VideoCapture(0) | |
emotion_dict = { | |
0: 'Surprise', | |
1: 'Happy', | |
2: 'Disgust', | |
3: 'Anger', | |
4: 'Sadness', | |
5: 'Fear', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input = Input(shape=(48, 48, 1)) | |
cnn1 = Conv2D(36, kernel_size=3, activation='relu')(input) | |
cnn1 = MaxPool2D(pool_size=3, strides=2)(cnn1) | |
cnn2 = Conv2D(64, kernel_size=3, activation='relu')(cnn1) | |
cnn2 = MaxPool2D(pool_size=3, strides=2)(cnn2) | |
cnn3 = Conv2D(128, kernel_size=3, activation='relu')(cnn2) | |
cnn3 = MaxPool2D(pool_size=3, strides=2)(cnn3) | |
dense = Flatten()(cnn3) | |
dense = Dropout(0.3)(dense) | |
dense = Dense(256, activation='relu')(dense) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input = Input(shape=(224, 224, 3)) | |
cnn1 = Conv2D(36, kernel_size=3, activation='relu')(input) | |
cnn1 = MaxPool2D(pool_size=3, strides=2)(cnn1) | |
cnn2 = Conv2D(64, kernel_size=3, activation='relu')(cnn1) | |
cnn2 = MaxPool2D(pool_size=3, strides=2)(cnn2) | |
cnn3 = Conv2D(128, kernel_size=3, activation='relu')(cnn2) | |
cnn3 = MaxPool2D(pool_size=3, strides=2)(cnn3) | |
cnn4 = Conv2D(256, kernel_size=3, activation='relu')(cnn3) | |
cnn4 = MaxPool2D(pool_size=3, strides=2)(cnn4) | |
cnn5 = Conv2D(512, kernel_size=3, activation='relu')(cnn4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input = Input(shape=(224, 224, 3)) | |
cnn1 = Conv2D(128, kernel_size=3, activation='relu')(input) | |
cnn1 = Conv2D(128, kernel_size=3, activation='relu')(cnn1) | |
cnn1 = Conv2D(128, kernel_size=3, activation='relu')(cnn1) | |
cnn1 = MaxPool2D(pool_size=3, strides=2)(cnn1) | |
cnn2 = Conv2D(128, kernel_size=3, activation='relu')(cnn1) | |
cnn2 = Conv2D(128, kernel_size=3, activation='relu')(cnn2) | |
cnn2 = Conv2D(128, kernel_size=3, activation='relu')(cnn2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.cluster import KMeans, AgglomerativeClustering, DBSCAN, Birch | |
from sklearn.mixture import GaussianMixture | |
from PIL import Image | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
# load picture | |
img = Image.open('./thor4.jpg') | |
arr = np.array(img) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class='team-stats'> | |
<div class='points-per-game'> | |
<table class='category-table'> | |
<tr> | |
<a class='team-name'>Golden State Warriors</a> | |
<a class='team-value'>116.3</a> | |
</tr> | |
<tr> | |
<a class='team-name'>LA Clippers</a> | |
<a class='team-value'>114.7</a> |