Skip to content

Commit

Permalink
WIP Fix/m1 mac (#158)
Browse files Browse the repository at this point in the history
* Change dependencies.

* Add pandas requirement.

* [temp] Remove import to avoid missing dependency issue.

* Change to new version of lightning for torchtext issue resolution.

* Loosen sklearn dependency.

* Revert commenting.

* Change to match @samet-akcay recommendation with minor changes.

* Change kornia import and loosen version again.

* Revert missing line.

* Add check for openvino.

* Fix black issue.

* Reverted wandb requirement.

* Fix pylint ordering.

* Fix black formatting.
  • Loading branch information
dreaquil committed Apr 11, 2022
1 parent 54d750d commit b785f7d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 21 deletions.
5 changes: 4 additions & 1 deletion anomalib/deploy/inferencers/openvino.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,21 @@
# See the License for the specific language governing permissions
# and limitations under the License.

import importlib
from pathlib import Path
from typing import Dict, Optional, Tuple, Union

import cv2
import numpy as np
from omegaconf import DictConfig, ListConfig
from openvino.inference_engine import IECore # pylint: disable=no-name-in-module

from anomalib.pre_processing import PreProcessor

from .base import Inferencer

if importlib.util.find_spec("openvino") is not None:
from openvino.inference_engine import IECore # pylint: disable=no-name-in-module


class OpenVINOInferencer(Inferencer):
"""OpenVINO implementation for the inference.
Expand Down
2 changes: 1 addition & 1 deletion anomalib/models/padim/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import torch
import torch.nn.functional as F
import torchvision
from kornia import gaussian_blur2d
from kornia.filters import gaussian_blur2d
from omegaconf import DictConfig, ListConfig
from torch import Tensor, nn

Expand Down
2 changes: 1 addition & 1 deletion anomalib/models/patchcore/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import torch
import torch.nn.functional as F
import torchvision
from kornia import gaussian_blur2d
from kornia.filters import gaussian_blur2d
from omegaconf import ListConfig
from torch import Tensor, nn

Expand Down
26 changes: 8 additions & 18 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
albumentations==1.1.0
attrdict==2.0.1
defusedxml==0.7.1
einops==0.3.2
kornia==0.5.6
lxml==4.6.5
matplotlib==3.4.3
networkx~=2.5
numpy~=1.19.5
omegaconf==2.1.1
albumentations>=1.1.0
einops>=0.3.2
kornia>=0.5.6
omegaconf>=2.1.1
opencv-python>=4.5.3.56
opencv-contrib-python==4.5.5.62
pandas~=1.1.5
pillow==9.0.0
pandas>=1.1.0
pytorch-lightning>=1.6.0
torch==1.8.1
torchvision==0.9.1
torchtext==0.9.1
scikit-image>=0.17.2
scikit-learn==0.24.2
torchvision>=0.9.1
torchtext>=0.9.1
wandb==0.12.9
matplotlib>=3.4.3

0 comments on commit b785f7d

Please sign in to comment.