Text this: Research and optimization of a multilevel fire detection framework based on deep learning and classical pattern recognition techniques