Brain stroke is the second leading cause of death worldwide after heart disease, and one of the most concerning types is intracranial hemorrhage (ICH). This type of bleeding, caused by ruptures of blood vessels within the brain, affects the brain, prevents cell oxygenation, and causes nerve damage. Although recent medical advances have helped many patients, doctors are still subject to human errors when detecting and segmenting intracranial hemorrhages due to long working hours. For this reason, deep learning models have been introduced to help reduce errors in this task. In this regard, we proposed a new deep learning method called D-Unet based on the standard U-net architecture to successfully detect and segment intracranial hemorrhage lesions in a data set of computerized tomography images belonging to 82 patients. Both the D-Unet and the U-net were trained under the same experimental conditions using a ten-fold stratified cross-validation schema repeated three times. The means obtained from the IoU and DICE coefficient scores of 0.68\pm 0.08 and 0.81\pm 0.06 for the D-Unet and 0.59\pm 0.10 and 0.72\pm 0.09 for the U-net, demonstrated that the D-Unet tends to perform better than its baseline method. Furthermore, the best selected D-Unet model in the training stage was validated in an external test set, scoring 0.86 for IoU and 0.89 for DICE. This performance evaluation on the test data set confirmed the quality and generalizability of the model, successfully detecting and segmenting ICH of different types, shapes, sizes, and locations.