In clinical brain SPECT, correction for photon attenuation in the patient is essential to obtain images which provide quantitative information on the regional activity concentration per unit volume (kBq). This correction generally requires an attenuation map (map) denoting the attenuation coefficient at each voxel which is often derived from a CT or MRI scan. However, such an additional scan is not always available and the method may suffer from registration errors. Therefore, we propose a SPECT-only-based strategy for map estimation that we apply to a stationary multi-pinhole clinical SPECT system (G-SPECT-I) for 99mTc-HMPAO brain perfusion imaging. The method is based on the use of a convolutional neural network (CNN) and was validated with Monte Carlo simulated scans. Data acquired in list mode was used to employ the energy information of both primary and scattered photons to obtain information about the tissue attenuation as much as possible. Multiple SPECT reconstructions were performed from different energy windows over a large energy range. Locally extracted 4D SPECT patches (three spatial plus one energy dimension) were used as input for the CNN which was trained to predict the attenuation coefficient of the corresponding central voxel of the patch. Results show that Attenuation Correction using the Ground Truth maps (GT-AC) or using the CNN estimated maps (CNN-AC) achieve comparable accuracy. This was confirmed by a visual assessment as well as a quantitative comparison; the mean deviation from the GT-AC when using the CNN-AC is within 1.8% for the standardized uptake values in all brain regions. Therefore, our results indicate that a CNN-based method can be an automatic and accurate tool for SPECT attenuation correction that is independent of attenuation data from other imaging modalities or human interpretations about head contours.