© 2022 Elsevier LtdAutomatic detection of spike-and-wave discharges (SWDs) of absence seizures, is a highly time-consuming process requiring trained technicians or neurologists to categorize thousands of non-overlapping epochs of electroencephalography (EEG) data by visually inspecting several interconnections among different channels. This paper aims to develop an algorithm for a non-invasive real-time detection of SWDs in the EEG recordings of humans with absence epilepsy and a genetic model of absence epilepsy. We develop a SWD detection framework using Convolutional Neural Networks. Our approach utilizes the nature of EEG signals; as the brain signals are dynamics in discrete time, we found that it is more efficient and useful to represent the signal's power as a function of frequency and time using Thomson's multitaper power spectral density estimation analysis. Our experiments show that the developed method classified SWDs in humans and rats with high diagnostic performance similar to that of the trained neurologists while using fewer channels, proving that the proposed algorithm can be applied to different domains where the main focus is the detection of SWDs. Although there are different methods to detect SWDs in humans and animals, we showed the need for efficient and more accurate SWD detection. The proposed method, characterized by low computational and memory requirements using non-invasive EEG techniques with fewer channels, offers an efficient multi-purposed deep learning framework to be implemented in wearable or portable devices for accurate real-time detection of SWD patterns in EEG signals. Eventually, the proposed method is a step towards detecting seizures and closed-loop seizure interventions.