for me it would depend a bit on the exact type of carpet , but generally if a carpet has gotten to that stage .... giving it a bit of hell with a rotary and a medium brush ... or a red floor pad , does more good than harm . Sometimes a crb will do it also , sometimes not .
That will generally shift it , but id you have a stubborn patch or the carpet is delicate it could come down to gently shaving the patch on your knees, with the like of a four inch craft knife blade or some other shaving solution.