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

Error in demo_instseg.ipynb? #136

Open
crankler opened this issue Mar 15, 2024 · 0 comments
Open

Error in demo_instseg.ipynb? #136

crankler opened this issue Mar 15, 2024 · 0 comments

Comments

@crankler
Copy link

Hi, thanks for your interesting work.
I've reimplemented this pkg, but when I try to test demo_instseg.ipynb as you suggested, I found the error below:

/home/yc/.conda/envs/track/lib/python3.9/site-packages/torch/utils/checkpoint.py:460: UserWarning: torch.utils.checkpoint: please pass in use_reentrant=True or use_reentrant=False explicitly. The default value of use_reentrant will be updated to be False in the future. To maintain current behavior, pass use_reentrant=True. It is recommended that you use use_reentrant=False. Refer to docs for more details on the differences between the two variants.
  warnings.warn(
/home/yc/.conda/envs/track/lib/python3.9/site-packages/torch/utils/checkpoint.py:90: UserWarning: None of the inputs have requires_grad=True. Gradients will be None
  warnings.warn(
Traceback (most recent call last):
  File "/home/yc/catkin_map/catkin_deva/src/sam_track_ros/scripts/samtrack/sam2trackseg_ros.py", line 242, in <module>
    TrackSAMNode()
  File "/home/yc/catkin_map/catkin_deva/src/sam_track_ros/scripts/samtrack/sam2trackseg_ros.py", line 128, in TrackSAMNode
    segtracker.add_reference(frame, pred_mask)
  File "/home/yc/catkin_map/catkin_deva/src/sam_track_ros/scripts/samtrack/SegTracker.py", line 98, in add_reference
    self.curr_idx = self.get_obj_num()
  File "/home/yc/catkin_map/catkin_deva/src/sam_track_ros/scripts/samtrack/SegTracker.py", line 125, in get_obj_num
    return int(max(objs))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

It seems that this error located at segtracker.add_reference() when frame=0.
Can you tell me how to fix it? Thanks for your reply here.

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