| 745 | """Predict a list of keypoints [x, y] given a rasterized map""" |
| 746 | |
| 747 | def __init__( |
| 748 | self, |
| 749 | model_arch: str, |
| 750 | input_image_shape: tuple = (3, 224, 224), |
| 751 | spatial_softmax_kwargs=None |
| 752 | ) -> None: |
| 753 | super().__init__( |
| 754 | model_arch=model_arch, |
| 755 | input_image_shape=input_image_shape, |
| 756 | feature_dim=None, |
| 757 | use_spatial_softmax=True, |
| 758 | spatial_softmax_kwargs=spatial_softmax_kwargs |
| 759 | ) |
| 760 | |
| 761 | def forward(self, map_inputs) -> torch.Tensor: |
| 762 | outputs = super(RasterizedMapKeyPointNet, self).forward(map_inputs) |