Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing anomalib with only openvino does not work #2426

Open
samet-akcay opened this issue Nov 20, 2024 Discussed in #2425 · 0 comments
Open

Installing anomalib with only openvino does not work #2426

samet-akcay opened this issue Nov 20, 2024 Discussed in #2425 · 0 comments

Comments

@samet-akcay
Copy link
Contributor

Discussed in #2425

Originally posted by FedericoDeBona November 20, 2024
I have a machine where I only need to inference with openvino, so as stated in the documentation I installed anomalib with only Openvino:

pip install anomalib==1.1.1
anomalib install --option openvino -v
⠋ Installing packages...  This may take a few minutes.

[09:06:21] Installation list: ['nncf>=2.10.0', 'openvino>=2024.0', 'onnx>=1.16.0']   

Then when trying to use the inferencer

from anomalib.deploy import OpenVINOInferencer

I get error:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
[<ipython-input-1-f7a5616dbbd5>](https://localhost:8080/#) in <cell line: 3>()
      1 get_ipython().system(' pip install anomalib==1.1.1')
      2 get_ipython().system(' anomalib install --option openvino -v')
----> 3 from anomalib.deploy import OpenVINOInferencer

[/usr/local/lib/python3.10/dist-packages/anomalib/deploy/__init__.py](https://localhost:8080/#) in <module>
      4 # SPDX-License-Identifier: Apache-2.0
      5 
----> 6 from .export import CompressionType, ExportType
      7 from .inferencers import Inferencer, OpenVINOInferencer, TorchInferencer
      8 

[/usr/local/lib/python3.10/dist-packages/anomalib/deploy/export.py](https://localhost:8080/#) in <module>
     11 from torchvision.transforms.v2 import CenterCrop, Compose, Resize, Transform
     12 
---> 13 from anomalib.data.transforms import ExportableCenterCrop
     14 
     15 logger = logging.getLogger("anomalib")

[/usr/local/lib/python3.10/dist-packages/anomalib/data/__init__.py](https://localhost:8080/#) in <module>
     13 from anomalib.utils.config import to_tuple
     14 
---> 15 from .base import AnomalibDataModule, AnomalibDataset
     16 from .depth import DepthDataFormat, Folder3D, MVTec3D
     17 from .image import BTech, Folder, ImageDataFormat, Kolektor, MVTec, Visa

[/usr/local/lib/python3.10/dist-packages/anomalib/data/base/__init__.py](https://localhost:8080/#) in <module>
      4 # SPDX-License-Identifier: Apache-2.0
      5 
----> 6 from .datamodule import AnomalibDataModule
      7 from .dataset import AnomalibDataset
      8 from .depth import AnomalibDepthDataset

[/usr/local/lib/python3.10/dist-packages/anomalib/data/base/datamodule.py](https://localhost:8080/#) in <module>
      9 from typing import TYPE_CHECKING, Any
     10 
---> 11 from lightning.pytorch import LightningDataModule
     12 from lightning.pytorch.trainer.states import TrainerFn
     13 from lightning.pytorch.utilities.types import EVAL_DATALOADERS, TRAIN_DATALOADERS

ModuleNotFoundError: No module named 'lightning'

Am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant