A novel classification technique for bacteria detection termed quantum-behaved particle swarm optimization-based restricted Boltzmann machine (QPSO-RBM) based on electronic nose technology is proposed in this paper. In order to improve the performance of the QPSO-RBM technique, three training objective functions have been adopted in the training process of RBM respectively. A new synchronous optimization method is adopted in QPSO-RBM to ensure it research the best performance. By comparing classification performance of the three training objective functions, we have found discriminative training objective has better effect than the other two ways. Four kinds of features extracted from the time and frequency domains have been developed to demonstrate the effectiveness of this classification technique for four different classes of wounds. When wavelet coefficients are adopted as features, QPSO-RBM performs best. Then the link between the number of hidden nodes in RBM and recognition rate of the model has been explored. In the end, QPSO-RBM is compared with four existing classifiers: radical basis function neural network (RBFNN), support vector machine (SVM), k-nearest neighbor (KNN) and linear discriminant analysis (LDA). The results have shown that QPSO-RBM outperforms the four classifiers.