ria-com / nomeroff-net

Nomeroff Net. Automatic numberplate recognition system.
GNU General Public License v3.0
459 stars 159 forks source link

I have error about checkpoint #261

Closed paulpham1407 closed 1 year ago

paulpham1407 commented 1 year ago

image ValueError: No checkpoint is available for model type shufflenetv2_x2.0

dimabendera commented 1 year ago

Please provide full traceback and the script you are running

paulphong commented 1 year ago

The pretrained weights were added in this PR last year so you might need to update torchvision. This code works fine in the current nightly release:

model = models.shufflenet_v2_x2_0(pretrained=True)

paulpham1407 commented 1 year ago
ImportError                               Traceback (most recent call last)
/tmp/ipykernel_66/3671554270.py in <module>
      5 from _paths import nomeroff_net_dir
      6 
----> 7 from nomeroff_net import pipeline
      8 from nomeroff_net.tools import unzip
      9 

/var/www/nomeroff-net/nomeroff-net/examples/ju/benchmark/../../../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/nomeroff-net/examples/ju/benchmark/../../../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/nomeroff-net/examples/ju/benchmark/../../../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/nomeroff-net/examples/ju/benchmark/../../../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/nomeroff-net/examples/ju/benchmark/../../../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)
ApelSYN commented 1 year ago

Make sure you have torchvision>=0.14.1

paulpham1407 commented 1 year ago

I fixed, thanks you