Я пытался запустить модель обнаружения фруктов на моем raspberry pi с помощью PyTorch, но эта ошибка (ниже) продолжает повторяться. У кого-нибудь раньше была такая проблема?
Traceback (most recent call last):
File "modelLoad.py", line 25, in <module>
predictions = model.predict_top(image)
File "/home/pi/.local/lib/python3.7/site-packages/detecto/core.py", line 369, in predict_top
predictions = self.predict(images)
File "/home/pi/.local/lib/python3.7/site-packages/detecto/core.py", line 322, in predict
preds = self._get_raw_predictions(images)
File "/home/pi/.local/lib/python3.7/site-packages/detecto/core.py", line 278, in _get_raw_predictions
preds = self._model(images)
File "/home/pi/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 545, in __call__
result = self.forward(*input, **kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/torchvision/models/detection/generalized_rcnn.py", line 51, in forward
proposals, proposal_losses = self.rpn(images, features, targets)
File "/home/pi/.local/lib/python3.7/site-packages/torch/nn/modules/module.py", line 545, in __call__
result = self.forward(*input, **kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/torchvision/models/detection/rpn.py", line 411, in forward
boxes, scores = self.filter_proposals(proposals, objectness, images.image_sizes, num_anchors_per_level)
File "/home/pi/.local/lib/python3.7/site-packages/torchvision/models/detection/rpn.py", line 336, in filter_proposals
keep = box_ops.batched_nms(boxes, scores, lvl, self.nms_thresh)
File "/home/pi/.local/lib/python3.7/site-packages/torchvision/ops/boxes.py", line 72, in batched_nms
keep = nms(boxes_for_nms, scores, iou_threshold)
File "/home/pi/.local/lib/python3.7/site-packages/torchvision/ops/boxes.py", line 32, in nms
_C = _lazy_import()
File "/home/pi/.local/lib/python3.7/site-packages/torchvision/extension.py", line 12, in _lazy_import
from torchvision import _C as C
ImportError: cannot import name '_C' from 'torchvision' (/home/pi/.local/lib/python3.7/site-packages/torchvision/__init__.py)