<jupyter_start><jupyter_text>Downloading Dataset Download the data from the following linkDog Images :https://www.kaggle.com/c/dog-breed-identification/dataDownload the dog dataset. Unzip the folder and place it in the repository  Kernel - 1<jupyter_code>%matplotlib inline
import numpy as np
import pandas as pd
import datetime as dt
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import ImageGrid
from os import listdir, makedirs
from os.path import join, exists, expanduser
from tqdm import tqdm
from sklearn.metrics import log_loss, accuracy_score
from keras.preprocessing import image
from keras.applications.vgg16 import VGG16
from keras.applications.vgg19 import VGG19
from keras.applications.resnet50 import ResNet50
from keras.applications import xception
from keras.applications import inception_v3
from keras.applications.vgg16 import preprocess_input, decode_predictions
from sklearn.linear_model import LogisticRegression<jupyter_output>F:\Anacondaa3\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Using TensorFlow backend.<jupyter_text>Use top 16 classesUsing all the images would take more than the 1 hour kernel limit. Let's focus on the most frequent 16 breeds.<jupyter_code>#INPUT_SIZE = 224
NUM_CLASSES = 16
SEED = 1987
data_dir = 'C:/Users/Nishant/ADS/Project/Dog-Project-Kaggle Competition' # Path of your Project Folder  
labels = pd.read_csv(join(data_dir, 'labels.csv'))
sample_submission = pd.read_csv(join(data_dir, 'sample_submission.csv'))
print(len(listdir(join(data_dir, 'train'))), len(labels))
print(len(listdir(join(data_dir, 'test'))), len(sample_submission))
selected_breed_list = list(labels.groupby('breed').count().sort_values(by='id', ascending=False).head(NUM_CLASSES).index)
labels = labels[labels['breed'].isin(selected_breed_list)]
labels['target'] = 1
labels['rank'] = labels.groupby('breed').rank()['id']
labels_pivot = labels.pivot('id', 'breed', 'target').reset_index().fillna(0)
np.random.seed(seed=SEED)
rnd = np.random.random(len(labels))
train_idx = rnd < 0.8
valid_idx = rnd >= 0.8
y_train = labels_pivot[selected_breed_list].values
ytr = y_train[train_idx]
yv = y_train[valid_idx]<jupyter_output><empty_output><jupyter_text>Resizing the Image<jupyter_code>def read_img(img_id, train_or_test, size):
    """Read and resize image.
    # Arguments
        img_id: string
        train_or_test: string 'train' or 'test'.
        size: resize the original image.
    # Returns
        Image as numpy array.
    """
    img = image.load_img(join(data_dir, train_or_test, '%s.jpg' % img_id), target_size=size)
    img = image.img_to_array(img)
    return img
INPUT_SIZE = 224
POOLING = 'avg'
x_train = np.zeros((len(labels), INPUT_SIZE, INPUT_SIZE, 3), dtype='float32')
for i, img_id in tqdm(enumerate(labels['id'])):
    img = read_img(img_id, 'train', (INPUT_SIZE, INPUT_SIZE))
    x = preprocess_input(np.expand_dims(img.copy(), axis=0))
    x_train[i] = x
print('Train Images shape: {} size: {:,}'.format(x_train.shape, x_train.size))<jupyter_output>1777it [00:11, 151.98it/s]<jupyter_text>ResNet50 Extract Resnet50 bottleneck features<jupyter_code>Xtr = x_train[train_idx]
Xv = x_train[valid_idx]
print((Xtr.shape, Xv.shape, ytr.shape, yv.shape))
resnet50_bottleneck = ResNet50(weights='imagenet', include_top=False, pooling=POOLING)
train_resnet50_bf = resnet50_bottleneck.predict(Xtr, batch_size=32, verbose=1)
valid_resnet50_bf = resnet50_bottleneck.predict(Xv, batch_size=32, verbose=1)
print('Resnet50 train bottleneck features shape: {} size: {:,}'.format(train_resnet50_bf.shape, train_resnet50_bf.size))
print('Resnet50 valid bottleneck features shape: {} size: {:,}'.format(valid_resnet50_bf.shape, valid_resnet50_bf.size))<jupyter_output>((1409, 224, 224, 3), (368, 224, 224, 3), (1409, 16), (368, 16))
1409/1409 [==============================] - ETA: 20:1 - ETA: 19:0 - ETA: 18:2 - ETA: 17:5 - ETA: 17:2 - ETA: 16:4 - ETA: 16:0 - ETA: 15:2 - ETA: 14:5 - ETA: 14:1 - ETA: 13:5 - ETA: 13:2 - ETA: 12:5 - ETA: 12:2 - ETA: 11:5 - ETA: 11:3 - ETA: 11:0 - ETA: 10:4 - ETA: 10:1 - ETA: 9:4 - ETA: 9: - ETA: 8: - ETA: 8: - ETA: 8: - ETA: 7: - ETA: 7: - ETA: 6: - ETA: 6: - ETA: 6: - ETA: 5: - ETA: 5: - ETA: 4: - ETA: 4: - ETA: 4: - ETA: 3: - ETA: 3: - ETA: 2: - ETA: 2: - ETA: 2: - ETA: 1: - ETA: 1: - ETA: 48s - ETA: 24 - ETA: 0 - 1059s 752ms/step
368/368 [==============================] - ETA: 4: - ETA: 3: - ETA: 3: - ETA: 2: - ETA: 2: - ETA: 2: - ETA: 1: - ETA: 1: - ETA: 59s - ETA: 35 - ETA: 11 - 272s 740ms/step
Resnet50 train bottleneck features shape: (1409, 2048) size: 2,885,632
Resnet50 valid bottleneck features shape: (368, 2048) size: 753,664<jupyter_text>LogReg on Resnet50 bottleneck features<jupyter_code>logreg = LogisticRegression(multi_class='multinomial', solver='lbfgs', random_state=SEED)
logreg.fit(train_resnet50_bf, (ytr * range(NUM_CLASSES)).sum(axis=1))
valid_probs = logreg.predict_proba(valid_resnet50_bf)
valid_preds = logreg.predict(valid_resnet50_bf)
print('Validation Resnet50 LogLoss {}'.format(log_loss(yv, valid_probs)))
print('Validation Resnet50 Accuracy {}'.format(accuracy_score((yv * range(NUM_CLASSES)).sum(axis=1), valid_preds)))<jupyter_output>Validation Resnet50 LogLoss 0.19952801389568334
Validation Resnet50 Accuracy 0.9402173913043478<jupyter_text>Resnet50 Accuracy is 94%  VGG16 Extract VGG16 bottleneck features<jupyter_code>Xtr = x_train[train_idx]
Xv = x_train[valid_idx]
print((Xtr.shape, Xv.shape, ytr.shape, yv.shape))
vgg_bottleneck = VGG16(weights='imagenet', include_top=False, pooling=POOLING)
train_vgg_bf = vgg_bottleneck.predict(Xtr, batch_size=32, verbose=1)
valid_vgg_bf = vgg_bottleneck.predict(Xv, batch_size=32, verbose=1)
print('VGG train bottleneck features shape: {} size: {:,}'.format(train_vgg_bf.shape, train_vgg_bf.size))
print('VGG valid bottleneck features shape: {} size: {:,}'.format(valid_vgg_bf.shape, valid_vgg_bf.size))<jupyter_output>((1409, 224, 224, 3), (368, 224, 224, 3), (1409, 16), (368, 16))
1409/1409 [==============================] - ETA: 10:5 - ETA: 10:4 - ETA: 10:2 - ETA: 10:1 - ETA: 9:5 - ETA: 9: - ETA: 9: - ETA: 9: - ETA: 8: - ETA: 8: - ETA: 8: - ETA: 8: - ETA: 7: - ETA: 7: - ETA: 7: - ETA: 7: - ETA: 6: - ETA: 6: - ETA: 6: - ETA: 6: - ETA: 5: - ETA: 5: - ETA: 5: - ETA: 5: - ETA: 4: - ETA: 4: - ETA: 4: - ETA: 4: - ETA: 3: - ETA: 3: - ETA: 3: - ETA: 3: - ETA: 2: - ETA: 2: - ETA: 2: - ETA: 2: - ETA: 1: - ETA: 1: - ETA: 1: - ETA: 1: - ETA: 46s - ETA: 31 - ETA: 15 - ETA: 0 - 676s 480ms/step
368/368 [==============================] - ETA: 2: - ETA: 2: - ETA: 2: - ETA: 1: - ETA: 1: - ETA: 1: - ETA: 1: - ETA: 53s - ETA: 38 - ETA: 23 - ETA: 7 - 177s 481ms/step
VGG train bottleneck features shape: (1409, 512) size: 721,408
VGG valid bottleneck features shape: (368, 512) size: 188,416<jupyter_text>LogReg on VGG16 bottleneck features<jupyter_code>logregVgg16 = LogisticRegression(multi_class='multinomial', solver='lbfgs', random_state=SEED)
logregVgg16.fit(train_vgg_bf, (ytr * range(NUM_CLASSES)).sum(axis=1))
valid_probsVgg16 = logregVgg16.predict_proba(valid_vgg_bf)
valid_predsVgg16 = logregVgg16.predict(valid_vgg_bf)
print('Validation VGG16 LogLoss {}'.format(log_loss(yv, valid_probsVgg16)))
print('Validation VGG16 Accuracy {}'.format(accuracy_score((yv * range(NUM_CLASSES)).sum(axis=1), valid_predsVgg16)))<jupyter_output>Validation VGG16 LogLoss 0.35206014208503983
Validation VGG16 Accuracy 0.9184782608695652<jupyter_text>VGG16 Accuracy is 91.84%  VGG19 Extract VGG16 bottleneck features<jupyter_code>Xtr = x_train[train_idx]
Xv = x_train[valid_idx]
print((Xtr.shape, Xv.shape, ytr.shape, yv.shape))
vgg19_bottleneck = VGG19(weights='imagenet', include_top=False, pooling=POOLING)
train_vgg19_bf = vgg19_bottleneck.predict(Xtr, batch_size=32, verbose=1)
valid_vgg19_bf = vgg19_bottleneck.predict(Xv, batch_size=32, verbose=1)
print('VGG19 train bottleneck features shape: {} size: {:,}'.format(train_vgg19_bf.shape, train_vgg19_bf.size))
print('VGG19 valid bottleneck features shape: {} size: {:,}'.format(valid_vgg19_bf.shape, valid_vgg19_bf.size))<jupyter_output>((1409, 224, 224, 3), (368, 224, 224, 3), (1409, 16), (368, 16))
1409/1409 [==============================] - ETA: 13:3 - ETA: 13:1 - ETA: 12:5 - ETA: 12:3 - ETA: 12:1 - ETA: 12:0 - ETA: 11:4 - ETA: 11:2 - ETA: 11:0 - ETA: 10:4 - ETA: 10:2 - ETA: 10:0 - ETA: 9:4 - ETA: 9: - ETA: 9: - ETA: 8: - ETA: 8: - ETA: 8: - ETA: 7: - ETA: 7: - ETA: 7: - ETA: 6: - ETA: 6: - ETA: 6: - ETA: 6: - ETA: 5: - ETA: 5: - ETA: 5: - ETA: 4: - ETA: 4: - ETA: 4: - ETA: 3: - ETA: 3: - ETA: 3: - ETA: 2: - ETA: 2: - ETA: 2: - ETA: 1: - ETA: 1: - ETA: 1: - ETA: 57s - ETA: 38 - ETA: 19 - ETA: 0 - 832s 591ms/step
368/368 [==============================] - ETA: 3: - ETA: 2: - ETA: 2: - ETA: 2: - ETA: 2: - ETA: 1: - ETA: 1: - ETA: 1: - ETA: 47s - ETA: 28 - ETA: 9 - 218s 591ms/step
VGG19 train bottleneck features shape: (1409, 512) size: 721,408
VGG19 valid bottleneck features shape: (368, 512) size: 188,416<jupyter_text>LogReg on VGG16 bottleneck features<jupyter_code>logregVgg19 = LogisticRegression(multi_class='multinomial', solver='lbfgs', random_state=SEED)
logregVgg19.fit(train_vgg19_bf, (ytr * range(NUM_CLASSES)).sum(axis=1))
valid_probsVgg19 = logregVgg19.predict_proba(valid_vgg19_bf)
valid_predsVgg19 = logregVgg19.predict(valid_vgg19_bf)
print('Validation VGG19 LogLoss {}'.format(log_loss(yv, valid_probsVgg19)))
print('Validation VGG19 Accuracy {}'.format(accuracy_score((yv * range(NUM_CLASSES)).sum(axis=1), valid_predsVgg19)))<jupyter_output>Validation VGG19 LogLoss 0.33411898533364837
Validation VGG19 Accuracy 0.9239130434782609<jupyter_text>VGG19 Accuracy is 92.39%  Xception<jupyter_code>INPUT_SIZE = 299
POOLING = 'avg'
x_trainX = np.zeros((len(labels), INPUT_SIZE, INPUT_SIZE, 3), dtype='float32')
for i, img_id in tqdm(enumerate(labels['id'])):
    img = read_img(img_id, 'train', (INPUT_SIZE, INPUT_SIZE))
    x = xception.preprocess_input(np.expand_dims(img.copy(), axis=0))
    x_trainX[i] = x
