Camera for machine learning simulation

Hello,
I need to buy medium price camera suitabale for drone which will be good enough for using it on machine learning algorithm which willl be detecting tenis ball wih diffrent colors I was thinking of raspbbery pi camera with 6mm lens but I am not sure if it will be good enough for moving drone

Get one with a global shutter.

any examples it will help a lot