maskrcnn-custom icon indicating copy to clipboard operation
maskrcnn-custom copied to clipboard

How to configure for variable image dimension ?

Open nikhilparmar opened this issue 4 years ago • 3 comments

What changes do I need to make so that I can train with variable image dimensions ? What strategy do I need to follow to solve this issue ?

Apologies for such questions, Thanks

nikhilparmar avatar Jan 25 '21 11:01 nikhilparmar

Hi, Thanks for the good question. I have not tried with variable image sizes. Could you provide the error you see when you try? I will try to help if I can.

You may wish to look in the config.py at:

  • https://github.com/michhar/maskrcnn-custom/blob/aad9724db054069fa49bb11a2775f550bd4034d9/mrcnn/config.py#L211
  • https://github.com/michhar/maskrcnn-custom/blob/aad9724db054069fa49bb11a2775f550bd4034d9/custom.py#L95

Thanks.

michhar avatar Feb 07 '21 18:02 michhar

Hi, Thanks for the good question. I have not tried with variable image sizes. Could you provide the error you see when you try? I will try to help if I can.

You may wish to look in the config.py at:

  • https://github.com/michhar/maskrcnn-custom/blob/aad9724db054069fa49bb11a2775f550bd4034d9/mrcnn/config.py#L211
  • https://github.com/michhar/maskrcnn-custom/blob/aad9724db054069fa49bb11a2775f550bd4034d9/custom.py#L95

Thanks.

Okay nice. So if at line no. 95, if I make it 1024x1024, then all the images will be resized to it right ? Also will it make necessary changes to the annotation coordinates as per the mentioned dimensions ?

Thanks

nikhilparmar avatar Feb 08 '21 04:02 nikhilparmar

@nikhilparmar I'm afraid I'm not sure of the downstream effects as I haven't tried, but did this help you solve the variable image dimension issue? Thanks!

michhar avatar Mar 04 '21 15:03 michhar