An infrared video detection and categorization system based on machine learning