Cloned the Repo successfully.
Facing the below error after installing easyocr and updated predict.py file
ubuntu@ip-10-0-32-10:~/Automatic_Number_Plate_Detection_Recognition_YOLOv8/ultralytics/yolo/v8/detect$ python3 predict.py model='best.pt' source='demo.mp4'
/home/ubuntu/.local/lib/python3.8/site-packages/torchvision/models/_utils.py:252: UserWarning: Accessing the model URLs via the internal dictionary of the module is deprecated since 0.13 and may be removed in the future. Please access them via the appropriate Weights Enum instead.
warnings.warn(
/home/ubuntu/.local/lib/python3.8/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
warnings.warn(
/home/ubuntu/.local/lib/python3.8/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or None
for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing weights=None
.
warnings.warn(msg)
Traceback (most recent call last):
File "predict.py", line 6, in
from ultralytics.yolo.engine.predictor import BasePredictor
File "/home/ubuntu/Automatic_Number_Plate_Detection_Recognition_YOLOv8/ultralytics/init.py", line 5, in
from ultralytics.hub import checks
File "/home/ubuntu/Automatic_Number_Plate_Detection_Recognition_YOLOv8/ultralytics/hub/init.py", line 15, in
from ultralytics.yolo.v8.detect import DetectionTrainer
File "/home/ubuntu/Automatic_Number_Plate_Detection_Recognition_YOLOv8/ultralytics/yolo/v8/detect/init.py", line 3, in
from .predict import DetectionPredictor, predict
File "/home/ubuntu/Automatic_Number_Plate_Detection_Recognition_YOLOv8/ultralytics/yolo/v8/detect/predict.py", line 13, in
reader = easyocr.Reader(['en'], gpu=True)
File "/home/ubuntu/.local/lib/python3.8/site-packages/easyocr/easyocr.py", line 227, in init
self.recognizer, self.converter = get_recognizer(recog_network, network_params,
File "/home/ubuntu/.local/lib/python3.8/site-packages/easyocr/recognition.py", line 181, in get_recognizer
model = torch.nn.DataParallel(model).to(device)
File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 148, in init
self.module.to(self.src_device_obj)
File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 989, in to
return self._apply(convert)
File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 641, in _apply
module._apply(fn)
File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 641, in _apply
module._apply(fn)
File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 641, in _apply
module._apply(fn)
File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/nn/modules/rnn.py", line 194, in _apply
self.flatten_parameters()
File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/nn/modules/rnn.py", line 159, in flatten_parameters
not torch.backends.cudnn.is_acceptable(fw.data)):
File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/backends/cudnn/init.py", line 95, in is_acceptable
if not _init():
File "/home/ubuntu/.local/lib/python3.8/site-packages/torch/backends/cudnn/init.py", line 50, in _init
raise RuntimeError(f'{base_error_msg}'
RuntimeError: cuDNN version incompatibility: PyTorch was compiled against (8, 5, 0) but found runtime version (8, 4, 0). PyTorch already comes bundled with cuDNN. One option to resolving this error is to ensure PyTorch can find the bundled cuDNN.Looks like your LD_LIBRARY_PATH contains incompatible version of cudnnPlease either remove it from the path or install cudnn (8, 5, 0)