MATLAB: How is the size of the input layer determined (‘imageInputLayer’)

Computer Vision Toolboximageinputlayerrcnnroitrainfasterrcnnobjectdetector

How is the size of the input layer determined 'imageInputLayer'?

Best Answer

The image input size should be large enough to produce a meaningful feature maps at the input of the ROI pooling layer. "Meaningful" means that there is enough spatial information to resolve the objects of interest.

Sufficient information for resolving the objects of interest depends on the following:

1) The base network being trained.

2) The size of the training image.

3) The size of the objects of interest within the images.

4) The manner in which the function, 'trainFasterRCNNObjectDetector', is being called.