question

HankChengHanWHQWistron-5648 avatar image
0 Votes"
HankChengHanWHQWistron-5648 asked ramr-msft commented

Image default size in Instance Segmentation training

Hello

I am using AutoML instance segmentation training.

There is maskrcnn settings in tutorial.

parameter_space = {
"model_name": choice("maskrcnn_resnet50_fpn"),
"learning_rate": uniform(0.0001, 0.001),
#'warmup_cosine_lr_warmup_epochs': choice(0, 3),
"optimizer": choice("sgd", "adam", "adamw"),
"min_size": choice(600, 800),
}

tuning_settings = {
"iterations": 10,
"max_concurrent_iterations": 2,
"hyperparameter_sampling": RandomParameterSampling(parameter_space),
"early_termination_policy": BanditPolicy(
evaluation_interval=2, slack_factor=0.2, delay_evaluation=6
),
}


I just want to know if I had 1080p image dataset.
Then, what's the default size for resize input or just use 1080p size training ?

Thanks
Hank

azure-custom-vision
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@HankChengHanWHQWistron-5648 Thanks for the question. Can you please share the tutorial that you are trying.

0 Votes 0 ·

for example

tutorial here
https://github.com/Azure/azureml-examples/blob/main/python-sdk/tutorials/automl-with-azureml/image-object-detection/auto-ml-image-object-detection.ipynb

This is yolov5 small training.
There is config setting
"min_size": choice(600, 800), # model-specific

Is automl yolov5 use 600x800 or 640x640 image input for training ?

Or where could I find this info from azure machine learning studio ?

Thanks for your help.

0 Votes 0 ·

1 Answer

ramr-msft avatar image
0 Votes"
ramr-msft answered ramr-msft commented

@HankChengHanWHQWistron-5648 Thanks, By default, YoloV5 resizes images to 640x640 (img_size x img_size); FasterRCNN and MaskRCNN resize so that both the width and height are at least 600 (min_size) and at most 1333 (max_size).

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi

So, did you mean the FasterRCNN and MaskRCNN also use 640x640 as default ?

It seems min_size and max_size limitation show up in AutoML log but not specific default size.

Then, what default size for vitb16r224, seresnext and resnest50 ?

All these AutoML vision method could use img_size parameters in config for changing default size ?

Thanks for your help!

0 Votes 0 ·
ramr-msft avatar image ramr-msft HankChengHanWHQWistron-5648 ·

@HankChengHanWHQWistron-5648 Yes, this piece of code that overrides the default values:


 parameter_space = {​​​​​​​
     "model": choice(
         {​​​​​​​
             "model_name": choice("yolov5"),
             "learning_rate": uniform(0.0001, 0.01),
             "model_size": choice("small", "medium"),  # model-specific
             #'img_size': choice(640, 704, 768), # model-specific; might need GPU with large memory
         }​​​​​​​,
         {​​​​​​​
             "model_name": choice("fasterrcnn_resnet50_fpn"),
             "learning_rate": uniform(0.0001, 0.001),
             "optimizer": choice("sgd", "adam", "adamw"),
             "min_size": choice(600, 800),  # model-specific
             #'warmup_cosine_lr_warmup_epochs': choice(0, 3),
         }​​​​​​​,
     ),
 }​​​​​​​



0 Votes 0 ·