We are about to start a series of experiments in physics which will generate 8.5 thousands of images per month. This is a study on microscopic material reactions so the images are not 'normal' objects commonly found in sets available online (cats, cars, bicycles, etc.). The objective of the study is to generate those images to document our other measurements, and the the 2ry objective is that those images can be used to train an algorithm and later use that algorithm to classify objects in the rest of the images (including future studies, this is very important). So, given that we still did not start to acquire the images, we have the opportunity to "make it right" (if this even exist) from the beginning. We intend to generate and use those images in the following few years to come.

I am new to the ML world, although I have some experience in image analysis. We still did not decide which algorithm/approach we will use. Could be YOLO, DeepLearn, TensorFlow, OpenCV, etc. In principle it would be the easiest possible for non specialists (we will rather apply ready-made solutions instead of writing our own algorithms). Since both image acquisition and object detection/recognition solutions change so fast all the time, and assuming that the train set should be ideally very similar to the images I plan to analyze with the trained algorithm, I have a few concerns (below) for a long-term projects. Could you give me your opinion and suggestions about the weight of each one (maybe I’m worrying too much) and how to circumvent (if possible) some of them?

1) What happens if I start the project with a given camera (eg Nikon DSLR D3500, 24.2 MP, 6000x4000 px, Full HD ) and then I switch to another one quite different (eg Raspberry Pi camera V2, 8MP, 3280x2464 px, Full HD)? If the 1st images are aquired by camera 1, then I assume I will lose accuracy of the object recognition algorithm due to different image resolution, is that so? How bad is this? What should I do to minimize this? Can I eg mix images from both cameras into the training set to avoid large deviations of the accuracy? I suspect this must be an old and very commented problem in object recognition. If I generate a training set with camera A, then can the algorithm work well in images acquired with camera B? For example, would it help if I take images from camera A and lower the resolution to match that of camera B (or just lower the resolution, since I not necessarily always know which camera we will use in the future)?

2) I read that one can make substantial changes to the training set (posterize, flip, decrease color depth, blur, etc.) to broaden the application of the algorithm. Would this enhance the accuracy of the ML algorithm to make it robust against camera changes?

3) As mentioned above, we still did not decide which ML technique we'll be using. Is this a decision we need to make before starting the training set generation?

4) Any other suggestions of ‘good practices’ on generating the training set and prepare for future changes in image acquisition technology?


1 Answer 1


1) wouldn't recommend switching cameras, could consider some type of resolution mapping to help though. 2) Likely not, but resolution alterations likely would. 3) Deeplearning => require more data, use transfer learning so you can use a less though. 4) try to keep the data as similar to it would be in production and try to keep the images general to avoid bias. (example: image recognizer predicting any image w snow to be a wolf)

  • $\begingroup$ About #2 above, it is almost always a good idea to use data augmentation to help generalize your model. Here is a good resource for more details: machinelearningmastery.com/… $\endgroup$
    – Donald S
    Jun 16, 2020 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.