how to split/get images from spritesheet with non-uniform sprite dimensions

I want to split images from spritesheet with non-uniform sprite dimensions. What is the best way to split images this?

Here’s an example of non-uniform sprite dimensions.

Thanks.