The internal state of the battery seriously affects its lifespan, safety, and reliability. CT scanning can obtain internal images of the battery without damaging it. This study focused on the discrimination of main internal defects in batteries: electrode crack, electrode deformation, inclusion and burr, among which inclusions are further divided into bubbles and metal particles. We first fused features extracted by 0 degrees and 90 degrees Gabor filtering kernels to enhance the discrimination between defects and electrode backgrounds. For the localization and type discrimination of battery defects, an improved YOLOv8 method, incorporating a Convolutional Block Attention Module in the Backbone layer and a lightweight Group Shuffle Convolution module in the Neck layer, is designed for defect localization and type discrimination. We finally achieved an average detection accuracy of 99.2%, reducing the parameter count by 6k on the basis of the original YOLOv8 model. The detection speed for a single image is 9.5ms.