SF tickets for more times than it actually sweeps (i.e., they do not always have a street sweeper come at all the restricted street sweeping times). They will also ticket you even if the street sweeper has already passed. :/
The recourse is taking a picture, noting the time, going to court, and hoping you win. Most people don't even begin to try all that.