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

detection_head #31

Closed
miraclesheephaha opened this issue Mar 27, 2024 · 5 comments
Closed

detection_head #31

miraclesheephaha opened this issue Mar 27, 2024 · 5 comments

Comments

@miraclesheephaha
Copy link

I want to put the detection_head of petrv2 into it. During the training process, this problem occurred: TypeError: forward() takes 3 positional arguments but 6 were given. Does forward() in petrv2_head.py need to change the number of parameters?
Looking forward to your answer,thank you.

@ziqipang
Copy link
Contributor

@miraclesheephaha I am not familiar with PETRv2 right now. From the error message you just presented, it seems you have to modify the input arguments of each type of class. For the tracking purpose, I think the input to the head needs to be modified. For example, you can take a look at how I modified the things and perhaps imitate this style if you want to use PETRv2.

  • Here is my modified PETR head for tracking.
  • Here is the original PETR head.

@miraclesheephaha
Copy link
Author

OK,Thank you for your reply.
I will try it.

@ziqipang
Copy link
Contributor

ziqipang commented Apr 2, 2024

@miraclesheephaha Also, please check our documentation out to see if its information helps. https://github.com/TRI-ML/PF-Track/blob/main/documents/detection_heads.md

@miraclesheephaha
Copy link
Author

miraclesheephaha commented Apr 6, 2024

After that, I created new petrv2_tracking_head2 and petrv2's f1_q500_800320.py, and then I added the following line to train_pipeline_multiframe in f1_q500_800320.py
dict(type='LoadMultiViewImageFromMultiSweepsFiles', sweeps_num=1, to_float32=True, pad_empty_sweeps=True, test_mode=False, sweep_range=[3,27])
According to this question, I also added generate_sweep_pkl.py of petrv2
megvii-research/PETR#60

This problem will occur as follows
PF-Track/projects/mmdet3d_plugin/datasets/pipelines/loading.py", line 63, in __call__ img_timestamp = results['img_timestamp'] KeyError: 'img_timestamp'

Looking forward to your answer,thank you.

@ziqipang
Copy link
Contributor

ziqipang commented Apr 7, 2024

From the error message, it seems you are not using the tracking dataset, not sure if it is related, example link. Meanwhile, please also remember to prepare the data according to my documentation. @miraclesheephaha

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