I'm currently not aware of Prodigy being able to turn the drawn shapes into image masks. You'd need a separate, custom, Python script for that. That said, I think the Python image library can be very helpful here.
import numpy as np
from PIL import Image
img = Image.open("path/to/img.png").convert("RBG")
arr = np.array(img)
This gives you a numpy array arr
that represents the images' RGB values. If you have a simple shape, like a square, then you might be able to assign a mask via:
mask = np.zeros_like(arr)
mask[20:300, 40:200] = 1
I hope this helps!