It is of enormous significance to detect abnormal brains automatically. This paper develops an efficient pathological brain detection system based on the artificial intelligence method. We first extract brain edges by a Canny edge detector. Next, we estimated the fractal dimension using box counting method with grid sizes of 1, 2, 4, 8, and 16, respectively. Afterward, we employed the single-hidden layer feedforward neural network. Finally, we proposed an improved particle swarm optimization based on three-segment particle representation, time-varying acceleration coefficient, and chaos theory. This three-segment particle representation encodes the weights, biases, and number of hidden neuron. The statistical analysis showed the proposed method achieves the detection accuracies of 100%, 98.19%, and 98.08% over three benchmark data sets. Our method costs merely 0.1984 s to predict one image. Our performance is superior to the 11 state-of-the-art approaches.INDEX TERMS Minkowski Bouligand dimension, genetic algorithm, artificial bee colony, logistic map, number of hidden neuron, K-fold cross validation.