Here's looking at you...

Actually, what look like eyes are not eyes at all. They are skin patterns called ‘false eyes’ - adapted by these caterpillars as a defense against predators. The actual eyes are located in the areas indicated by the green circles.
More about the Spicebush Swallowtail
More about the Tiger Swallowtail