Segmentation of anatomical structures in intraoperative ultrasound (iUS) images during image-guided interventions is challenging. Anatomical variances and the uniqueness of each procedure impede robust automatic image analysis. In addition, ultrasound image acquisition itself, especially acquired freehand by multiple physicians, is subject to major variability. In this paper we present a robust and fully automatic neural-network-based segmentation of central structures of the brain on B-mode ultrasound images. For our study we used iUS data sets from 18 patients, containing sweeps before, during, and after tumor resection, acquired at the University Hospital Essen, Germany. Different machine learning approaches are compared and discussed in order to achieve results of highest quality without overfitting. We evaluate our results on the same data sets as in a previous publication in which the segmentations were used to improve iUS and preoperative MRI registration. Despite the smaller amount of data compared to other studies, we could efficiently train a U-net model for our purpose. Segmentations for this demanding task were performed with an average Dice coefficient of 0.88 and an average Hausdorff distance of 5.21 mm. Compared with a prior method for which a Random Forest classifier was trained with handcrafted features, the Dice coefficient could be increased by 0.14 and the Hausdorff distance is reduced by 7 mm.