wenbowen123 / iros20-6d-pose-tracking

[IROS 2020] se(3)-TrackNet: Data-driven 6D Pose Tracking by Calibrating Image Residuals in Synthetic Domains
Other
384 stars 66 forks source link

Epoch is not saved to the Torch checkpoint #55

Closed martinlyra closed 1 year ago

martinlyra commented 1 year ago

Whenever predict_ros.py is run with our own trained data:

Loading ckpt from  /home/marcusmartin/artifacts/0/model_best_val.pth.tar
Traceback (most recent call last):
  File "predict_ros.py", line 109, in <module>
    tracker = Tracker(dataset_info, images_mean, images_std,ckpt_dir,trans_normalizer=dataset_info['max_translation'],rot_normalizer=dataset_info['max_rotation'])
  File "/home/marcusmartin/iros20-tracking/predict.py", line 152, in __init__
    print('pose track ckpt epoch={}'.format(checkpoint['epoch']))
KeyError: 'epoch'

The culprit seems to be https://github.com/wenbowen123/iros20-6d-pose-tracking/blob/1b63d0d16b771c4654bf9e571ede50baf7eda7a1/problems.py#L142 and https://github.com/wenbowen123/iros20-6d-pose-tracking/blob/1b63d0d16b771c4654bf9e571ede50baf7eda7a1/problems.py#L149

Our torch version when we trained the data was 2.0.1 - if you were using an older version, may I suggest you to add a requirements.txt too?

wenbowen123 commented 1 year ago

can you pull the code and retry? This issue should not be related to pytorch version. Are you running inside the docker?

martinlyra commented 1 year ago

Nope, we run natively on a computer that has access to the robot ROS. - The fix seems to work fine!