For a plane curve the sign of the curvature is tied to (i) the sense of direction of the curve and (ii) the orientation of the plane.
Ad (i): A curve which is lying before us as a static object has no intrinsic sense of direction. This is the case for both curves in your figures. In such a case the curvature is an "unsigned number" and considered $\geq0$. If a curve is presented by a parametric representation
$$\gamma:\quad t\mapsto\bigl(x(t),y(t)\bigr)$$ then it obtains a "sense of direction" which corresponds to increasing $t$. At each point $\gamma(t)$ of the curve the tangent vector ${\bf t}(t):=\bigl(x'(t),y'(t)\bigr)$ (assumed $\ne{\bf 0}$) points into the sense of direction of $\gamma$. If $\gamma$ is the graph of a function $y=f(x)$ then the sense of direction of $\gamma$ is the sense corresponding to increasing $x$.
Ad (ii): At each point of $\gamma$ the tangent vector ${\bf t}$ has a polar angle $\theta(t):={\rm arg}\bigl(x'(t),y'(t)\bigr)$. If the tangent vector turns counterclockwise with increasing $t$, i.e., if $\theta'(t)>0$, then the curvature of $\gamma$ is positive at such a point, otherwise it is negative. In fact, the curvature is given by
$$\kappa={\theta'(t)\over s'(t)},\qquad s'(t):=\sqrt{x'^2(t)+y'^2(t)}>0\ .$$