The most typical observational features of solar radio spikes are their short duration and narrow bandwidth. For these characteristics, we have improved the YOLOv5s network model, by adding inclined bounding frames, and attention and feature fusion mechanism modules. The decimeter- and meterwavelength spikes observed by the Solar Broad-band Radio Spectrometer in Huairou and the spectrograph in the Chashan Solar Radio Observatory are used to carry out experiments, respectively. The results demonstrate that the AP value obtained by the improved network is 74%, which is almost 14% higher than the original network. The improved network detects 9709 (1379) decimeter- (meter-) wavelength spikes in two events with the durations, bandwidths, relative bandwidths, and frequency-drift rates. The spikes at decimeter and meter wavelengths are categorized again based on their frequency-drift rates, such as, positive, negative, and no measurable frequency-drift rates, respectively. We have carried out a statistical study on these categorized spikes. An interesting finding is that the distribution of relative bandwidths at decimeter wavelengths is changed after the classification. The distribution is asymmetric without the classification. However, after the classification the positive, negative, and no measurable frequency-drift spikes show a symmetrical distribution. These statistical results and findings provide constraints on the formation of solar radio spikes.