I sometimes say 'Oh that's a shame, I've just eaten.' If I get pressed 'No honestly, I'm really stuffed' or 'Can I take a couple for later?' then walk away with a couple (which will go in the food waste bin in due course)..
Re family, if you're planning on losing weight, you could say you're on a strict diet (and be responsible for yourself by bringing all or most of the food you plan to eat). You can't stop others taking offence. They may have some sympathy if they weren't warned and they counted you in the food numbers, which cost them time and money?