Added transcrowd_gap
This commit is contained in:
parent
bcff06f9c2
commit
322d7f9ea5
2 changed files with 81 additions and 3 deletions
|
|
@ -37,9 +37,8 @@ class PerspectiveEstimator(nn.Module):
|
|||
After all, it is reasonable to say that you see more when you look at
|
||||
faraway places.
|
||||
|
||||
This do imply that **we need to obtain a reasonably good feature extractor
|
||||
from general images before training this submodule**. Hence, for now, we
|
||||
prob. should work on transformer first.
|
||||
The paper utilizes a unsupervised loss -- "row feature density" refers to
|
||||
the density of features computed from ?
|
||||
|
||||
:param input_shape: (N, C, H, W)
|
||||
:param conv_kernel_shape: Oriented as (H, W)
|
||||
|
|
@ -63,6 +62,8 @@ class PerspectiveEstimator(nn.Module):
|
|||
(_, _, height, width) = input_shape
|
||||
|
||||
# Sanity checking
|
||||
# [TODO] Maybe this is unnecessary, maybe we can automatically suggest new params,
|
||||
# but right now let's just do this...
|
||||
(_conv_height, _conv_width) = (
|
||||
np.floor(
|
||||
(height + 2 * conv_padding - conv_dilation * (conv_kernel_shape[0] - 1) - 1)
|
||||
|
|
@ -112,4 +113,5 @@ class PerspectiveEstimator(nn.Module):
|
|||
|
||||
return out
|
||||
|
||||
# def unsupervised_loss(predictions, targets):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue