Using photos for training a model. How to choose the right resolution for taking photos?

I am a beginner and am just about to take the first step in training a yolo model. I need to detect defects on wooden boards (such as knots, cracks, etc.). The boards are 1300x100 mm in size. I will use a single camera with a 4000x100 pixel resolution for detection. The camera will be stationary, and the distance between the camera and the wooden boards will remain constant. Can you tell me the camera resolution (dpi) I should use to take photos , to create a dataset for training the yolo model? Is it enough for me to take a photo of the entire board with a resolution of 4000x100 pixels, or do I need to take a photo of a part of the wood board with a different resolution in order to get a well-trained model? How do I choose the right resolution for taking photos of wood boards with defects? I would greatly appreciate any advice you can provide.

YOLO trains on square images. Default is 640x640. So you should capture at a resolution close to that.

You should take images of boards that have no defects as well as ones with defects

Thanks !

Tell me, I have the opportunity to take a photo with a resolution of 640x640. Do I need to fit the defect as much as possible into this size, or do I need to take a real photo as for detection, but with a size of 640x640?

It should show the object similar to how you expect to see the object during inference. It shouldn’t zoom in on defect because during inference, you don’t know where the defect is. The model is supposed to locate it.