We investigate the performance of modern convolutional neural networks (CNN) and a linear support vector machine (SVM) with respect to spatial contrast sensitivity. Specifically, we compare CNN sensitivity to that of a Bayesian ideal observer (IO) with the signal-known-exactly and noise known statistically. A ResNet-18 reaches optimal performance for harmonic patterns, as well as several classes of real world signals including faces. For these stimuli the CNN substantially outperforms the SVM. We further analyzed the case in which the signal might appear in one of multiple locations and found that CNN spatial sensitivity continues to match the IO. However, the CNN sensitivity was far below optimal at detecting certain complex texture patterns. These measurements show that CNNs can have very large performance differences when detecting the presence of spatial patterns. These differences may have a significant impact on the performance of an imaging system designed to detect low contrast spatial patterns.