\documentclass{article}[12pt]

% useful packages
\usepackage{titlesec}
\usepackage{fullpage}
\usepackage{amsmath,amssymb,amsthm,amsfonts}
\usepackage{graphicx}
\usepackage{enumerate}
\usepackage{algorithm,algorithmic}
\usepackage{xcolor}
\usepackage{bbm}
\usepackage{url}
\usepackage{hyperref}

% theorem type environments
\newtheorem{thm}{Theorem}
\newtheorem{prop}{Proposition}
\newtheorem{lemma}{Lemma}
\newtheorem{cor}{Corollary}
\newtheorem{defn}{Definition}
\newtheorem{assump}{Assumption}
\newtheorem{example}{Example}
\newtheorem{conjecture}{Conjecture}

% frequently used symbols
\newcommand{\bE}{\mathbb{E}}
\newcommand{\bP}{\mathbb{P}}
\newcommand{\bQ}{\mathbb{Q}}
\newcommand{\bR}{\mathbb{R}}
\newcommand{\bS}{\mathbb{S}}
\newcommand{\bN}{\mathbb{N}}
\newcommand{\bZ}{\mathbb{Z}}
\newcommand{\sC}{{\mathcal C}} 
\newcommand{\sD}{{\mathcal D}} 
\newcommand{\sE}{{\mathcal E}} 
\newcommand{\sF}{{\mathcal F}} 
\newcommand{\sL}{{\mathcal L}} 
\newcommand{\sH}{{\mathcal H}} 
\newcommand{\sN}{{\mathcal N}} 
\newcommand{\sO}{{\mathcal O}} 
\newcommand{\sP}{{\mathcal P}} 
\newcommand{\sR}{{\mathcal R}} 
\newcommand{\sS}{{\mathcal S}}
\newcommand{\sU}{{\mathcal U}} 
\newcommand{\sX}{{\mathcal X}} 
\newcommand{\sY}{{\mathcal Y}} 
\newcommand{\sZ}{{\mathcal Z}}

% operators
\newcommand{\sign}{\mathop{\mathrm{sign}}}
\newcommand{\supp}{\mathop{\mathrm{supp}}} % support
\newcommand{\argmin}{\operatornamewithlimits{arg\ min}}
\newcommand{\argmax}{\operatornamewithlimits{arg\ max}}
\newcommand{\dist}{\operatorname{dist}}
\newcommand{\tr}{\text{tr}}
\newcommand{\vecop}{\text{vec}}
\newcommand{\st}{\operatorname{s.t.}}
\newcommand{\cut}{\setminus}
\newcommand{\ind}[1]{\mathbbm{1}\left\{#1\right\}} 
\newcommand{\given}{\ | \ }

% grouping operators
\newcommand{\brac}[1]{\left[#1\right]}
\newcommand{\set}[1]{\left\{#1\right\}}
\newcommand{\abs}[1]{\left\lvert #1 \right\rvert}
\newcommand{\paren}[1]{\left(#1\right)}
\newcommand{\norm}[1]{\left\|#1\right\|}
\newcommand{\ip}[2]{\left\langle #1,#2 \right\rangle}

% code commands
\newcommand{\matlab}{\textsc{Matlab }}
\newcommand{\python}{\textsc{Python }}
\newcommand{\todo}[1]{\textcolor{red}{#1}}

% header command
\newcommand{\project}[3]{
    \pagestyle{myheadings}
    \thispagestyle{plain}
    \newpage
    \setcounter{page}{1}
    \setlength{\headsep}{10mm}
    \noindent
    \begin{center}
    \framebox{
        \vbox{\vspace{2mm}
            \hbox to 6.28in { {\bf EE 519: Deep Learning Theory \& Fundamentals
            \hfill Spring \the\year} }
        \vspace{4mm}
        \hbox to 6.28in { {\Large \hfill Mini Project #1 \hfill} }
        \vspace{2mm}
        \hbox to 6.28in { \Large \hfill Due: #2, 11:59PM PT \hfill }
        \vspace{2mm}
        \hbox to 6.28in { {\it Student Name: #3} \hfill {\it Instructor Name: John Lipor}}
        \vspace{2mm}}
   }
   \end{center}
   \markboth{Mini Project #1}{Mini Project #1}
   \vspace*{4mm}
}

\begin{document}

% PUT YOUR NAME BELOW WHERE I HAVE \X
\project{3}{June 16, \the\year}{}
% PUT YOUR NAME ABOVE WHERE I HAVE \X

\section*{Introduction}

Diagnosing medical pathologies is a key application of artificial intelligence, especially in recent years as the success of convolutional neural networks (CNNs) has become increasingly prominent. One open research problem in this area is to determine pathologies from ultrasound images, which are sensitive to blood flow, as well as other tissues that would not be visible through other imaging modalities. As a step toward this goal, in this project, you will work with ultrasound eye images
to predict the horizontal and vertical diameter of the eyeball. An example image is shown in Fig.~\ref{fig:annotated}, where the human-labeled diameters are also shown.

\begin{figure}[h!]
    \centering
    \includegraphics[width=4in]{46_annotated.png}
    \caption{Example ultrasound image with horizontal and vertical diameters drawn. The goal of this project is to automatically determine these diameters from the raw image.}
    \label{fig:annotated}
\end{figure}

You are provided with ultrasound images and their corresponding labels. However, since we are attempting to predict both the horizontal and vertical diameters, this is a multi-output regression problem. Further, since labeling these images is a costly process, we are again working in a data-limited regime with only 100 total images, 80 used for training and 20 for testing. Your task is to train a neural network to predict both diameters. As with other projects, you will submit your
predictions on the test set, and I will evaluate your score using the mean absolute error.
\footnote{The top scoring project will receive 507 Lipor points.}

%\vspace{1em}
%\noindent \textbf{Notes:} 
\subsection*{Notes}
\begin{enumerate}
    \item Your network must be coded and trained using PyTorch and D2L (not Keras or other similar packages).
    \item You may make full use of StackExchange, Medium, or any other online resource you can find.
    \item You may copy code from the internet, but you must \textbf{understand} what the code is doing and \textbf{cite} the source you copied it from.
    \item You may \textbf{not} copy code from other students in this class. You \textbf{may} share MP1 or MP2 code among yourselves.
\end{enumerate}

\section*{Requirements}

You must create a report in either \LaTeX or an approved type setting language (\textbf{not} Microsoft Word) that contains the following sections:

\begin{enumerate}
    \item Problem description 
        \begin{itemize}
            \item Explain what data you have to work with, what algorithms you will use, what your goal is, and why anyone should care.
        \end{itemize}
    \item Exploratory data analysis (EDA)
        \begin{itemize}
            \item Since we are working with images, EDA will look different and perhaps be less involved than for MP1. You should still examine the ranges of image values and labels, remove outliers, etc.
            \item There are many excellent tutorials on EDA online. Cite whichever ones you found helpful.
            \item Be sure to make any significant findings stand out and try to keep this concise.
        \end{itemize}
    \item Challenges
        \begin{itemize}
            \item What were the challenges you encountered when applying machine learning to this dataset?
            \item Did these challenges mainly result from the data? From results? Installing libraries to perform preprocessing?
        \end{itemize}
    \clearpage
    \item Approach
        \begin{itemize}
            \item \textbf{(NEW)} This is a multi-output regression problem, which you must solve using a single network. In other words, you may not train separate networks for vertical and horizontal diameters. Instead, you must structure your network to have two separate outputs. You may have as many (or few) shared layers as you wish.
            \item Upon opening the dataset, you may notice that there are very few images to use for training, which will be further reduced when you create training and validation sets. As a result, you \textbf{must} describe approaches you took to overcoming the limited dataset size. This need not be through image augmentation,\footnote{See \texttt{torchvision.transforms}.} but it could be.
            \item Provide a thorough but concise description of your approach, including (but not limited to) your approach to wrangling, preprocessing, and improving the performance of your predictor.
            \item To avoid overfitting, you must use some form of validation (either a single validation set or cross validation) to tune your hyperparameters. Describe how you went about this and why.
            \item A summary paragraph at the beginning of this section could be helpful.
        \end{itemize}
    \item Evaluation and summary
        \begin{itemize}
            \item You must provide some insights into which parts of the images your CNN is utilizing for prediction. For example, you may use class activation maps or guided backpropagation to visualize this.
            \item You may also wish to display the learned feature maps and filters, but only do so if they are informative and you are able to draw a conclusion from them.
            \item Make use of any meaningful metrics, regression MSE, classification error), but only include metrics that tell you something different.
            \item Consider diving into the data to see if you can determine any trends regarding which points were misclassified.
            \item Likewise consider if there were any features that were particularly important or unimportant.
            \item Summarize your solution, describing what worked, what didn't, what the main limitations are (e.g., if nonlinear classifiers would improve results), and any general conclusions about the dataset.
        \end{itemize}
    \item What I learned
        \begin{itemize}
            \item Describe the main skills/tools that you learned and used for this project and how you learned them.
        \end{itemize}
\end{enumerate}

\clearpage
\section*{Grading}

The grading breakdown is below. Each section will be graded according to technical correctness, effort, and creativity. Note that clarity of writing is a major component. You should put yourself in the place of writing for a boss or senior in a workplace. If your writing is terrible, they will assume your work is terrible.
\begin{table}[h!]
\centering
\normalsize % The size of the table text can be changed depending on content. Remove if desired.
\begin{tabular}{ | c | c | }
\hline
\textbf{Item} & \textbf{Percentage} \\
\hline
Description & 5\% \\
\hline
EDA & 20\% \\
\hline
Challenges & 10\% \\
\hline
Approach & 30\% \\
\hline
Evaluation & 20\% \\
\hline
What I learned & 5\% \\
\hline
Clarity/conciseness of written communication & 10\% \\
\hline
\end{tabular}
\end{table}

\clearpage
\bibliographystyle{IEEEtran}
\bibliography{bibliography}

\end{document}
