ria-com / nomeroff-net

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

Installation manual fix #201

Closed sapzxc closed 1 year ago

sapzxc commented 2 years ago

Hi!

For centos you need add this to manual: For problems with grpcio and opencv_python: pip3 install --upgrade pip python3 -m pip install --upgrade setuptools

to resolve torchvision install problem: yum install zlib-devel yum install libjpeg-turbo-devel pip3 install "torchvision>=0.9"

pip3 install scikit-build pip3 install -r requirements.txt

my mashine is: Linux server 3.10.0-957.1.3.el7.x86_64

ApelSYN commented 2 years ago

Thanks for the instruction, I will test it soon and add it to the README.md

sapzxc commented 2 years ago

One more thing, I have tested example code and got error:

# python3.6 test.py
YOLOv5  2022-1-27 torch 1.10.1+cu102 CPU

Fusing layers...
Model Summary: 224 layers, 7053910 parameters, 0 gradients
Loading weights from checkpoint (/home/www/nomeroff-net/NomeroffNet/tools/../../data/./models/NpPointsCraft/craft_mlt/craft_mlt_25k_2020-02-16.pth)
Loading weights of refiner from checkpoint (/home/www/nomeroff-net/NomeroffNet/tools/../../data/./models/NpPointsCraft/craft_refiner/craft_refiner_CTW1500_2020-02-16.pth)
Traceback (most recent call last):
  File "test.py", line 35, in <module>
    textDetector.load("latest")
  File "/home/www/nomeroff-net/NomeroffNet/TextDetectors/base/ocr.py", line 287, in load
    self.create_model()
AttributeError: 'str' object has no attribute 'create_model'
sapzxc commented 2 years ago

The fix examples here:

textDetector = eu() # brackets here
textDetector.load("latest")
ApelSYN commented 2 years ago

@sapzxc Yes, that's right, you can also apply another design

from NomeroffNet import TextDetector
#...
textDetector = TextDetector.get_static_module("eu")
textDetector.load("latest")