Inflation has started to accelerate after months of decline, driven by food and transport costs and fading base effects.