MARS: Detecting brain class/method code smell based on metric–attention mechanism and residual network

Author(s):  
Yang Zhang ◽  
Chunhao Dong
2020 ◽  
Vol 10 (24) ◽  
pp. 9132
Author(s):  
Liguo Weng ◽  
Xiaodong Zhang ◽  
Junhao Qian ◽  
Min Xia ◽  
Yiqing Xu ◽  
...  

Non-intrusive load disaggregation (NILD) is of great significance to the development of smart grids. Current energy disaggregation methods extract features from sequences, and this process easily leads to a loss of load features and difficulties in detecting, resulting in a low recognition rate of low-use electrical appliances. To solve this problem, a non-intrusive sequential energy disaggregation method based on a multi-scale attention residual network is proposed. Multi-scale convolutions are used to learn features, and the attention mechanism is used to enhance the learning ability of load features. The residual learning further improves the performance of the algorithm, avoids network degradation, and improves the precision of load decomposition. The experimental results on two benchmark datasets show that the proposed algorithm has more advantages than the existing algorithms in terms of load disaggregation accuracy and judgments of the on/off state, and the attention mechanism can further improve the disaggregation accuracy of low-frequency electrical appliances.


IEEE Access ◽  
2021 ◽  
pp. 1-1
Author(s):  
Jiayuan Kong ◽  
Yurong Gao ◽  
Yanjun Zhang ◽  
Huimin Lei ◽  
Yao Wang ◽  
...  

2021 ◽  
Vol 2021 ◽  
pp. 1-10
Author(s):  
Jiang Daihong ◽  
Hu yuanzheng ◽  
Dai Lei ◽  
Peng Jin

At present, traditional facial expression recognition methods of convolutional neural networks are based on local ideas for feature expression, which results in the model’s low efficiency in capturing the dependence between long-range pixels, leading to poor performance for facial expression recognition. In order to solve the above problems, this paper combines a self-attention mechanism with a residual network and proposes a new facial expression recognition model based on the global operation idea. This paper first introduces the self-attention mechanism on the basis of the residual network and finds the relative importance of a location by calculating the weighted average of all location pixels, then introduces channel attention to learn different features on the channel domain, and generates channel attention to focus on the interactive features in different channels so that the robustness can be improved; finally, it merges the self-attention mechanism and the channel attention mechanism to increase the model’s ability to extract globally important features. The accuracy of this paper on the CK+ and FER2013 datasets is 97.89% and 74.15%, respectively, which fully confirmed the effectiveness and superiority of the model in extracting global features.


2021 ◽  
Vol 2021 ◽  
pp. 1-16
Author(s):  
Wenjun Du ◽  
Bo Sun ◽  
Jiating Kuai ◽  
Jiemin Xie ◽  
Jie Yu ◽  
...  

Travel time is one of the most critical parameters in proactive traffic management and the deployment of advanced traveler information systems. This paper proposes a hybrid model named LSTM-CNN for predicting the travel time of highways by integrating the long short-term memory (LSTM) and the convolutional neural networks (CNNs) with the attention mechanism and the residual network. The highway is divided into multiple segments by considering the traffic diversion and the relative location of automatic number plate recognition (ANPR). There are four steps in this hybrid approach. First, the average travel time of each segment in each interval is calculated from ANPR and fed into LSTM in the form of a multidimensional array. Second, the attention mechanism is adopted to combine the hidden layer of LSTM with dynamic temporal weights. Third, the residual network is introduced to increase the network depth and overcome the vanishing gradient problem, which consists of three pairs of one-dimensional convolutional layers (Conv1D) and batch normalization (BatchNorm) with the rectified linear unit (ReLU) as the activation function. Finally, a series of Conv1D layers is connected to extract features further and reduce dimensionality. The proposed LSTM-CNN approach is tested on the three-month ANPR data of a real-world 39.25 km highway with four pairs of ANPR detectors of the uplink and downlink, Zhejiang, China. The experimental results indicate that LSTM-CNN learns spatial, temporal, and depth information better than the state-of-the-art traffic forecasting models, so LSTM-CNN can predict more accurate travel time. Moreover, LSTM-CNN outperforms the state-of-the-art methods in nonrecurrent prediction, multistep-ahead prediction, and long-term prediction. LSTM-CNN is a promising model with scalability and portability for highway traffic prediction and can be further extended to improve the performance of the advanced traffic management system (ATMS) and advanced traffic information system (ATIS).


2021 ◽  
Author(s):  
Xiaowei Wang ◽  
Jungang Han ◽  
Ben Li ◽  
Xiaoying Pan ◽  
Hui Xu

2021 ◽  
Vol 11 (11) ◽  
pp. 5139
Author(s):  
Weiwei Zhang ◽  
Huimin Ma ◽  
Xiaohong Li ◽  
Xiaoli Liu ◽  
Jun Jiao ◽  
...  

Intelligent detection of imperfect wheat grains based on machine vision is of great significance to correctly and rapidly evaluate wheat quality. There is little difference between the partial characteristics of imperfect and perfect wheat grains, which is a key factor limiting the classification and recognition accuracy of imperfect wheat based on a deep learning network model. In this paper, we propose a method for imperfect wheat grains recognition combined with an attention mechanism and residual network (ResNet), and verify its recognition accuracy by adding an attention mechanism module into different depths of residual network. Five residual networks with different depths (18, 34, 50, 101, and 152) were selected for the experiment, it was found that the recognition accuracy of each network model was improved with the attention mechanism, and the average recognition rate of ResNet-50 with the addition of the attention mechanism reached 96.5%. For ResNet-50 with the attention mechanism, the optimal learning rate was further screened as 0.0003. The average recognition accuracy reached 97.5%, among which the recognition rates of scab wheat grains, insect-damaged wheat grains, sprouted wheat grains, mildew wheat grains, broken wheat grains, and perfect wheat grains reached 97%, 99%, 99%, 95%, 96%, and 99% respectively. This work can provide guidance for the detection and recognition of imperfect wheat grains using machine vision.


Sensors ◽  
2021 ◽  
Vol 21 (12) ◽  
pp. 4182
Author(s):  
Haijing Sun ◽  
Anna Wang ◽  
Wenhui Wang ◽  
Chen Liu

The early diagnosis of Alzheimer’s disease (AD) can allow patients to take preventive measures before irreversible brain damage occurs. It can be seen from cross-sectional imaging studies of AD that the features of the lesion areas in AD patients, as observed by magnetic resonance imaging (MRI), show significant variation, and these features are distributed throughout the image space. Since the convolutional layer of the general convolutional neural network (CNN) cannot satisfactorily extract long-distance correlation in the feature space, a deep residual network (ResNet) model, based on spatial transformer networks (STN) and the non-local attention mechanism, is proposed in this study for the early diagnosis of AD. In this ResNet model, a new Mish activation function is selected in the ResNet-50 backbone to replace the Relu function, STN is introduced between the input layer and the improved ResNet-50 backbone, and a non-local attention mechanism is introduced between the fourth and the fifth stages of the improved ResNet-50 backbone. This ResNet model can extract more information from the layers by deepening the network structure through deep ResNet. The introduced STN can transform the spatial information in MRI images of Alzheimer’s patients into another space and retain the key information. The introduced non-local attention mechanism can find the relationship between the lesion areas and normal areas in the feature space. This model can solve the problem of local information loss in traditional CNN and can extract the long-distance correlation in feature space. The proposed method was validated using the ADNI (Alzheimer’s disease neuroimaging initiative) experimental dataset, and compared with several models. The experimental results show that the classification accuracy of the algorithm proposed in this study can reach 97.1%, the macro precision can reach 95.5%, the macro recall can reach 95.3%, and the macro F1 value can reach 95.4%. The proposed model is more effective than other algorithms.


Sign in / Sign up

Export Citation Format

Share Document