PCAN: Pixel-wise Classification and Attention Network for Thoracic Disease Classification and Weakly Supervised Localization
Automatic chest X-ray (CXR) disease classification has drawn increasing public attention as CXR is widely used in thoracic disease diagnosis. Existing relevant classification networks typically employ a global average pooling layer to produce the final feature used for the subsequent classifier. This limits the classification performance due to the characteristics of lesions in CXR images, including small relative sizes, varied absolute sizes, and different occurrence locations. In this paper, we propose a pixel-wise classification and attention network (PCAN) that simultaneously performs disease classification and weakly supervised localization, which provides interpretability for disease classification. The PCAN is composed of a backbone network for extracting the mid-level feature, a pixel-wise classification branch (pc-branch) for generating pixel-wise diagnoses, and a pixel-wise attention branch (pa-branch) for producing pixel-wise weights. The pc-branch is capable of explicitly detecting small lesions, and the pa-branch is capable of adaptively focusing on different regions when classifying different thoracic diseases. Then, the pixel-wise diagnoses are multiplied with the pixel-wise weights to obtain the disease localization map, which provides the sizes and locations of lesion areas in a manner of weakly supervised learning. The final image-wise diagnosis is obtained by summing the disease localization map at the spatial dimension. The comprehensive experiments conducted on the ChestX-ray14 dataset demonstrate the effectiveness of the proposed PCAN, which has great potential for thoracic disease diagnosis and treatment.The source code is available at https://github.com/fzfs/PCAN.
CUDA_VISIBLE_DEVICES=0,1 python train.py --lr 0.07 --batch_size 64 --epochs 15 --avg 0 --weight 1 --truncated 1 --image_size 224 --milestone 10,12
CUDA_VISIBLE_DEVICES=0 python test.py --lr 0.07 --batch_size 64 --avg 0 --weight 1 --truncated 1 --image_size 224 --tm 483607