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

Question about tracker.py & performance #167

Open
Valerianding opened this issue Feb 28, 2024 · 1 comment
Open

Question about tracker.py & performance #167

Valerianding opened this issue Feb 28, 2024 · 1 comment

Comments

@Valerianding
Copy link

Valerianding commented Feb 28, 2024

Hi ! Thanks for your great work.

After reading your paper, I was interested in the performance of UniAD. And I used nvidia Nsight System to profile the model and found there is a period which both compute and memory throughput is very low. (only about 5%).

And The stack trace shows it might be something perform inefficiently with ~/UniAD/projects/mmdet3d_plugin/uniad/dense_heads/track_head_plugin/tracker.py。
I look into the code and found somthing i can't understand: the parameter "iou_thre" is set to be None and also passed None when the function is called.

And within this function it doesn't update iou_thre. So what's the point of parameter "iou_thre" and the code following if iou_thre is not None ...

Is there somthing I missed? Can You help me? Thanks a lot! (ps: This is my first time to write a issue, so feel free to point out any mistakes or stupid things i have done. Thx).

The following is the result of performance from the overall view
Screen Shot 2024-02-28 at 7 35 01 PM

@Valerianding
Copy link
Author

Valerianding commented Feb 29, 2024

Hi, @YTEP-ZHI I actually insert a assert False in the if,as below:

   def update(self, track_instances: Instances, iou_thre=None):
        track_instances.disappear_time[track_instances.scores >= self.score_thresh] = 0
        for i in range(len(track_instances)):
            print(len(track_instances))
            if (
                track_instances.obj_idxes[i] == -1
                and track_instances.scores[i] >= self.score_thresh
            ):  
                if iou_thre is not None and track_instances.pred_boxes[track_instances.obj_idxes>=0].shape[0]!=0:
                    assert False #WITHOUT GOING WRONG
                    iou3ds = iou_3d(denormalize_bbox(track_instances.pred_boxes[i].unsqueeze(0), None)[...,:7], denormalize_bbox(track_instances.pred_boxes[track_instances.obj_idxes>=0], None)[...,:7])
                    if iou3ds.max()>iou_thre:
                        continue
                # new track
                # print("track {} has score {}, assign obj_id {}".format(i, track_instances.scores[i], self.max_obj_id))
                track_instances.obj_idxes[i] = self.max_obj_id
                self.max_obj_id += 1
            elif (
                track_instances.obj_idxes[i] >= 0
                and track_instances.scores[i] < self.filter_score_thresh
            ):
                # sleep time ++
                track_instances.disappear_time[i] += 1
                if track_instances.disappear_time[i] >= self.miss_tolerance:
                    # mark deaded tracklets: Set the obj_id to -1.
                    # TODO: remove it by following functions
                    # Then this track will be removed by TrackEmbeddingLayer.
                    track_instances.obj_idxes[i] = -1

And it didn't goes wrong. so Is it possible we can remove this code? or is something wrong?

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

1 participant