It happens at times, if you find these thoughts very intrusive and bothering try to distract yourself.
Thats normal but you have to take it a bit serious because people with such thoughts tends to avoid people and sometime behavies aggresively. Find a replacement-which can be anything: writing, gardening or things you like the most. Stop watching pornography-if you have the habit of watching.
Wish you'll get out of it soon:)
either distract yourself, or remind yourself to avoid it. keep chanting that you have the power to control and break free from these thoughts.