I'm guessing it was one of those situations where they recognized you, but you didn't recognize them (a bad case of face blindness sneaking up on you here). Quite possibly, they picked up on that fact, and used it to bully you with impunity. After all, how can you report them if you don't even know who they are? Bullies do what they do because they sense weakness. That may be bad enough, but if they also sense face blindness, then they'll have satisfaction of knowing that you can't even turn them in.
Incident like this make you realize one important point. I can't stress enough the importance of learning the names and faces of people in your classes. Use any tactics and memory tools you have available to you, but learn them! That way, you will be able to avoid the highly frightening situations of being bullied by people you don't even recognize (but they recognize you). They're like mini-muggings, simply due to their seeming randomness. And if you'll know their names, you'll be able to actually report them, as opposed to saying "some random person tripped me in the hallway".
In some schools, students are required to wear ID badges on the front of their clothing (and all schools have IDs for students). If your school is like that, take advantage of it! When you interact with someone and you get even the slightest hint of hostility, one of the first things you need to do is to discreetly sneak a peak at their ID badge, and memorize the name. It's one of those things that takes the expression "knowledge is power" to a new level. Of course, bullies can do that too, but their cunning social skills let them learn your name quickly even without the badge, so it does little damage to you.
By the way, the "sneak a peak at the ID badge" tactic did wonders in helping me learn people's names at my current job. Even the people who caught me doing that didn't seem to mind, especially after I casually explained that I'm not very good with names. I guess working in IT helps, since being bad with names is associated with the IT stereotype, and honestly, me asking their name for the second time is nothing compared to getting their lost files back.