Skip to content

Instantly share code, notes, and snippets.

Last active September 28, 2020 18:35
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Gabe-flomo/533767d719f04dd5fff0d216a606c084 to your computer and use it in GitHub Desktop.
imports needed for image feature extraction
# for loading/processing the images
from keras.preprocessing.image import load_img
from keras.preprocessing.image import img_to_array
from keras.applications.vgg16 import preprocess_input
# models
from keras.applications.vgg16 import VGG16
from keras.models import Model
# clustering and dimension reduction
from sklearn.cluster import KMeans
from sklearn.decomposition import PCA
# for everything else
import os
import numpy as np
import matplotlib.pyplot as plt
from random import randint
import pandas as pd
import pickle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment