- FaceNet (Google)
- They use a triplet loss with the goal of keeping the L2 intra-class distances low and inter-class distances high
- DeepID (Hong Kong University)
- They use verification and identification signals to train the network. Afer each convolutional layer there is an identity layer connected to the supervisory signals in order to train each layer closely (on top of normal backprop)
- DeepFace (Facebook)
- Convs followed by locally connected, followed by fully connected
This file contains hidden or 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
['magma', | |
'inferno', | |
'plasma', | |
'viridis', | |
'cividis', | |
'twilight', | |
'twilight_shifted', | |
'turbo', | |
'Blues', | |
'BrBG', |
This file contains hidden or 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
import numpy as np | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.mplot3d import Axes3D | |
from matplotlib.animation import FuncAnimation | |
def ackley(x, y): | |
a = 20 | |
b = 0.2 | |
c = 2 * np.pi | |
term1 = -a * np.exp(-b * np.sqrt((x**2 + y**2) / 2)) |
This file contains hidden or 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
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib.animation import FuncAnimation | |
def fitness(x, y): | |
return np.sin(x) * np.cos(y) | |
mutation_range = 0.02 | |
population = np.array([[np.random.uniform(-5, 5), np.random.uniform(-5, 5)]]) |
This file contains hidden or 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
import pygame | |
import numpy as np | |
# Setting parameters | |
width = 100 | |
height = 100 | |
cell_size = 15 | |
spacing = 2 | |
live_color = (0, 150, 0) |
This file contains hidden or 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
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib.animation import FuncAnimation | |
from matplotlib.animation import PillowWriter | |
# Define the initial state of the grid | |
grid = np.zeros((100, 100)) | |
grid[1, 2] = 1 | |
grid[2, 3] = 1 | |
grid[3, 1:4] = 1 |
This file contains hidden or 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
import pygame | |
import random | |
# Set up the Pygame window | |
pygame.init() | |
screen = pygame.display.set_mode((800, 600)) | |
pygame.display.set_caption("Northern Lights") | |
# Define some colors | |
black = (0, 0, 0) |
This file contains hidden or 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
# import the necessary packages | |
import argparse | |
import datetime | |
import imutils | |
import time | |
import cv2 | |
from facerec.feature import Fisherfaces | |
from facerec.classifier import NearestNeighbor | |
from facerec.model import PredictableModel |