\documentclass[11pt, a4paper]{article}

% --- UNIVERSAL PREAMBLE BLOCK --- \usepackage[a4paper, top=2.5cm, bottom=2.5cm, left=2.5cm, right=2.5cm]{geometry} \usepackage{fontspec}

\usepackage[english, bidi=basic, provide=*]{babel}

\babelprovide[import, onchar=ids fonts]{english}

% Set default/Latin font to Sans Serif in the main (rm) slot \babelfont{rm}{Noto Sans}

% --- END UNIVERSAL PREAMBLE BLOCK ---

\usepackage{amsmath} % For math environments like SSIM formula \usepackage{parskip} % Adds space between paragraphs, no indent

% Title \title{Our Hackathon Story: Delta-V} \author{Delta-V Team} \date{} % No date

\begin{document}

\maketitle

\section*{What Inspired Us}

We were inspired by the problem statement itself and the high-stakes, data-driven world of F1. From the pit lane to post-race scrutineering, "spot the difference" is a critical, high-pressure task. A human inspector in parc fermé can get tired and miss a subtle, illegal wing flex. An engineer comparing telemetry photos might not spot a hairline crack in a carbon fibre suspension arm.

We were inspired by the potential for failure in these systems and the challenge of automating what seems like a simple human task. We wanted to build a tool that could find the "needle in a haystack"—that one critical delta in a sea of visual noise—and do it tirelessly, whether it's checking for compliance or spotting damage after a lap.

\section*{How We Built It}

We built Delta-V as a client-server application.

\begin{enumerate} \item \textbf{Frontend:} A simple, clean web interface built with \textbf{React} and \textbf{Tailwind CSS}. It allows a user to upload a "baseline" (e.g., CAD drawing or pre-race photo) and a "comparison" (e.g., post-qualifying photo) image.

\item \textbf{Backend:} A \textbf{Python} backend using the \textbf{FastAPI} framework to create a simple API endpoint. This is where the magic happens.

\item \textbf{The Core Pipeline:} When the images are uploaded, our backend pipeline executes several key steps using \textbf{OpenCV}:
\begin{itemize}
    \item \textbf{Grayscaling:} First, we convert both images to grayscale, as color data can often be noise when looking for structural changes on a complex livery.

    \item \textbf{Image Registration:} This was critical. We can't assume the images are perfectly aligned (a car is never parked in the \textit{exact} same spot). We use feature detection (like ORB) to find keypoints, match them, and compute a homography matrix. This lets us "warp" the 'after' image to perfectly overlay the 'before' image.

    \item \textbf{Difference Calculation:} Instead of a naive pixel-by-pixel subtraction, we used the \textbf{Structural Similarity Index (SSIM)} from \texttt{scikit-image}. SSIM is far more robust as it accounts for changes in luminance, contrast, and structure—perfect for spotting a new aero part versus just a shadow. The SSIM algorithm's core formula is:
    \[
    \text{SSIM}(x, y) = \frac{(2\mu_x\mu_y + c_1)(2\sigma_{xy} + c_2)}{(\mu_x^2 + \mu_y^2 + c_1)(\sigma_x^2 + \sigma_y^2 + c_2)}
    \]

    \item \textbf{Thresholding \& Contours:} The SSIM gives us a "diff" image. We apply an adaptive binary threshold to isolate \textit{only} the significant changes. From this, we find the contours (outlines) of the changed regions.

    \item \textbf{Visualization:} We draw these contours as bright red bounding boxes on the "after" image—showing exactly which part of the front wing or bargeboard was modified—and send this final, annotated image back to the user.
\end{itemize}

\end{enumerate}

\section*{What We Learned}

Our biggest takeaway was that "spot the difference" is infinitely more complex than it sounds. We learned: \begin{itemize} \item \textbf{The World is Not Aligned:} Simple pixel subtraction is useless. We learned that \textbf{Image Registration} is not an optional step; it's the \textit{most important} step.

\item \textbf{The Power of SSIM:} We learned that "difference" is a perceptual concept, not a mathematical one. SSIM is a brilliant algorithm that tries to quantify this perceptual difference.

\item \textbf{Prototyping \& Integration:} We learned how to rapidly connect a powerful Python CV backend with a modern web frontend, using FastAPI as the lightweight "glue" that made it all possible.

\end{itemize}

\section*{Challenges We Faced}

\begin{enumerate} \item \textbf{Image Alignment Hell:} Our first diffs were a total mess. A 1-degree shift in camera angle made the \textit{entire car} light up as "different." We spent a significant chunk of our time implementing and tuning the feature-based image registration (alignment) to get a stable baseline.

\item \textbf{Finding the Signal in the Noise:} After SSIM, our diff image still had a lot of "noise" from minor lighting changes in the garage or reflections on the car's bodywork. Finding the right \textbf{thresholding value} to \textit{only} highlight significant, real-world changes (like a new aero part) without picking up shadows was a massive challenge of trial and error.

\item \textbf{Classification:} The problem statement mentions "classifying" the change. This is a full-on Machine Learning problem. With the hackathon's time limit, we couldn't build a deep learning model. We cleverly "hacked" this by classifying changes based on simple heuristics, like the \textit{area} of the contour (e.g., `area < 100px` = "Tyre Debris/Scuff", `area > 100px` = "Component Change / Damage"). This served as a proof-of-concept for a much larger, smarter system.

\end{enumerate}

\end{document}

Built With

Share this project:

Updates