Consider the space of smooth embeddings of the segment in the plane with the compact-open topology. Denote by X the quotient space obtained from the equivalence relation $a \sim b$ if and only if $\mathrm{Im}~ a = \mathrm{Im}~ b$

Consider the retraction $f: X \to X$ such that $f(s)$ is the line segment connecting the ends of s (it is obvious that the function is continuous and idempotent). Is it true, that $f$ is homotopic to the $id$? if not, can it be otherwise proved that the subspace of all segments is a deformation retract?