msracver / Deformable-ConvNets

Deformable Convolutional Networks
MIT License
4.02k stars 953 forks source link

Question about num_deformable_group #268

Closed chongruo closed 4 years ago

chongruo commented 4 years ago

From discussions in previous issues, it makes clear that why the num_filter in the offset is 72 when num_deformable_group=4.

However, could someone give some explanations or intuitions that why we need num_deformable_group > 1? and how it works? They are not explained in the paper.

Appreciate for any help !

chongruo commented 4 years ago

Just found the doc for this parameter in modulated_deformable_convolution-inl.h

If num_deformable_group is larger than 1, denoted by dg, then split the input offset evenly into dg parts along the channel axis, and also evenly split out evenly into dg parts along the channel axis. Next compute the deformable convolution, apply the i-th part of the offset part on the i-th out.

The standard deformable group (dg=1) is position-depedent. It applies the same offset to all channels of one pixel. Similar to Group Normalization, it will have more flexibilities with a larger dg since different channels are responsible for detecting different parts, and may have different geometric variations.

Taotaoxu commented 4 years ago

Thanks for your question and answer, its very useful !

Appreciate for any help !

chongruo commented 4 years ago

Thanks for your question and answer, its very useful !

  • But I am still confused by these parameters: group, deformable_group, num_filter. Could you please explain the relationship among them and how it works ?
  • INPUT=(B,H,W,256), OFFSET=(B,H,W,5233),OUTPUT=(B,H,W,5) Now, I want to manually provide 5 groups of offset(33), and correspondingly output 5 predictions, namely the output is (B,H,W,5). Each prediction takes all the 256 feature channels within one of the 5 groups of offset regions as input. How should i set these parameters: input_channel=256, num_filter=5, group=?, deformable_group=? in the deform_conv ?

Appreciate for any help !