Ryan's Notebook Vol 1.

PLANNING

My first goal is to figure out how to move around.

- loading an image in python
- getting started with keras.
- identify where the dots are
- identify the extent of the sea lions around the dots
- classify the sea lions using CNNS

In [16]:
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np

In [29]:
%matplotlib inline
#how do I load an image with pyth

img=mpimg.imread("/Users/rcphillips/Documents/seal_the_deal/src/data/TrainSmall2/Train/41.jpg")
fig_size = plt.rcParams["figure.figsize"]
fig_size[0] = 12
fig_size[1] = 8
plt.rcParams["figure.figsize"] = fig_size

imgplot = plt.imshow(img)



In [1]:
#from Radu:

import numpy as np
import pandas as pd
import os
import cv2
import matplotlib.pyplot as plt
import skimage.feature
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelBinarizer
import keras
from keras.models import Sequential, load_model
from keras.layers import Dense, Dropout, Activation, Flatten, Conv2D, MaxPooling2D, Lambda, Cropping2D
from keras.utils import np_utils

from collections import Counter

%matplotlib inline


---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-688961b57258> in <module>()
      5 import pandas as pd
      6 import os
----> 7 import cv2
      8 import matplotlib.pyplot as plt
      9 import skimage.feature

ImportError: No module named cv2

In [4]:
!pip install cv2


Collecting cv2
  Could not find a version that satisfies the requirement cv2 (from versions: )
No matching distribution found for cv2
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

In [ ]: