Skip to content

Error in demo_instseg.ipynb? #136

Description

@crankler

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions