Group work for a Monash Research Methods course

report writing, new model file

Silver-T 5c5f0d08 f9c5ffef

+38 -18
+1 -1
mini_proj/Load_Images.py
··· 79 79 imgs_lbl.append(0) 80 80 81 81 print('Completed: {0}/{1} non-Waldo images'.format(nw+1, total_nw)) 82 - if nw > 50*w: 82 + if nw > 10*w: 83 83 print("Non_Waldo files restricted") 84 84 break 85 85 else:
mini_proj/Waldo.h5

This is a binary file and will not be displayed.

+33 -13
mini_proj/report/waldo.tex
··· 3 3 4 4 \usepackage{graphicx} % Used to insert images into the paper 5 5 \usepackage{float} 6 + \usepackage{caption} 7 + \interfootnotelinepenalty=10000 % Stops footnotes overflowing onto the newt page 6 8 \usepackage[justification=centering]{caption} % Used for captions 7 9 \captionsetup[figure]{font=small} % Makes captions small 8 10 \newcommand\tab[1][0.5cm]{\hspace*{#1}} % Defines a new command to use 'tab' in text ··· 98 100 their basic versions. In contrast, we will use different neural network 99 101 architectures, as this method is currently the most used for image 100 102 classification. 101 - 102 - \todo{ 103 - \\A couple of papers that may be useful (if needed): 104 - - LeNet: http://yann.lecun.com/exdb/publis/pdf/lecun-01a.pdf 105 - - AlexNet: http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks 106 - - General comparison of LeNet and AlexNet: 107 - "On the Performance of GoogLeNet and AlexNet Applied to Sketches", Pedro Ballester and Ricardo Matsumura Araujo 108 - - Deep NN Architecture: 109 - https://www-sciencedirect-com.ezproxy.lib.monash.edu.au/science/article/pii/S0925231216315533 110 - } 111 103 112 104 \subsection{Classical Machine Learning Methods} 113 105 ··· 173 165 The Fully Convolutional Network (FCN) contains only one dense layer for the final binary classification step. 174 166 The FCN instead consists of an extra convolutional layer, resulting in an increased ability for the network to abstract the input data relative to the other two configurations. 175 167 \\ 176 - \textbf{Insert image of LeNet from slides} 168 + \todo{Insert image of LeNet from slides if time} 177 169 178 170 \section{Method} \label{sec:method} 179 171 \tab ··· 217 209 \subsection{Neural Network Testing}\label{nnTesting} 218 210 \tab After training each network, a separate test set of images (and labels) was used to evaluate the models. 219 211 The result of this testing was expressed primarily in the form of an accuracy (percentage). 220 - These results as well as the other methods presented in this paper are given in Figure \textbf{[insert ref to results here]} of the Results section. 221 - \textbf{***********} 212 + These results as well as the other methods presented in this paper are given in Table \ref{tab:results}. 222 213 % Kelvin Start 223 214 \subsection{Benchmarking}\label{benchmarking} 224 215 ··· 270 261 % Kelvin End 271 262 272 263 \section{Results} \label{sec:results} 264 + \tab The time taken to train each of the neural networks and traditional approaches was measured and recorded alongside their accuracy (evaluated using a separate test dataset) in Table \ref{tab:results}. 265 + 266 + % Annealing image and caption 267 + \begin{table}[H] 268 + \centering 269 + \renewcommand{\arraystretch}{1.5} % Adds some space to the table 270 + \begin{tabular}{|c|c|c|} 271 + \hline 272 + \textbf{Method} & \textbf{Test Accuracy} & \textbf{Training Time (s)}\\ 273 + \hline 274 + LeNet & 87.86\% & 65.67\\ 275 + \hline 276 + CNN & 95.63\% & 119.31\\ 277 + \hline 278 + FCN & 94.66\% & 113.94\\ 279 + \hline 280 + Support Vector Machine & 83.50\% & 5.90\\ 281 + \hline 282 + K Nearest Neighbours & 67.96\% & 0.22\\ 283 + \hline 284 + Gaussian Naive Bayes & 85.44\% & 0.15\\ 285 + \hline 286 + Random Forest & 92.23\% & 0.92\\ 287 + \hline 288 + \end{tabular} 289 + \captionsetup{width=0.70\textwidth} 290 + \caption{Comparison of the accuracy and training time of each neural network and traditional machine learning technique} 291 + \label{tab:results} 292 + \end{table} 273 293 274 294 \section{Conclusion} \label{sec:conclusion} 275 295
+4 -4
mini_proj/waldo_model.py
··· 49 49 ## Define the model start and end 50 50 model = Model(inputs=inputs, outputs=classif) 51 51 # Optimizer recommended Adadelta values (lr=0.01) 52 - model.compile(optimizer=Adam(), loss='binary_crossentropy', metrics=['accuracy', f1]) 52 + model.compile(optimizer=Adam(), loss='binary_crossentropy', metrics=['accuracy']) 53 53 54 54 return model 55 55 ··· 79 79 ## Define the model start and end 80 80 model = Model(inputs=inputs, outputs=classif) 81 81 # Optimizer recommended Adadelta values (lr=0.01) 82 - model.compile(optimizer=Adam(), loss='binary_crossentropy', metrics=['accuracy', f1]) 82 + model.compile(optimizer=Adam(), loss='binary_crossentropy', metrics=['accuracy']) 83 83 84 84 return model 85 85 ··· 107 107 108 108 ## Define the model start and end 109 109 model = Model(inputs=inputs, outputs=classif) 110 - model.compile(optimizer=Adam(), loss='binary_crossentropy', metrics=['accuracy', f1]) 110 + model.compile(optimizer=Adam(), loss='binary_crossentropy', metrics=['accuracy']) 111 111 112 112 return model 113 113 ··· 115 115 AlexNet architecture 116 116 ''' 117 117 def AlexNet(): 118 - inputs = Input(shape=(3, 64, 64)) 118 + #inputs = Input(shape=(3, 64, 64)) 119 119 120 120 121 121 return model