Aggressive cat HELP

K.

Sorry for the long post but I really need some ideas/advice! I have a spayed female completely indoor cat that is VERY territorial. It usually isn't a problem since the neighborhood cats don't get too close to the house, but sometimes different scents randomly set her off and she will redirect her aggression toward me or my dog. For example, I was out working in the flowers beds and must have gotten another cats scent on me because when I went back inside she became upset. And when I say she gets aggressive I'm talking yowling, screaming, clawing, chasing her victim (usually me) and it ends with either me or her being trapped in a room until she cools off. It's getting increasingly harder to deal with as the attacks can be seemingly without cause (like I apparently can't even go out in the yard without worrying that she'll attack me when I come back inside) and I am expecting a baby so that kind of behavior is not ok. Normally she is super sweet and affectionate but when she gets like this it's like she's a completely different cat. Anyone know how to deal with this behavior?