There is no proven statistics that landlords use carpet condition as the #1 reason to withhold your deposit, however every tenant I have spoken to believes this to be true.
So to ensure your deposit money is returned to you when you have dropped an iron on the carpet or your dog or cat has had a fight with the carpet, it would be wise to have the damage repaired before your landlord sees any damage.
Just like potential home buyers shying away when they see ripples in the carpet of a home they love because they are unsure if it can be fixed or the repair costs. Most landlords are unaware that carpet can easily be repaired and their first instinct is to expect new carpet to be installed from the damage deposit.
It is often easier for you to get it repaired before your landlord knows and then save yourself the trouble and uncertainty after you have moved out. Once you are out you have no say whether a new carpet is installed or not, leaving your money behind forever. With a quick call and an hour of your time your headache will be relieved before anyone else knows about it.