lalonderodney / SegCaps

Official Implementation of the Paper "Capsules for Object Segmentation".
Apache License 2.0
276 stars 101 forks source link

Locally-Constrained Dynamic Routing #12

Closed r06945003 closed 5 years ago

r06945003 commented 6 years ago

Hi, In the paper you mention that you use Locally-Constrained Dynamic Routing, which means children are only routed to parents within a defined spatially-local window. But I cannot find this part in the capsule_layers.py or capsnet.py that implement such routing with specified spatial size. Thanks!

lalonderodney commented 5 years ago

See the call of ConvCapsuleLayer. The prediction vectors are formed based on a user defined kernel over the child capsules, then these capsules are routed to the parent at the same spatial location. This differs from the fully-connected capsule layer used in Sabour et al. where the prediction vectors formed by multiplication with a weight matrix W_i,j for every child capsule i and parent capsule j, which are reshaped before routing so that all child capsules are routed to each parent.