\section{IoU$<$ Use\+Coordinates $>$ Class Template Reference}
\label{classmlpack_1_1metric_1_1IoU}\index{Io\+U$<$ Use\+Coordinates $>$@{Io\+U$<$ Use\+Coordinates $>$}}


Definition of Intersection over Union metric.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\textbf{ IoU} ()
\begin{DoxyCompactList}\small\item\em Default constructor required to satisfy the Metric policy. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Archive $>$ }\\void \textbf{ serialize} (Archive \&ar, const unsigned int)
\begin{DoxyCompactList}\small\item\em Serialize the metric. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename Vec\+TypeA , typename Vec\+TypeB $>$ }\\static Vec\+Type\+A\+::elem\+\_\+type \textbf{ Evaluate} (const Vec\+TypeA \&a, const Vec\+TypeB \&b)
\begin{DoxyCompactList}\small\item\em Computes the Intersection over Union metric between of two bounding boxes having pattern bx, by, h, w. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
static const bool \textbf{ use\+Coordinates} = Use\+Coordinates
\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$bool Use\+Coordinates = false$>$\newline
class mlpack\+::metric\+::\+Io\+U$<$ Use\+Coordinates $>$}

Definition of Intersection over Union metric. 

For bounding box representation there are two common representation either as coordinates i.\+e. each value in vector represents a coordinate in the format x0, y0, x1, y1 where x0, y0 represent the lower left coordinate and x1, y1, represent upper right coordinate.

Second representation follows the following representation \+: x0, y0, h, w. Where x0 and y0 are bottom left bounding box coordinates and h, w are height and width of the bounding box.


\begin{DoxyTemplParams}{Template Parameters}
{\em use\+Coordinates} & Toggles between the two representation of bounding box. If true, each value in vector represents a coordinate in the formate x0, y0, x1, y1. Else the bounding box is represented as x0, y0, h, w. \\
\hline
\end{DoxyTemplParams}


Definition at line 39 of file iou\+\_\+metric.\+hpp.



\subsection{Constructor \& Destructor Documentation}
\mbox{\label{classmlpack_1_1metric_1_1IoU_a95184d4e35a737ca44f85b33e9b9c7e3}} 
\index{mlpack\+::metric\+::\+IoU@{mlpack\+::metric\+::\+IoU}!IoU@{IoU}}
\index{IoU@{IoU}!mlpack\+::metric\+::\+IoU@{mlpack\+::metric\+::\+IoU}}
\subsubsection{Io\+U()}
{\footnotesize\ttfamily \textbf{ IoU} (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Default constructor required to satisfy the Metric policy. 



Definition at line 43 of file iou\+\_\+metric.\+hpp.



References Io\+U$<$ Use\+Coordinates $>$\+::\+Evaluate().



\subsection{Member Function Documentation}
\mbox{\label{classmlpack_1_1metric_1_1IoU_af39380107875eb94f0efef7d37cc57df}} 
\index{mlpack\+::metric\+::\+IoU@{mlpack\+::metric\+::\+IoU}!Evaluate@{Evaluate}}
\index{Evaluate@{Evaluate}!mlpack\+::metric\+::\+IoU@{mlpack\+::metric\+::\+IoU}}
\subsubsection{Evaluate()}
{\footnotesize\ttfamily static Vec\+Type\+A\+::elem\+\_\+type Evaluate (\begin{DoxyParamCaption}\item[{const Vec\+TypeA \&}]{a,  }\item[{const Vec\+TypeB \&}]{b }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Computes the Intersection over Union metric between of two bounding boxes having pattern bx, by, h, w. 


\begin{DoxyTemplParams}{Template Parameters}
{\em Vec\+TypeA} & Type of first vector. \\
\hline
{\em Vec\+TypeB} & Type of second vector. \\
\hline
\end{DoxyTemplParams}

\begin{DoxyParams}{Parameters}
{\em a} & First vector. \\
\hline
{\em b} & Second vector. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\doxyref{IoU}{p.}{classmlpack_1_1metric_1_1IoU} of vectors a and b. 
\end{DoxyReturn}


Referenced by Io\+U$<$ Use\+Coordinates $>$\+::\+Io\+U().

\mbox{\label{classmlpack_1_1metric_1_1IoU_af0dd9205158ccf7bcfcd8ff81f79c927}} 
\index{mlpack\+::metric\+::\+IoU@{mlpack\+::metric\+::\+IoU}!serialize@{serialize}}
\index{serialize@{serialize}!mlpack\+::metric\+::\+IoU@{mlpack\+::metric\+::\+IoU}}
\subsubsection{serialize()}
{\footnotesize\ttfamily void serialize (\begin{DoxyParamCaption}\item[{Archive \&}]{ar,  }\item[{const unsigned}]{int }\end{DoxyParamCaption})}



Serialize the metric. 



\subsection{Member Data Documentation}
\mbox{\label{classmlpack_1_1metric_1_1IoU_a6c223cd63c9c9434b5e5fca28a8ed517}} 
\index{mlpack\+::metric\+::\+IoU@{mlpack\+::metric\+::\+IoU}!use\+Coordinates@{use\+Coordinates}}
\index{use\+Coordinates@{use\+Coordinates}!mlpack\+::metric\+::\+IoU@{mlpack\+::metric\+::\+IoU}}
\subsubsection{use\+Coordinates}
{\footnotesize\ttfamily const bool use\+Coordinates = Use\+Coordinates\hspace{0.3cm}{\ttfamily [static]}}



Definition at line 62 of file iou\+\_\+metric.\+hpp.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
/var/www/mlpack.\+ratml.\+org/mlpack.\+org/\+\_\+src/mlpack-\/git/src/mlpack/core/metrics/\textbf{ iou\+\_\+metric.\+hpp}\end{DoxyCompactItemize}
