Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

training on my own data in sunrgbd format raises error #50

Open
madinwei opened this issue Feb 28, 2023 · 1 comment
Open

training on my own data in sunrgbd format raises error #50

madinwei opened this issue Feb 28, 2023 · 1 comment

Comments

@madinwei
Copy link

Hello @likethesky , @Celebio , @colesbury , @pdollar , @minqi ,

thank you for this is amazing work of 3detr.
I have built my dataset with sunrgbd format and it already worked with Votenet, but when i use it with 3detr it raises the following issue:

Training started at epoch 0 until 720.
One training epoch = 18 iters.
One eval epoch = 2 iters.
Traceback (most recent call last):
  File "main.py", line 435, in <module>
    launch_distributed(args)
  File "main.py", line 423, in launch_distributed
    main(local_rank=0, args=args)
  File "main.py", line 416, in main
    best_val_metrics,
  File "main.py", line 191, in do_train
    logger,
  File "/home/mad/3detr/engine.py", line 87, in train_one_epoch
    outputs = model(inputs)
  File "/home/mad/miniconda3/envs/3detr/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/mad/3detr/models/model_3detr.py", line 327, in forward
    query_xyz, query_embed = self.get_query_embeddings(enc_xyz, point_cloud_dims)
  File "/home/mad/3detr/models/model_3detr.py", line 179, in get_query_embeddings
    pos_embed = self.pos_embedding(query_xyz, input_range=point_cloud_dims)
  File "/home/mad/miniconda3/envs/3detr/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/mad/3detr/models/position_embedding.py", line 134, in forward
    return self.get_fourier_embeddings(xyz, num_channels, input_range)
  File "/home/mad/3detr/models/position_embedding.py", line 112, in get_fourier_embeddings
    xyz_proj = torch.mm(xyz2d.view(-1, d_in), self.gauss_B[:, :d_out]).view(
RuntimeError: expected scalar type Double but found Float

i have also used the sunrgbd dataset and it works fine, i have built my dataloader from the sunrgbd loader and customized it according to my data.

@Pablesky
Copy link

Pablesky commented Jul 4, 2024

I don't know if you solved already but basically add these two lines after you read the files.

point_cloud = point_cloud.astype(np.float32)
bboxes = bboxes.astype(np.float64)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants