You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
正在将 samples/llm/img/分布式训练技术原理-幕布图片-57107-679259.jpg 添加到向量库,共包含1条文档
Batches: 0%| | 0/1 [00:00<?, ?it/s]2024-05-11 10:53:49,844 - utils.py[line:377] - ERROR: RuntimeError: 从文件 samples/test_files/test.txt 加载文档时出错:
object has no attribute nms:
File "D:\conda\envs\chatchat\Lib\site-packages\torchvision\ops\boxes.py", line 41
_log_api_usage_once(nms)
_assert_has_ops()
return torch.ops.torchvision.nms(boxes, scores, iou_threshold)
~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
'nms' is being compiled since it was called from '_batched_nms_vanilla'
File "D:\conda\envs\chatchat\Lib\site-packages\torchvision\ops\boxes.py", line 109
for class_id in torch.unique(idxs):
curr_indices = torch.where(idxs == class_id)[0]
curr_keep_indices = nms(boxes[curr_indices], scores[curr_indices], iou_threshold)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
keep_mask[curr_indices[curr_keep_indices]] = True
keep_indices = torch.where(keep_mask)[0]
'_batched_nms_vanilla' is being compiled since it was called from 'batched_nms'
File "D:\conda\envs\chatchat\Lib\site-packages\torchvision\ops\boxes.py", line 73
# pytorch/vision#1311 (comment)
if boxes.numel() > (4000 if boxes.device.type == "cpu" else 20000) and not torchvision._is_tracing():
return _batched_nms_vanilla(boxes, scores, idxs, iou_threshold)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
else:
return _batched_nms_coordinate_trick(boxes, scores, idxs, iou_threshold)
'batched_nms' is being compiled since it was called from 'generate_detections'
File "D:\conda\envs\chatchat\Lib\site-packages\effdet\anchors.py", line 140
scores[top_detection_idx] = soft_scores
else:
top_detection_idx = batched_nms(boxes, scores, classes, iou_threshold=0.5)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
# keep only top max_det_per_image scoring predictions
'generate_detections' is being compiled since it was called from '_batch_detection'
File "D:\conda\envs\chatchat\Lib\site-packages\effdet\bench.py", line 82
img_scale_i = None if img_scale is None else img_scale[i]
img_size_i = None if img_size is None else img_size[i]
detections = generate_detections(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class_out[i],
~~~~~~~~~~~~~
box_out[i],
~~~~~~~~~~~
anchor_boxes,
~~~~~~~~~~~~~
indices[i],
~~~~~~~~~~~
classes[i],
~~~~~~~~~~~
img_scale_i,
~~~~~~~~~~~~
img_size_i,
~~~~~~~~~~~
max_det_per_image=max_det_per_image,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
soft_nms=soft_nms,
~~~~~~~~~~~~~~~~~ <--- HERE
)
batch_detections.append(detections)
The text was updated successfully, but these errors were encountered:
The error you're encountering, "object has no attribute nms," points to an issue with the torchvision package, specifically with the Non-Maximum Suppression (nms) function not being found. This function is crucial for object detection tasks to remove redundant bounding boxes. To resolve this, ensure you have the correct version of torchvision installed, as the error might arise from a version mismatch. The Langchain-Chatchat project specifies torchvision==0.16.2 in its requirements. Verify your installed version with pip show torchvision in your Conda environment.
If the problem persists after confirming the torchvision version, consider checking your environment for unnecessary packages, especially if effdet is not explicitly required for your project. Providing more specific details about your setup and the steps leading to the error could further help in diagnosing the issue.
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
正在将 samples/llm/img/分布式训练技术原理-幕布图片-57107-679259.jpg 添加到向量库,共包含1条文档
Batches: 0%| | 0/1 [00:00<?, ?it/s]2024-05-11 10:53:49,844 - utils.py[line:377] - ERROR: RuntimeError: 从文件 samples/test_files/test.txt 加载文档时出错:
object has no attribute nms:
File "D:\conda\envs\chatchat\Lib\site-packages\torchvision\ops\boxes.py", line 41
_log_api_usage_once(nms)
_assert_has_ops()
return torch.ops.torchvision.nms(boxes, scores, iou_threshold)
~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
'nms' is being compiled since it was called from '_batched_nms_vanilla'
File "D:\conda\envs\chatchat\Lib\site-packages\torchvision\ops\boxes.py", line 109
for class_id in torch.unique(idxs):
curr_indices = torch.where(idxs == class_id)[0]
curr_keep_indices = nms(boxes[curr_indices], scores[curr_indices], iou_threshold)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
keep_mask[curr_indices[curr_keep_indices]] = True
keep_indices = torch.where(keep_mask)[0]
'_batched_nms_vanilla' is being compiled since it was called from 'batched_nms'
File "D:\conda\envs\chatchat\Lib\site-packages\torchvision\ops\boxes.py", line 73
# pytorch/vision#1311 (comment)
if boxes.numel() > (4000 if boxes.device.type == "cpu" else 20000) and not torchvision._is_tracing():
return _batched_nms_vanilla(boxes, scores, idxs, iou_threshold)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
else:
return _batched_nms_coordinate_trick(boxes, scores, idxs, iou_threshold)
'batched_nms' is being compiled since it was called from 'generate_detections'
File "D:\conda\envs\chatchat\Lib\site-packages\effdet\anchors.py", line 140
scores[top_detection_idx] = soft_scores
else:
top_detection_idx = batched_nms(boxes, scores, classes, iou_threshold=0.5)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
'generate_detections' is being compiled since it was called from '_batch_detection'
File "D:\conda\envs\chatchat\Lib\site-packages\effdet\bench.py", line 82
img_scale_i = None if img_scale is None else img_scale[i]
img_size_i = None if img_size is None else img_size[i]
detections = generate_detections(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class_out[i],
~~~~~~~~~~~~~
box_out[i],
~~~~~~~~~~~
anchor_boxes,
~~~~~~~~~~~~~
indices[i],
~~~~~~~~~~~
classes[i],
~~~~~~~~~~~
img_scale_i,
~~~~~~~~~~~~
img_size_i,
~~~~~~~~~~~
max_det_per_image=max_det_per_image,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
soft_nms=soft_nms,
~~~~~~~~~~~~~~~~~ <--- HERE
)
batch_detections.append(detections)
The text was updated successfully, but these errors were encountered: