nv-tlabs / ATISS

Code for "ATISS: Autoregressive Transformers for Indoor Scene Synthesis", NeurIPS 2021
Other
258 stars 55 forks source link

Transltions order #14

Closed JackW987 closed 2 years ago

JackW987 commented 2 years ago
def forward(self, sample_params):
    # Unpack the sample_params
    class_labels = sample_params["class_labels"]
    translations = sample_params["translations"]
    sizes = sample_params["sizes"]
    angles = sample_params["angles"]
    room_layout = sample_params["room_layout"]
    # shape (batch,length,dimension)
    B, _, _ = class_labels.shape
    # Apply the positional embeddings only on bboxes that are not the start
    # token
    class_f = self.fc_class(class_labels)
    # Apply the positional embedding along each dimension of the position
    # property
    pos_f_x = self.pe_pos_x(translations[:, :, 0:1])
    pos_f_y = self.pe_pos_x(translations[:, :, 1:2])
    pos_f_z = self.pe_pos_x(translations[:, :, 2:3])
    pos_f = torch.cat([pos_f_x, pos_f_y, pos_f_z], dim=-1)

Maybe here have some wrong order? In my dataset_stats.txt the bounds_translations "bounds_translations": [-2.762500499999998, 0.045, -2.7527500000000007, 2.778441746198965, 3.6248395981292725, 2.818542771063899],so I think maybe the z Coordinate cliped in [0.045,-3.624] ,Maybe the pos_f_y should actually be pos_f_z?