1adrianb / 1adrianb/human-pose-estimation
what is the principle of the deconvolution with bilinear interpolation kernel?
- Lingua principale
- Lua
- Stelle
- 109
- Fork
- 41
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
The code that I find in a website,but i dont know the principle。the code use this bilinear interpolation kernel to deconvolute。
code:
def bilinear_kernel(in_channels, out_channels, kernel_size):
"""Define a bilinear kernel according to in channels and out channels.
Returns:
return a bilinear filter tensor
"""
factor = (kernel_size + 1) // 2 #
if kernel_size % 2 == 1:
center = factor - 1
else:
center = factor - 0.5
og = np.ogrid[:kernel_size, :kernel_size]
bilinear_filter = (1 - abs(og[0] - center) / factor) * (1 - abs(og[1] - center) / factor)
weight = np.zeros((in_channels, out_channels, kernel_size, kernel_size), dtype=np.float32)
weight[range(in_channels), range(out_channels), :, :] = bilinear_filter
return torch.from_numpy(weight)
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
The issue asks for the principle behind using a bilinear interpolation kernel for deconvolution. The provided code defines a bilinear_kernel function in Python with PyTorch. To understand the principle, start by reading about transposed convolutions (deconvolutions) in deep learning and how bilinear interpolation is used for upsampling. Look at the repository's codebase to see where this kernel is applied, possibly in upsampling layers of the pose estimation model. Check related papers or documentation on convolutional part heatmap regression to see the context. The goal is to explain the mathematical and practical reasoning, not to modify code.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python, pytorch
- Ambito
- computer-vision, machine-learning
- Tipo di issue
- Documentazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 30/100