Best way to chop images in smaller chunks

Hi I want to train a classifier to tell if there is a certain weed in a photo of a patch of grass. I started by trying to tag the weeds as if I was training an object detector but this may be too complicated for my project. Instead if I could break a large photo of the grass into a grid of smaller photos I could just say if the square has a weed or not. Let’s say for example the grid would be 8 by 8 resulting in 64 images I can then hand label . Which direction should I go down to achieve this? Can I batch process a whole folder of images. I have very little coding experience, this is a learning experience.

Many thanks

You could do this with open cv or similar in python, but I find myself falling back on the command line, often enough. Here is guidance for how you can approach the task using imagemagick on the command line

Many thanks, will read this over tonight and see what I can manage.

note to self : ‘convert lenna[0-15].gif -crop 2x2@ +repage +adjoin lenna%d.gif’