For really stubborn dog hair in carpet, or upolstery, I have used the following remedies... Rubber glove - Rub across carpet and most dog hairs come up.
Duct tape rolled around your hand many times with sticky side out. I have used this for really stubborn dog hairs in the carpet of my car. Pat, and continue to unwind.