Skip to content

Instantly share code, notes, and snippets.

@Gabe-flomo

Gabe-flomo/imports.py Secret

Last active Sep 28, 2020
Embed
What would you like to do?
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