<commit_before>\documentclass{beamer}
\usetheme{Luebeck}
\usecolortheme{whale}
\usepackage[]{algorithm2e}
\usepackage{amsmath}

\begin{document}
\title[Scalable EM Alignment]
{Scalable Alignment of Electron Microscope Image Sections}
\author[<NAME>] {<NAME> \and <NAME>}
\date{\today}

\frame{\titlepage}

\begin{frame}
\frametitle{Table of Contents}
\begin{itemize}
\item Overview
\item Pairwise Alignment
\item Global Stack Alignment
\item Other Attempted Methods
\item References
\item Acknowledgements 
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Overview}
\begin{itemize}
\item \textbf{Goals}
\begin{itemize}
\item Scalable alignment of 3D Electron Microscope sections of mouse brain.
\item Integration with CAJAL-3D API for easy image retrieval and upload from database.
\end{itemize}
\item \textbf{Difficulties:} 
\begin{itemize}
\item Approach must be scalable.
\item ($1024 \times 1024 \times 2000$ in the smallest data set $\approx 2B$ voxels.)
\item most datasets occupy TB of space; infeasible do align all at once.
\end{itemize}
\item \textbf{General Method}
\begin{enumerate}
\item Compute the transformations for alignment between adjacent pairs of images using cross-correlation.
\item Globally align an entire image cube using pairwise transformation parameters.
\end{enumerate}
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Pairwise Alignment}
\textbf{Objective:} Compute the transformations necessary to align adjacent pairs of images. \\
Outline of procedure:
\begin{enumerate}
\item Compute pairwise transformation parameters.
\item Improve rotation parameter through error minimization.
\item Refine transformations using image data outside pairwise images to minimize error.
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{Pairwise Alignment}
\framesubtitle{Compute Pairwise Transformation Parameters}
\textbf{Objective:} Determine the transformations necessary to align image pair. \\
For each pair of images:
\begin{enumerate}
\item Apply median filtering, histogram equalization, and hamming window. 
\item Take Discrete Fourier Transform, apply high-pass filter, and resample in log-polar coordinates. 
\item Find best $\rho$, $\theta$ by correlation and max picking. 
\item Rotate image, then correlate to find the best translation parameters.
\item Use Support Vector Machine (SVM) to identify peak in cross-correlation of image pair. 
\item Save the transformation parameters.
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{Pairwise Alignment}
\framesubtitle{Peak Identification}
\textbf{Objective:} Determine peaks in the cross-correlation of two images that correspond to translations for correct alignment. \\
\begin{enumerate}
\item Train SVM classifier with selected peak features. 
\item Partition cross-correlation of pairwise images. 
\item Find maximum intensity of each partition. 
\item Classify as peak/non-peak using SVM! 
\end{enumerate}
Other Attempted Methods:
\begin{itemize}
\item Choose maximum values.
\item Correlate pairwise cross-correlation with normal distribution. 
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Pairwise Alignment}
\framesubtitle{Improve Rotation Parameter} 
\textbf{Objective:} Evaluate the correct alignment rotation with a finer level of discretization. 
\begin{enumerate}
\item Given initial estimate of rotation angle $\theta$ necessary to align images...
\item Iterate over a small window $\theta_{new} = [\theta-k\epsilon, \theta+k\epsilon]$, in increments of $\epsilon$.
\item Compute alignment error with $\theta_{new}$ as rotation angle.
\item Update rotation parameter with angle that minimizes Mean Squared Error (MSE) between image pair.
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{Pairwise Alignment}
\framesubtitle{Refine Transformation Parameters}
\textbf{Objective:} For alignment of image pair $I_2, I_3$, use data from images $I_1$ and $I_4$. \\
\begin{enumerate}
\item Calculate pairwise transformation parameters between $I_1,I_3$ and $I_2,I_4$.
\item Obtain 2 more estimations of transformation parameters between $I_2,I_3$ using new information.
\item Determine the Mean Squared Error between image pair using all estimates of transformations.
\item Pick transformation that minimizes error.
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{Global Stack Alignment}
\textbf{Objective:} Given transformation parameters between all adjacent image pairs, compute transformation to each image in global coordinate frame.
\begin{enumerate}
\item Set previous global transformations of previous image to current image. 
\item Find new rotation angle.<commit_msg>update presentation<commit_after>\documentclass{beamer}
\usetheme{Luebeck}
\usecolortheme{whale}
\usepackage[]{algorithm2e}
\usepackage{amsmath}

\begin{document}
\title[Scalable EM Alignment]
{Scalable Alignment of Electron Microscope Image Sections}
\author[Zou, Ni] {<NAME> \and <NAME>}
\date{\today}

\frame{\titlepage}

\begin{frame}
\frametitle{Table of Contents}
\begin{itemize}
\item Overview
\item Pairwise Alignment
\item Global Stack Alignment
\item Other Attempted Methods
\item References
\item Acknowledgements 
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Overview}
\begin{itemize}
\item \textbf{Goals}
\begin{itemize}
\item Scalable alignment of 3D Electron Microscope sections of mouse brain.
\item Integration with CAJAL-3D API for easy image retrieval and upload from database.
\end{itemize}
\item \textbf{Difficulties:} 
\begin{itemize}
\item Approach must be scalable.
\item ($1024 \times 1024 \times 2000$ in the smallest data set $\approx 2B$ voxels.)
\item most datasets occupy TB of space; infeasible do align all at once.
\end{itemize}
\item \textbf{General Method}
\begin{enumerate}
\item Compute the transformations for alignment between adjacent pairs of images using cross-correlation.
\item Globally align an entire image cube using pairwise transformation parameters.
\end{enumerate}
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Pairwise Alignment}
\textbf{Objective:} Compute the transformations necessary to align adjacent pairs of images. \\
Outline of procedure:
\begin{enumerate}
\item Compute pairwise transformation parameters.
\item Improve rotation parameter through error minimization.
\item Refine transformations using image data outside pairwise images to minimize error.
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{Pairwise Alignment}
\framesubtitle{Compute Pairwise Transformation Parameters}
\textbf{Objective:} Determine the transformations necessary to align image pair. \\
For each pair of images:
\begin{enumerate}
\item Apply median filtering, histogram equalization, and hamming window. 
\item Take Discrete Fourier Transform, apply high-pass filter, and resample in log-polar coordinates. 
\item Find best $\rho$, $\theta$ by correlation and max picking. 
\item Rotate image, then correlate to find the best translation parameters.
\item Use Support Vector Machine (SVM) to identify peak in cross-correlation of image pair. 
\item Save the transformation parameters.
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{Pairwise Alignment}
\framesubtitle{Peak Identification}
\textbf{Objective:} Determine peaks in the cross-correlation of two images that correspond to translations for correct alignment. \\
\begin{enumerate}
\item Train SVM classifier with selected peak features from already aligned images (ground truth)
\item Partition cross-correlation of pairwise images into 9 equal parts.
\item Find the coordinate of maximum intensity of each partition.
\item Sort the coordinates with respect to maximum intensity.
\item Classify each of the 9 potential peaks in descending order until a peak is found.
\item If none of the peaks are classified as peaks, then no peaks detected.
\end{enumerate}
Other Attempted Methods:
\begin{itemize}
\item Choose maximum values
\item Correlate pairwise cross-correlation with normal distribution. 
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Pairwise Alignment}
\framesubtitle{Improve Rotation Parameter} 
\textbf{Objective:} Evaluate the correct alignment rotation with a finer level of discretization. 
\begin{enumerate}
\item Given initial estimate of rotation angle $\theta$ necessary to align images...
\item Iterate for each $k$ over a small window $\theta_{new} = [\theta-k\epsilon, \theta+k\epsilon]$, in increments of $\epsilon$.
\item Compute alignment error with $\theta_{new}$ as rotation angle.
\item Update rotation parameter with angle that minimizes Mean Squared Error (MSE) between image pair.
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{Pairwise Alignment}
\framesubtitle{Refine Transformation Parameters}
\textbf{Objective:} For alignment of image pair $I_2, I_3$, use data from images $I_1$ and $I_4$. \\
\begin{enumerate}
\item Calculate pairwise transformation parameters between $I_1,I_3$ and $I_2,I_4$.
\item Obtain 2 more estimations of transformation parameters between $I_2,I_3$ using new information.
\item Determine the Mean Squared Error between image pair using all estimates of transformations.
\item Pick transformation that minimizes error.
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{Global Stack Alignment}
\textbf{Objective:} Given transformation parameters between all adjacent image pairs, compute transformation to each image in global coordinate frame.
\begin{enumerate}
\item Set previous global transformations of previous image to current image. 
\item Find new rotation angle.
{'fraction_non_alphanumeric': 0.08578353883443987, 'fraction_numerical': 0.005901570239224365, 'mean_word_length': 5.305647840531561, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5132510', 'n_tokens_mistral': 2728, 'n_tokens_neox': 2612, 'n_words': 1082}