This question already has an answer here:
I have an Samsung Galaxy S3. TouchWiz is great, but I want to use the vanilla Android OS you see on the Nexus 4. Is this possible?
In theory, it should be possible to compile Android from source, with proprietary blobs for the specific device.
In practice, however, this is largely impossible, with the exception of Nexus devices and those from community dev-friendly manufacturers like Sony.
Samsung, in particular, is notorious for providing terribly (un)organized sources, and even the talented hackers of Cyanogenmod team are frustrated, and many have sold off their devices and moved to Sony and Nexus devices.
So, your only realistic option is to install a community ROM like CM10.1. Again, it is not bug-free or fully featured as stock firmware.
Yes, there's two avenues: