1-If the mine targets people from some race, then will attack your own soldiers, local allies and spies of the same race
2-Clothes and makeup are common to all human cultures. After a few strikes the people would learn how to blend in the landscape and avoid being taken by a target.
3-The system would need a sort of eye over the soil, detectable by human eyes and software, or a sort of wifi, detectable with software.
4-This "eye" part would be vulnerable to dust, leaves and debris falling over this eye. Something that happens very quickly at soil level in deserts, snowy areas and rainforests.
4-If the mine is inactivated until people of some colour appears, your enemies could use a disguise to take it safely and reuse the weapon in their own army.
5-Such mines could be modified to target presidents, military high commands, policemen or politicians, all easily distinguishable by their "feathers", well known bagdes, official uniforms... At this point, the project of a mine aiming to VIPS would be closed and deeply buried pretty fast.