Tuning first_stage_anchor_generator in faster rcnn model

前端 未结 2 1800
Happy的楠姐
Happy的楠姐 2021-02-06 07:21

I am trying to detect some very small object (~25x25 pixels) from large image (~ 2040, 1536 pixels) using faster rcnn model from object_detect_api from here https://github.com

2条回答
  •  梦谈多话
    2021-02-06 07:48

    As I believe proposal anchors are generated only for model types of Faster RCNN. In this file you have specified what parameters may be set for anchors generation within line you mentioned from config.

    I tried setting base_anchor_size, however I failed. Though this FasterRCNNTutorial tutorial mentions that:

    [...] you also need to configure the anchor sizes and aspect ratios in the .config file. The base anchor size is 255,255.

    The anchor ratios will multiply the x dimension and divide the y dimension, so if you have an aspect ratio of 0.5 your 255x255 anchor becomes 128x510. Each aspect ratio in the list is applied, then the results are multiplied by the scales. So the first step is to resize your images to the training/testing size, then manually check what the smallest and largest objects you expect are, and what the most extreme aspect ratios will be. Set up the config file with values that will cover these cases when the base anchor size is adjusted by the aspect ratios and multiplied by the scales.

    I think it's pretty straightforward. I also used this 'workaround'.

提交回复
热议问题