print('Train Images shape: {} size: {:,}'.format(x_trainX.shape, x_trainX.size))<jupyter_output>1777it [00:18, 95.51it/s]<jupyter_text>Extract Xception bottleneck features<jupyter_code>Xtr = x_trainX[train_idx]
Xv = x_trainX[valid_idx]
print((Xtr.shape, Xv.shape, ytr.shape, yv.shape))
xception_bottleneck = xception.Xception(weights='imagenet', include_top=False, pooling=POOLING)
train_x_bf = xception_bottleneck.predict(Xtr, batch_size=32, verbose=1)
valid_x_bf = xception_bottleneck.predict(Xv, batch_size=32, verbose=1)
print('Xception train bottleneck features shape: {} size: {:,}'.format(train_x_bf.shape, train_x_bf.size))
print('Xception valid bottleneck features shape: {} size: {:,}'.format(valid_x_bf.shape, valid_x_bf.size))<jupyter_output>((1409, 299, 299, 3), (368, 299, 299, 3), (1409, 16), (368, 16))
1409/1409 [==============================] - ETA: 33:2 - ETA: 32:1 - ETA: 31:2 - ETA: 30:3 - ETA: 29:4 - ETA: 28:5 - ETA: 28:1 - ETA: 27:2 - ETA: 26:4 - ETA: 25:5 - ETA: 25:0 - ETA: 24:2 - ETA: 23:3 - ETA: 22:5 - ETA: 22:0 - ETA: 21:2 - ETA: 20:3 - ETA: 19:4 - ETA: 19:0 - ETA: 18:1 - ETA: 17:3 - ETA: 16:4 - ETA: 16:0 - ETA: 15:1 - ETA: 14:3 - ETA: 13:4 - ETA: 13:0 - ETA: 12:1 - ETA: 11:2 - ETA: 10:4 - ETA: 9:5 - ETA: 9: - ETA: 8: - ETA: 7: - ETA: 6: - ETA: 6: - ETA: 5: - ETA: 4: - ETA: 3: - ETA: 3: - ETA: 2: - ETA: 1: - ETA: 47s - ETA: 1 - 2015s 1s/step
368/368 [==============================] - ETA: 7: - ETA: 7: - ETA: 6: - ETA: 5: - ETA: 4: - ETA: 4: - ETA: 3: - ETA: 2: - ETA: 1: - ETA: 1: - ETA: 22s - 526s 1s/step
Xception train bottleneck features shape: (1409, 2048) size: 2,885,632
Xception valid bottleneck features shape: (368, 2048) size: 753,664<jupyter_text>LogReg on Xception bottleneck features<jupyter_code>logreg = LogisticRegression(multi_class='multinomial', solver='lbfgs', random_state=SEED)
logreg.fit(train_x_bf, (ytr * range(NUM_CLASSES)).sum(axis=1))
valid_probsX = logreg.predict_proba(valid_x_bf)
valid_predsX = logreg.predict(valid_x_bf)

