Bug

Hello,

On my jetson TX1 I have been trying to run a code to do some stereo object detection. The code works fine on my pc, but when I set up all my dependency and I dowload pythorch for aarm linux forn this github : GitHub - KumaTea/pytorch-aarch64: PyTorch wheels (whl) & conda for aarch64 / ARMv8 / ARM64 on my jetson TX1. I keep getting this error :

nvidia@ubuntu:~/Documents/depth$ /usr/local/bin/python3.7 /home/nvidia/Documents/depth/stereoVision.py
Downloading: “https://github.com/ultralytics/yolov5/archive/master.zip" to /home/nvidia/.cache/torch/hub/master.zip
/usr/local/lib/python3.7/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 “/home/nvidia/Documents/depth/stereoVision.py”, line 17, in
model = torch.hub.load(‘ultralytics/yolov5’, ‘custom’, path=’/home/nvidia/Documents/projet/yolov5/runs/train/exp3/weights/last.pt’, force_reload=True)
File “/usr/local/lib/python3.7/site-packages/torch/hub.py”, line 399, in load
model = _load_local(repo_or_dir, model, *args, **kwargs)
File “/usr/local/lib/python3.7/site-packages/torch/hub.py”, line 428, in _load_local
model = entry(*args, **kwargs)
File “/home/nvidia/.cache/torch/hub/ultralytics_yolov5_master/hubconf.py”, line 70, in custom
return _create(path, autoshape=autoshape, verbose=verbose, device=device)
File “/home/nvidia/.cache/torch/hub/ultralytics_yolov5_master/hubconf.py”, line 31, in _create
from models.common import AutoShape, DetectMultiBackend
File “/home/nvidia/.cache/torch/hub/ultralytics_yolov5_master/models/common.py”, line 24, in
from utils.datasets import exif_transpose, letterbox
File “/home/nvidia/.cache/torch/hub/ultralytics_yolov5_master/utils/datasets.py”, line 30, in
from utils.augmentations import Albumentations, augment_hsv, copy_paste, letterbox, mixup, random_perspective
File “/home/nvidia/.cache/torch/hub/ultralytics_yolov5_master/utils/augmentations.py”, line 12, in
from utils.general import LOGGER, check_version, colorstr, resample_segments, segment2box
File “/home/nvidia/.cache/torch/hub/ultralytics_yolov5_master/utils/general.py”, line 30, in
import torchvision
File “/usr/local/lib/python3.7/site-packages/torchvision/init.py”, line 7, in
from torchvision import models
File “/usr/local/lib/python3.7/site-packages/torchvision/models/init.py”, line 18, in
from . import quantization
File “/usr/local/lib/python3.7/site-packages/torchvision/models/quantization/init.py”, line 1, in
from .mobilenet import *
File “/usr/local/lib/python3.7/site-packages/torchvision/models/quantization/mobilenet.py”, line 1, in
from .mobilenetv2 import QuantizableMobileNetV2, mobilenet_v2, all as mv2_all
File “/usr/local/lib/python3.7/site-packages/torchvision/models/quantization/mobilenetv2.py”, line 5, in
from torch.ao.quantization import QuantStub, DeQuantStub
ImportError: cannot import name ‘QuantStub’ from ‘torch.ao.quantization’ (/usr/local/lib/python3.7/site-packages/torch/ao/quantization/init.py)

Does any one know how to fix this bug.

Thanks

Hi,

Could you try our PyTorch package instead?

Thanks.

Hi I tried your Pytorch package, I tried the docker and the .whl installation and I run in this new error each and every time no matter what I do :
root@ubuntu:/home/depth# /usr/bin/python3 /home/depth/stereoVision.py
Traceback (most recent call last):
File “/home/depth/stereoVision.py”, line 6, in
import torch
File “/usr/local/lib/python3.6/dist-packages/torch/init.py”, line 196, in
_load_global_deps()
File “/usr/local/lib/python3.6/dist-packages/torch/init.py”, line 149, in _load_global_deps
ctypes.CDLL(lib_path, mode=ctypes.RTLD_GLOBAL)
File “/usr/lib/python3.6/ctypes/init.py”, line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: libcurand.so.10: cannot open shared object file: No such file or directory

I looked online and on the forum for some fixes and I tried them all and none of them worked. I tought that the docker would fix that but it didnt. I have the jetpack 4.5 and I tried the pytorch version 1.8.0 and 1.9.0 and 1.10.0 and their corresponding version of torchvision. Is there any thing I could do?

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.