|
Swarm-SLAM
1.0.0
C-SLAM Framework
|
Public Member Functions | |
| def | __init__ (self, num_clusters=64, dim=128, normalize_input=True, vladv2=False) |
| def | init_params (self, clsts, traindescs) |
| def | forward (self, x) |
Public Attributes | |
| num_clusters | |
| dim | |
| alpha | |
| vladv2 | |
| normalize_input | |
| conv | |
| centroids | |
NetVLAD layer implementation
based on https://github.com/lyakaap/NetVLAD-pytorch/blob/master/netvlad.py
Definition at line 28 of file netvlad.py.
| def netvlad.NetVLADLayer.__init__ | ( | self, | |
num_clusters = 64, |
|||
dim = 128, |
|||
normalize_input = True, |
|||
vladv2 = False |
|||
| ) |
Args:
num_clusters : int
The number of clusters
dim : int
Dimension of descriptors
alpha : float
Parameter of initialization. Larger value is harder assignment.
normalize_input : bool
If true, descriptor-wise L2 normalization is applied to input.
vladv2 : bool
If true, use vladv2 otherwise use vladv1
Definition at line 33 of file netvlad.py.
| def netvlad.NetVLADLayer.forward | ( | self, | |
| x | |||
| ) |
Forward pass through the NetVLAD network
Args:
x (image): image to match
Returns:
torch array: Global image descriptor
Definition at line 94 of file netvlad.py.
| def netvlad.NetVLADLayer.init_params | ( | self, | |
| clsts, | |||
| traindescs | |||
| ) |
Definition at line 63 of file netvlad.py.
| netvlad.NetVLADLayer.alpha |
Definition at line 54 of file netvlad.py.
| netvlad.NetVLADLayer.centroids |
Definition at line 61 of file netvlad.py.
| netvlad.NetVLADLayer.conv |
Definition at line 57 of file netvlad.py.
| netvlad.NetVLADLayer.dim |
Definition at line 53 of file netvlad.py.
| netvlad.NetVLADLayer.normalize_input |
Definition at line 56 of file netvlad.py.
| netvlad.NetVLADLayer.num_clusters |
Definition at line 52 of file netvlad.py.
| netvlad.NetVLADLayer.vladv2 |
Definition at line 55 of file netvlad.py.