print('Validation Xception LogLoss {}'.format(log_loss(yv, valid_probsX)))
print('Validation Xception Accuracy {}'.format(accuracy_score((yv * range(NUM_CLASSES)).sum(axis=1), valid_predsX)))<jupyter_output>Validation Xception LogLoss 0.06829603188561884
Validation Xception Accuracy 0.9809782608695652<jupyter_text>Xception Accuracy is 98% -------------------------------------------  Kernel 2<jupyter_code>import numpy as np 
import pandas as pd 
import keras
from keras.applications.vgg19 import VGG19
from keras.models import Model
from keras.layers import Dense, Dropout, Flatten

import os
from tqdm import tqdm
from sklearn import preprocessing
from sklearn.model_selection import train_test_split
import cv2<jupyter_output><empty_output><jupyter_text>First we will read in the csv's so we can see some more information on the filenames and breeds<jupyter_code>df_train = pd.read_csv('C:/Users/Nishant/ADS/Project/Dog-Project-Kaggle Competition/labels.csv')
# path of labels.csv inside your project folder

df_test = pd.read_csv('C:/Users/Nishant/ADS/Project/Dog-Project-Kaggle Competition/sample_submission.csv')
# path of sample_submission.csv inside your project folder
df_train.head(20)<jupyter_output><empty_output><jupyter_text>We can see that the breed needs to be one-hot encoded for the final submission, so we will now do this<jupyter_code>targets_series = pd.Series(df_train['breed'])
one_hot = pd.get_dummies(targets_series, sparse = True)
one_hot_labels = np.asarray(one_hot)<jupyter_output><empty_output><jupyter_text>Next we will read in all of the images for test and train, using a for loop through the values of the csv files. I have also set an im_size variable which sets the size for the image to be re-sized to, 90x90 px, you should play with this number to see how it affects accuracy.<jupyter_code>im_size = 90
x_train = []
y_train = []
x_test = []
i = 0 
for f, breed in tqdm(df_train.values):
    img = cv2.imread('C:/Users/Nishant/ADS/Project/Dog-Project-Kaggle Competition/train/{}.jpg'.format(f))
    # path of train folder inside your project folder
    
    label = one_hot_labels[i]
    x_train.append(cv2.resize(img, (im_size, im_size)))
    y_train.append(label)
    i += 1
