After surfing the internet i downloaded again my torch version
$ python3 -m pip install --no-cache-dir torch-2.0.0+nv23.05-cp38-cp38-linux_aarch64.whl
To my suprise this version downloaded and its showing me CUDA is available with the name but the problem comes when I’m executing my code of object detection where its showing me this
python3 test2.py
CUDA is available. Using GPU for inference.
/home/esl/.local/lib/python3.8/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension:
warn(f"Failed to load image Python extension: {e}")
Traceback (most recent call last):
File “test2.py”, line 42, in
results = model.predict(source=rgb_frame, device=device)
File “/home/esl/.local/lib/python3.8/site-packages/ultralytics/engine/model.py”, line 554, in predict
return self.predictor.predict_cli(source=source) if is_cli else self.predictor(source=source, stream=stream)
File “/home/esl/.local/lib/python3.8/site-packages/ultralytics/engine/predictor.py”, line 168, in call
return list(self.stream_inference(source, model, *args, **kwargs)) # merge list of Result into one
File “/home/esl/.local/lib/python3.8/site-packages/torch/utils/_contextlib.py”, line 35, in generator_context
response = gen.send(None)
File “/home/esl/.local/lib/python3.8/site-packages/ultralytics/engine/predictor.py”, line 261, in stream_inference
self.results = self.postprocess(preds, im, im0s)
File “/home/esl/.local/lib/python3.8/site-packages/ultralytics/models/yolo/detect/predict.py”, line 25, in postprocess
preds = ops.non_max_suppression(
File “/home/esl/.local/lib/python3.8/site-packages/ultralytics/utils/ops.py”, line 292, in non_max_suppression
i = torchvision.ops.nms(boxes, scores, iou_thres) # NMS
File “/home/esl/.local/lib/python3.8/site-packages/torchvision/ops/boxes.py”, line 40, in nms
_assert_has_ops()
File “/home/esl/.local/lib/python3.8/site-packages/torchvision/extension.py”, line 48, in _assert_has_ops
raise RuntimeError(
RuntimeError: Couldn’t load custom C++ ops. This can happen if your PyTorch and torchvision versions are incompatible, or if you had errors while compiling torchvision from source. For further information on the compatible versions, check GitHub - pytorch/vision: Datasets, Transforms and Models specific to Computer Vision for the compatibility matrix. Please check your PyTorch version with torch.version and your torchvision version with torchvision.version and verify if they are compatible, and if not please reinstall torchvision so that it matches your PyTorch install.
So, I thought to download the torchvision file for the same version
wget https://developer.download.nvidia.com/compute/redist/jp/v511/pytorch/torchvision-0.15.2+nv23.05-cp38-cp38-linux_aarch64.whl
–2024-10-04 14:51:41-- https://developer.download.nvidia.com/compute/redist/jp/v511/pytorch/torchvision-0.15.2+nv23.05-cp38-cp38-linux_aarch64.whl
Resolving developer.download.nvidia.com (developer.download.nvidia.com)… 152.199.39.144
Connecting to developer.download.nvidia.com (developer.download.nvidia.com)|152.199.39.144|:443… connected.
HTTP request sent, awaiting response… 404 Not Found
2024-10-04 14:51:42 ERROR 404: Not Found.
Can you help me in this thing