Neurologists typically identify epileptic seizures from electroencephalograms (EEGs) by visual inspection. This process is often time-consuming, especially for EEG recordings that last several hours or even days. To expedite the process, a reliable, automated, and patient-independent seizure detector is essential. However, developing a patient-independent seizure detector is challenging as seizures exhibit diverse morphologies and characteristics across different patients and recording devices. In this study, we propose a patient-independent seizure detector to automatically detect seizures in both scalp EEG (sEEG) and intracranial EEG (iEEG). First, we deploy a convolutional neural network (CNN) with transformers (TRF) and belief matching (BM) loss to detect seizures in single-channel EEG segments (channel-level detection). Next, we extract regional features from the channel-level outputs to detect seizures in multi-channel EEG segments (segment-level detection). At last, we apply postprocessing filters to the segment-level outputs to determine the start and end points of seizures in multi-channel EEGs (EEG-level detection). We introduce the minimum overlap evaluation scoring (MOES) as an evaluation metric that accounts for minimum overlap between the detection and seizure, improving upon existing assessment metrics. We trained the seizure detector on the Temple University Hospital Seizure (TUH-SZ) sEEG dataset and evaluated it on five other independent sEEG and iEEG datasets. On the TUH-SZ dataset, the proposed patient-independent seizure detector achieves a sensitivity (SEN), precision (PRE), average and median false positive rate per hour (aFPR/h and mFPR/h), and median offset of 0.772, 0.429, 4.425, 0, and -2.125s, respectively. Across all four adult datasets (excluding neonatal and paediatric datasets), we obtained SEN of 0.617-1.00, PRE of 0.534-1.00, aFPR/h of 0.425-2.002, and mFPR/h of 0-1.003. Meanwhile, on neonatal and paediatric datasets, we obtained SEN of 0.227-0.678, PRE of 0.377-0.818, aFPR/h of 0.253-0.421, and mFPR/h of 0.118-0.223. The proposed seizure detector can reliably detect seizures in adult EEGs (to less extent in neonatal EEGs) and takes less than 15s for a 30 minutes EEG. Hence, this system could potentially aid the clinicians in reliably identifying seizures expeditiously, allocating more time for devising proper treatment.