As per my understanding, you have an image that has only black and white colors. You have other colored images, from which you would like to remove parts, where the corresponding pixel in the b/w image is black.
Depending on your use case, you could load the images as matrices. Then create a binary mask based on b/w image, as follows
bwimage = imread(image_path)
flag = [bwimage == value] % where value is value of white
colorimage(flag) = 0 % or another appropriate value
Designing a CNN to do this might not be necessary as this can be done easily with few lines of code.