for f in tqdm(df_test['id'].values):
    img = cv2.imread('C:/Users/Nishant/ADS/Project/Dog-Project-Kaggle Competition/test/{}.jpg'.format(f))
    # path of test folder inside your project folder
    
    x_test.append(cv2.resize(img, (im_size, im_size)))
y_train_raw = np.array(y_train, np.uint8)
x_train_raw = np.array(x_train, np.float32) / 255.
x_test  = np.array(x_test, np.float32) / 255.<jupyter_output><empty_output><jupyter_text>We check the shape of the outputs to make sure everyting went as expected.<jupyter_code>print(x_train_raw.shape)
print(y_train_raw.shape)
print(x_test.shape)<jupyter_output>(10222, 90, 90, 3)
(10222, 120)
(10357, 90, 90, 3)<jupyter_text>We can see above that there are 120 different breeds. We can put this in a num_class variable below that can then be used when creating the CNN model.<jupyter_code>num_class = y_train_raw.shape[1]<jupyter_output><empty_output><jupyter_text>It is important to create a validation set so that you can gauge the performance of your model on independent data, unseen to the model in training. We do this by splitting the current training set (x_train_raw) and the corresponding labels (y_train_raw) so that we set aside 30 % of the data at random and put these in validation sets (X_valid and Y_valid).This split needs to be improved so that it contains images from every class, with 120 separate classes some can not be represented and so the validation score is not informative.<jupyter_code>X_train, X_valid, Y_train, Y_valid = train_test_split(x_train_raw, y_train_raw, test_size=0.3, random_state=1)<jupyter_output><empty_output><jupyter_text>Now we build the CNN architecture. Here we are using a pre-trained model VGG19 which has already been trained to identify many different dog breeds (as well as a lot of other objects from the imagenet dataset see here for more information: http://image-net.org/about-overview). Unfortunately it doesn't seem possible to download the weights from within this kernel so make sure you set the weights argument to 'imagenet' and not None, as it currently is below.We then remove the final layer and instead replace it with a single dense layer with the number of nodes corresponding to the number of breed classes we have (120).  Using VGG19<jupyter_code># Create the base pre-trained model
# Can't download weights in the kernel
base_model = VGG19(weights='imagenet',include_top=False, input_shape=(im_size, im_size, 3))

# Add a new top layer
x = base_model.output
x = Flatten()(x)
predictions = Dense(num_class, activation='softmax')(x)

# This is the model we will train
model = Model(inputs=base_model.input, outputs=predictions)

# First: train only the top layers (which were randomly initialized)
for layer in base_model.layers:
    layer.trainable = False

model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])

