\begin{tikzpicture}
	\vspace*{0.5cm}
	\centering
	\onslide<1->{
		\pgfmathsetmacro\x{0}
		\pgfmathsetmacro\y{3}

		\draw (0,0+\y) grid[xstep=0.5,ystep=0.5] (5,0.5+\y);
		\node (w) at (0.25,\y+0.25) {\scriptsize $\hat{c}$};
		\node (h) at (0.75,\y+0.25) {\scriptsize $\hat{w}$};
		\node (x) at (1.25,\y+0.25) {\scriptsize $\hat{h}$};
		\node (y) at (1.75,\y+0.25) {\scriptsize $\hat{x}$};
		\node (pc) at (2.25,\y+0.25) {\scriptsize $\hat{y}$};
		\node (pd) at (2.75,\y+0.25) {\scriptsize $\hat{\ell_1}$};

		\node (w) at (3.25,\y+0.25) {\scriptsize $\hat{\ell_2}$};
		\node (h) at (3.75,\y+0.25) {$\cdot$};

		\node (w) at (4.25,\y+0.25) {$\cdot$};
		\node (h) at (4.75,\y+0.25) {\scriptsize $\hat{\ell_k}$};   

		\draw (0,0+\y)--(5,0+\y);

		\node(img) at (2.5,0){
			\includegraphics[scale=0.4,trim={0cm 4.5cm 21.2cm 4cm},clip]{images/dog.pdf}
		};

		\pgfmathsetmacro\x{0.6+2.5}
		\pgfmathsetmacro\y{-1.05}
		\filldraw[fill=green!50!white, draw=black,opacity=0.6](\x,\y) rectangle (\x+0.48,\y+0.48);
		\draw[line width=0.1mm,color=green] (0.5+2.3,-1.3) rectangle (1.3+2.5,-0.1);    
	}

	\onslide<2->{
		\pgfmathsetmacro\x{0}
		\pgfmathsetmacro\y{3}
		\filldraw[color=gray!70!white](0.5,0+\y) rectangle (5,0.5+\y);
		%\filldraw[color=gray!70!white](2.5,0+\y) rectangle (5,0.5+\y);
		\draw (0,0+\y) grid[xstep=0.5,ystep=0.5] (5,0.5+\y);
	}

	
	
\end{tikzpicture}
