brjathu / PHALP

Code repository for the paper "Tracking People by Predicting 3D Appearance, Location & Pose". (CVPR 2022 Oral)
Other
259 stars 38 forks source link

AttributeError: 'int' object has no attribute 'item' #34

Open daviduarte opened 1 month ago

daviduarte commented 1 month ago

Erro reproduction:

It will raise an error:

Traceback (most recent call last):
  File "/home/lecun/PHALP/phalp/trackers/PHALP.py", line 205, in track
    self.tracker.update(detections, t_, frame_name, self.cfg.phalp.shot)
  File "/home/lecun/PHALP/phalp/external/deep_sort_/tracker.py", line 83, in update
    self.accumulate_vectors([i[0] for i in matches], features=self.cfg.phalp.predict)
  File "/home/lecun/PHALP/phalp/external/deep_sort_/tracker.py", line 179, in accumulate_vectors
    if("P" in features): p_pred = self.phalp_tracker.forward_for_tracking([p_features, p_data, t_features], "P", l_time)
  File "/home/lecun/PHALP/phalp/trackers/PHALP.py", line 491, in forward_for_tracking
    pose_pred = self.pose_predictor.predict_next(en_pose, en_data, en_time, time)
  File "/home/lecun/PHALP/phalp/models/predictor/pose_transformer_v2.py", line 398, in predict_next
    t_end.append(t.item())
AttributeError: 'int' object has no attribute 'item'
daviduarte commented 1 month ago

Possible solution: