franciskasara / maskrcnn-from-scratch

Building a maskrcnn from scratch using tensorflow and keras
50 stars 15 forks source link

Updating mask_roi_align for multiple masks #2

Open EEvangelisti opened 2 years ago

EEvangelisti commented 2 years ago

Hello, I am trying to adapt your very nice implementation to my needs. Basically, I have multiple (2 to 5) shapes on each image that I would like to identify. Unfortunately, the current implementation of mask_roi_align is designed for a single shape/mask per image and raises ValueError: could not broadcast input array due to the following line: maskrois=np.zeros((batchlen,proposal_count,mask_size[0],mask_size[1],1)) Would you be able to suggest a way to allow for a variable number of masks, i.e. a more general value for the last dimension? Many thanks for your help.