The most typical observational features of solar radio spikes are their short duration and narrow bandwidth. We have improved the YOLOv5s network model for these characteristics by adding inclined bounding frames and attention and feature fusion mechanism modules. The decimeter- and meter-wavelength spikes observed by the Solar Broad-band Radio Spectrometer in Huairou and the Chashan Solar Radio Observatory spectrograph 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 durations, bandwidths, relative bandwidths, and frequency-drift rates. The spikes at decimeter and meter wavelengths are again categorized based on their frequency-drift rates, such as positive, negative, and no measurable frequency-drift rates. We have carried out a statistical study on these categorized spikes. These statistical results and findings constrain solar radio spikes’ formation.