aim-uofa / AdelaiDet

AdelaiDet is an open source toolbox for multiple instance-level detection and recognition tasks.
https://git.io/AdelaiDet
Other
3.38k stars 650 forks source link

Questions about multi-scale #85

Closed tengerye closed 4 years ago

tengerye commented 4 years ago

Hi, may I ask two questions about multi-scale implementation in your code please?

  1. Is the implementation of scale the same as the description in your paper? As I noticed class Scale is always initialized with 1.0, is the scale adjusted automatically during the learning?

  2. If I would like to know which level is responsible for a bounding box, how shall I do that?

tianzhi0549 commented 4 years ago

1) Yes. The scales are trainable. 2) https://github.com/aim-uofa/AdelaiDet/blob/9e2537382f0bfe01b4a831890e82c95da0dc4cee/adet/modeling/fcos/fcos_outputs.py#L306. target_inds_per_im is the target indexes for all the locations on all the FPN levels. You can obtain what you need by mapping these locations to their level id.

tengerye commented 4 years ago

@tianzhi0549 Thank you so much for your kind reply. For the second question, I mean how to find the corresponding level during inference instead of training process.

tianzhi0549 commented 4 years ago

@tengerye it can be easily obtained here. https://github.com/aim-uofa/AdelaiDet/blob/9e2537382f0bfe01b4a831890e82c95da0dc4cee/adet/modeling/fcos/fcos_outputs.py#L401

tengerye commented 4 years ago

For anyone who concerns, the solution is to append an attribute to class Instances after calling forward_for_single_feature_map. The attribute is of the same size as scores. The framework will do the rest for you.