I lived/worked in the Tenderloin and in the "bad part" of SoMA for a while, and have personally observed:
* Club kid (homeless? probably not) shitting on the street, sheltered behind my car. 300 lumen flashlight beam and "what the fuck are you doing, get the fuck away from my car" and he ran off. I had to step over a pile of warm shit to enter my vehicle and drive away.
* Multiple incidents of presumably-compensated sexual acts in alleyway, near the door to my apartment.
* A double-homicide approximately 100' from my front door, which I happened to observe because I was looking out of my window onto the street at the time -- one of the victims ran around the entire block, leaving a blood trail, before expiring. Blood trail was not cleaned until mid-day.
I am concerned about which cities you visit if you find SF streets to be some of the cleanest! Baghdad and Kabul are on par (more actual dirt, blood, and random limbs; less shit and used condoms)