A method of classifying an infrared image into training data to be used for training a machine learning model for detecting a target object in infrared images, the method comprising:
- (i) providing a set of machine learning models, each machine learning model being associated with a respective range of a difference obtained by subtracting an average pixel value of pixels corresponding to a target object from an average pixel value of pixels corresponding to a comparison object;
- (ii) acquiring an infrared image;
- (iii) identifying, in the infrared image, pixels corresponding to the target object and pixels corresponding to the comparison object;
- (iv) calculating a first average pixel value of the pixels corresponding to the target object and a second average pixel value of the pixels corresponding to the comparison object;
- (v) calculating the difference by subtracting the first average pixel value from the second average pixel value;
- and
- (vi) selecting, from the set of machine learning models, one machine learning model associated with the respective range including the difference, and classifying the infrared image into training data to be used to train the selected machine learning model.