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
import tensorflow as tf | |
from age_gender_estimation_tutorial.cnn_model import network | |
def model_fn(features, labels, mode, params): | |
""" | |
Creates model_fn for Tensorflow estimator. This function takes features and input, and | |
is responsible for the creation and processing of the Tensorflow graph for training, prediction and evaluation. | |
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
import tensorflow as tf | |
def network(feature_input, labels, mode): | |
""" | |
Creates a simple multi-layer convolutional neural network | |
:param feature_input: | |
:param labels: | |
:param mode: |
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
#!/usr/bin/env bash | |
if [[ ! -d "data" ]] | |
then | |
mkdir "data" | |
fi | |
curl https://data.vision.ee.ethz.ch/cvl/rrothe/imdb-wiki/static/imdb_crop.tar -O | |
tar -xzvf imdb_crop -C data |
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
import argparse as argparse | |
import csv | |
import os | |
import random | |
from datetime import datetime | |
import cv2 | |
import numpy as np | |
from scipy.io import loadmat | |
from tqdm import tqdm |
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
import argparse | |
import logging | |
import os | |
import zipfile | |
import requests | |
model_dict = { | |
'show-and-tell-2M': '1RG2xggrl4rc8tKlZQt-G-ihX7ln8N3-p' | |
} |
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
import logging | |
import os | |
import numpy as np | |
import tensorflow as tf | |
from tensorflow.python.framework import ops | |
logger = logging.getLogger(__name__) | |
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
import argparse | |
import logging | |
import os | |
import pickle | |
import sys | |
import time | |
import numpy as np | |
import tensorflow as tf | |
from sklearn.svm import SVC |
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
import argparse | |
import glob | |
import logging | |
import multiprocessing as mp | |
import os | |
import time | |
import cv2 | |
from medium_facenet_tutorial.align_dlib import AlignDlib |
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
import argparse | |
import logging | |
import os | |
import requests | |
import zipfile | |
""" | |
This file is copied from: | |
https://github.com/davidsandberg/facenet/blob/master/src/download_and_extract_model.py |
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 tensorflow/tensorflow:latest | |
RUN apt-get update -y --fix-missing | |
RUN apt-get install -y ffmpeg | |
RUN apt-get install -y build-essential cmake pkg-config \ | |
libjpeg8-dev libtiff5-dev libjasper-dev libpng12-dev \ | |
libavcodec-dev libavformat-dev libswscale-dev libv4l-dev \ | |
libxvidcore-dev libx264-dev \ | |
libgtk-3-dev \ | |
libatlas-base-dev gfortran \ |