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

索引超出 #73

Open
Grizemc opened this issue Jun 24, 2024 · 0 comments
Open

索引超出 #73

Grizemc opened this issue Jun 24, 2024 · 0 comments

Comments

@Grizemc
Copy link

Grizemc commented Jun 24, 2024

[SAMM INFO] Time for embedding computing is saved: "D:\slicer\samm-main\samm-python-terminal\samm-workspace/timearr_EMB.pkl"
Length of dataNode.features[msg['view']]: 15
Exception in thread Thread-1 (looping):
Traceback (most recent call last):
File "D:\anaconda\envs\samm\lib\threading.py", line 1016, in _bootstrap_inner
self.run()
File "D:\anaconda\envs\samm\lib\threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "D:\slicer\samm-main\samm-python-terminal\sam_server.py", line 53, in looping
retMsg, lateExec = self.callback(cmd, msg)
File "D:\slicer\samm-main\samm-python-terminal\utl_sam_server.py", line 343, in sammProcessingCallBack
msgBack, lateUpdate = callBackListcmdType
File "D:\slicer\samm-main\samm-python-terminal\utl_sam_server.py", line 280, in sammProcessingCallBack_INFERENCE
seg = helperPredict(dataNode, msg, points, point_labels, bbox2d)
File "D:\slicer\samm-main\samm-python-terminal\utl_sam_server.py", line 213, in helperPredict
print(f"Length of dataNode.features[msg['view']][msg['n']]: {len(dataNode.features[msg['view']][msg['n']])}")
IndexError: list index out of range

question:dataNode.samPredictor[msg["view"]].features = dataNode.features[msg["view"]][msg["n"]].to(dataNode.device)
if isinstance(bbox2d, (np.ndarray, np.generic)):
seg, _, _ = dataNode.samPredictor[msg["view"]].predict(
point_coords = points,
point_labels = labels,
box = bbox2d,
multimask_output = False)
else:
seg, _, _ = dataNode.samPredictor[msg["view"]].predict(
point_coords = points,
point_labels = labels,
multimask_output = False)
seg = seg[0]
return seg

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