best way is to train your dog NOT to eat ANYTHING on the ground.
If you want to give your dog treats, puts it in the palm of your hand instead of tossing it to him (or giving it to him between your fingers).
train your dog not to eat food on the ground is very easy. put some food on the ground as "bait", have a can handy, put four pennies in the can and seal it.
when the dog approaches the food (even just to snif it), shake the can right then!! you can so "no!" at the same time.
pratice that few times a day consistently.
This trick is also usefull to teach dog to stay off food on the table, to stay at the back seat of the car.. etc.