Closed paulphong closed 1 year ago
I'm runing custom-object-detection.ipynb
--------------------------------------------------------------------------- ImportError Traceback (most recent call last) /tmp/ipykernel_34/3229489553.py in <module> 4 from _paths import nomeroff_net_dir 5 ----> 6 from nomeroff_net import pipeline 7 from nomeroff_net.tools import unzip 8 /var/www/nomeroff-net/examples/ju/inference/../../../nomeroff_net/__init__.py in <module> 1 from nomeroff_net.pipes.number_plate_keypoints_detectors.bbox_np_points import NpPointsCraft ----> 2 from nomeroff_net.pipes.number_plate_text_readers.text_detector import TextDetector 3 from nomeroff_net.pipes.number_plate_text_readers.text_postprocessing import (text_postprocessing, 4 text_postprocessing_async) 5 from nomeroff_net.pipes.number_plate_classificators.options_detector import OptionsDetector /var/www/nomeroff-net/examples/ju/inference/../../../nomeroff_net/pipes/number_plate_text_readers/text_detector.py in <module> 4 from typing import List, Dict, Tuple 5 from torch import no_grad ----> 6 from .base.ocr import OCR 7 from nomeroff_net.tools.mcm import modelhub 8 from nomeroff_net.tools.errors import TextDetectorError /var/www/nomeroff-net/examples/ju/inference/../../../nomeroff_net/pipes/number_plate_text_readers/base/ocr.py in <module> 16 from torchvision import models 17 from nomeroff_net.data_modules.numberplate_ocr_data_module import OcrNetDataModule ---> 18 from nomeroff_net.nnmodels.ocr_model import NPOcrNet, weights_init 19 20 from nomeroff_net.tools.image_processing import normalize_img /var/www/nomeroff-net/examples/ju/inference/../../../nomeroff_net/nnmodels/__init__.py in <module> 2 from .numberplate_orientation_model import NPOrientationNet 3 from .numberplate_inverse_model import NPInverseNet ----> 4 from .numberplate_options_model import NPOptionsNet /var/www/nomeroff-net/examples/ju/inference/../../../nomeroff_net/nnmodels/numberplate_options_model.py in <module> 7 from torch.nn import functional 8 from .numberplate_classification_model import ClassificationNet ----> 9 from torchvision.models import efficientnet_v2_s 10 from nomeroff_net.tools.errors import NPOptionsNetError 11 import contextlib ImportError: cannot import name 'efficientnet_v2_s' from 'torchvision.models' (/opt/conda/lib/python3.8/site-packages/torchvision/models/__init__.py)
efficientnet_v2_s has been added since torchvision 0.13 You need to update torch and torchvision
I'm runing custom-object-detection.ipynb