Jetpack 4.6
Pytorch 1.9.0
Torchvision 0.10.0
Hello,
I’m building a docker image with the instructions here: NVIDIA-AI-IOT/scene-text-recognition
At the very last step of the process, the error below occurs.
Step 21/21 : RUN python3 scene-text-recognition/video_capture.py
---> Running in 78c445500d6d
[ WARN:0@10.014] global /io/opencv/modules/videoio/src/cap_v4l.cpp (902) open VIDEOIO(V4L2:/dev/video0): can't open camera by index
Downloading detection model, please wait. This may take several minutes depending upon your network connection.
Error opening video file
Progress: ----------------------------------------------- 100.0% Complete
Downloading recognition model, please wait. This may take several minutes depending upon your network connection.
Progress: ----------------------------------------------- 100.0% Complete
Warning: Encountered known unsupported method torch.zeros
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.__hash__
.
.
.
Warning: Encountered known unsupported method torch.Tensor.__hash__
Warning: Encountered known unsupported method torch.Tensor.get_device
Warning: Encountered known unsupported method torch.Tensor.is_complex
/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at /media/nvidia/NVME/pytorch/pytorch-v1.9.0/c10/core/TensorImpl.h:1156.)
return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)
Traceback (most recent call last):
File "scene-text-recognition/video_capture.py", line 59, in <module>
reader = easyocr.Reader(['en'], use_trt=True)
File "/usr/local/lib/python3.6/dist-packages/easyocr-1.4-py3.6.egg/easyocr/easyocr.py", line 276, in __init__
self.detector = get_detector(detector_path, self.device, quantize, cudnn_benchmark=cudnn_benchmark, use_trt=use_trt)
File "/usr/local/lib/python3.6/dist-packages/easyocr-1.4-py3.6.egg/easyocr/detection.py", line 165, in get_detector
net_trt = torch2trt(net,[sample_input])
File "/usr/local/lib/python3.6/dist-packages/torch2trt-0.2.0-py3.6.egg/torch2trt/torch2trt.py", line 601, in torch2trt
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/parallel/data_parallel.py", line 166, in forward
return self.module(*inputs[0], **kwargs[0])
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/easyocr-1.4-py3.6.egg/easyocr/craft.py", line 66, in forward
y = F.interpolate(y, size=sources[2].size()[2:], mode='bilinear', align_corners=False)
File "/usr/local/lib/python3.6/dist-packages/torch2trt-0.2.0-py3.6.egg/torch2trt/torch2trt.py", line 302, in wrapper
File "/usr/local/lib/python3.6/dist-packages/torch2trt-0.2.0-py3.6.egg/torch2trt/converters/interpolate.py", line 89, in convert_interpolate_trt7
AttributeError: 'tensorrt.tensorrt.IResizeLayer' object has no attribute 'align_corners'
The command '/bin/sh -c python3 scene-text-recognition/video_capture.py' returned a non-zero code: 1
I assume this is to do with torch2trt. How do I approach this?
Thank you in advance.