Ошибка в torchvision при использовании craft-text-detection в googleCollab

хотел опробовать вот такой пакет https://pypi.org/project/craft-text-detector/#description. Буквально взял код из примера в описании пакета, и чуть чуть изменил- просто поместил основную часть в функцию для удобного многократного вызова:

!pip install craft-text-detector

from craft_text_detector import Craft

def detect(image_path,output_dir):
craft = Craft(output_dir=output_dir, crop_type="poly", cuda=False)
# apply craft text detection and export detected regions to output directory
prediction_result = craft.detect_text(image_path)

# unload models from ram/gpu
# craft.unload_craftnet_model()
# craft.unload_refinenet_model()

image_path = '/content/Picture/input.png'
output_dir = '/content/Output'
detect(image_path,output_dir)

На выполнении функции detect выдает ошибку:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-5-ab63a2b1b6a3> in <cell line: 3>()
      1 image_path = '/content/Picture/input.png'
      2 output_dir = '/content/Output'
----> 3 detect(image_path,output_dir)


/usr/local/lib/python3.10/dist-packages/craft_text_detector/models/basenet/vgg16_bn.py in <module>
      5 import torch.nn.init as init
      6 from torchvision import models
----> 7 from torchvision.models.vgg import model_urls
      8 
      9 

ImportError: cannot import name 'model_urls' from 'torchvision.models.vgg' (/usr/local/lib/python3.10/dist-packages/torchvision/models/vgg.py)

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------

Помогите пожалуйста решить эту проблему. Ссылка на блокнот - https://colab.research.google.com/drive/1s-EExGQll8LT95UZ3uhLPv43O81bnOtL?usp=sharing


Ответы (0 шт):