callbacks_list = [keras.callbacks.EarlyStopping(monitor='val_acc', patience=3, verbose=1)]
model.summary()
model.fit(X_train, Y_train, epochs=2, validation_data=(X_valid, Y_valid), verbose=1)<jupyter_output>Train on 7155 samples, validate on 3067 samples
Epoch 1/2
6464/7155 [==========================>...] - ETA: 18:42 - loss: 5.0450 - acc: 0.0000e+ - ETA: 14:35 - loss: 5.0728 - acc: 0.0000e+ - ETA: 13:02 - loss: 5.0894 - acc: 0.0208   - ETA: 12:15 - loss: 5.0539 - acc: 0.01 - ETA: 11:45 - loss: 5.1523 - acc: 0.01 - ETA: 11:25 - loss: 5.1513 - acc: 0.01 - ETA: 11:11 - loss: 5.2006 - acc: 0.01 - ETA: 10:58 - loss: 5.2166 - acc: 0.01 - ETA: 10:49 - loss: 5.2438 - acc: 0.01 - ETA: 10:40 - loss: 5.2296 - acc: 0.01 - ETA: 10:32 - loss: 5.2431 - acc: 0.01 - ETA: 10:25 - loss: 5.2379 - acc: 0.01 - ETA: 10:18 - loss: 5.2363 - acc: 0.01 - ETA: 10:12 - loss: 5.2751 - acc: 0.01 - ETA: 10:07 - loss: 5.2683 - acc: 0.01 - ETA: 10:02 - loss: 5.2463 - acc: 0.01 - ETA: 9:57 - loss: 5.2209 - acc: 0.0129 - ETA: 9:55 - loss: 5.2116 - acc: 0.013 - ETA: 9:52 - loss: 5.1880 - acc: 0.014 - ETA: 9:50 - loss: 5.1843 - acc: 0.017 - ETA: 9:48 - loss: 5.1755 - acc: 0.016 - ETA: 9:45 - loss: 5.1576 - acc: 0.017 - ETA:[...]<jupyter_text>Remember, accuracy is low here because we are not taking advantage of the pre-trained weights as they cannot be downloaded in the kernel. This means we are training the wights from scratch.Next we will make our predictions.<jupyter_code>preds = model.predict(x_test, verbose=1)
sub = pd.DataFrame(preds)
# Set column names to those generated by the one-hot encoding earlier
col_names = one_hot.columns.values
sub.columns = col_names
# Insert the column id from the sample_submission at the start of the data frame
sub.insert(0, 'id', df_test['id'])
sub.head(10)<jupyter_output><empty_output><jupyter_text>Now we have used the same code above again but this time with VGG16  Using VGG16<jupyter_code># Create the base pre-trained model
# Can't download weights in the kernel
base_model = VGG16(weights='imagenet',include_top=False, input_shape=(im_size, im_size, 3))

# Add a new top layer
x = base_model.output
x = Flatten()(x)
predictions = Dense(num_class, activation='softmax')(x)

# This is the model we will train
model = Model(inputs=base_model.input, outputs=predictions)

# First: train only the top layers (which were randomly initialized)
for layer in base_model.layers:
    layer.trainable = False

model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])

callbacks_list = [keras.callbacks.EarlyStopping(monitor='val_acc', patience=3, verbose=1)]
model.summary()
model.fit(X_train, Y_train, epochs=2, validation_data=(X_valid, Y_valid), verbose=1)
preds = model.predict(x_test, verbose=1)
sub = pd.DataFrame(preds)
# Set column names to those generated by the one-hot encoding earlier
col_names = one_hot.columns.values
sub.columns = col_names
# Insert the column id from the sample_submission at the start of the data frame
sub.insert(0, 'id', df_test['id'])
sub.head(10)<jupyter_output><empty_output><jupyter_text>References<jupyter_code># Dataset
# https://www.kaggle.com/c/dog-breed-identification/data


# Kernel-1 link : https://www.kaggle.com/gaborfodor/dog-breed-pretrained-keras-models-lb-0-3
# Kernel-2 link :  https://www.kaggle.com/orangutan/keras-vgg19-starter


# References
# Docker-python : https://github.com/kaggle/docker-python<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14982864314331226, 'fraction_numerical': 0.0735145049958971, 'mean_word_length': 4.944906743185079, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 82, 'https://': 5, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 34, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '23', 'dir': 'jupyter-structured-clean-dedup', 'id': '340205', 'license': 'MIT', 'n_tokens_mistral': 9102, 'n_tokens_neox': 7854, 'n_words': 2079, 'path': 'Dog-Breed-Identification - Kaggle Competition Existing Kernels .ipynb', 'repo_name': 'nishantgohel/ADS---Dog-Breed-Identification-Project', 'size': '20717'}