One can modify the pictured example so as to have domain, say, the set of $(x,y) \in \mathbb{R}^2$ with $0 < x < 1$. Imagine the function being given by taking a line segment of width $1$, mapping the center of the line segment to $f(\frac{1}{2},y)$, and then carrying around the rest of the line segment linearly. Thus we need a continuous function $g: \mathbb{R} \rightarrow \mathbb{R}^2$ so as to set $f(\frac{1}{2},y) = g(y)$. If $g$ is smooth with nowhere vanishing derivative, $f$ is locally injective. It is easy to choose such a $g$ so as to make $f$ surjective -- e.g. make sure that every once in a while $g$ traces out the circle of radius $\frac{n}{2}$ centered at the origin for each $n \in \mathbb{Z}^+$. -- and not injective -- each make sure $g$ does what I said above at least twice for each positive integer $n$.
More precisely: I want the segment to be oriented so that for all $y \in \mathbb{R}$, it is perpendicular to the tangent vector $g'(y)$. Once I specify its orientation is at $y = 0$ (take it to be horizontal; it doesn't matter) that determines it for all $y$.
Since the domain of $f$ is diffeomorphic to $\mathbb{R}^2$, we can pull this back to get a (smooth) counterexample $f: \mathbb{R}^2 \rightarrow \mathbb{R}^2$.
Added: The above construction can also be used to give an $f$ such that for all $v \in \mathbb{R}^2$, $f^{-1}(v)$ is countably infinite. Countably infinite is the largest possible preimage for a locally injective function on $\mathbb{R}^2$ (or any $\sigma$-compact $T_1$ topological space): cover $\mathbb{R}^2$ by countably many compact subsets. If any preimage were uncountable, its intersection with some compact subset would be uncountable, and thus the preimage of $f^{-1}(v)$ would have an accumulation point, at which $f$ is not locally injective.