From 131eea414985e93f06f5a0390141b74311dad075 Mon Sep 17 00:00:00 2001 From: Ghassen Date: Fri, 14 Jun 2024 11:03:46 +0200 Subject: [PATCH] fix lint and change onnxruntime version --- envs/environment-gpu.yaml | 2 +- requirements-dev.txt | 25 ++++++++++++++++++------- requirements.txt | 21 +++++++++++++++------ setup.cfg | 2 +- src/dot/fomm/face_alignment.py | 2 +- 5 files changed, 36 insertions(+), 16 deletions(-) diff --git a/envs/environment-gpu.yaml b/envs/environment-gpu.yaml index 0dd4c4d..586ea6f 100644 --- a/envs/environment-gpu.yaml +++ b/envs/environment-gpu.yaml @@ -7,5 +7,5 @@ dependencies: - python=3.8 - pip=21.3 - pip: - - onnxruntime-gpu==1.9.0 + - onnxruntime-gpu==1.18.0 - -r ../requirements.txt diff --git a/requirements-dev.txt b/requirements-dev.txt index 1db3256..7463b94 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -42,8 +42,12 @@ colorama==0.4.6 # ipython # pytest # tqdm +coloredlogs==15.0.1 + # via onnxruntime-gpu coverage==6.4.2 - # via pytest-cov + # via + # coverage + # pytest-cov customtkinter==5.2.0 # via dot (setup.cfg) cycler==0.11.0 @@ -60,7 +64,7 @@ dlib==19.19.0 # via dot (setup.cfg) executing==0.8.3 # via stack-data -face-alignment==1.3.3 +face-alignment==1.4.1 # via dot (setup.cfg) filelock==3.7.1 # via @@ -71,9 +75,11 @@ flake8==3.9.2 flatbuffers==2.0 # via # mediapipe - # onnxruntime + # onnxruntime-gpu fonttools==4.43.0 # via matplotlib +humanfriendly==10.0 + # via coloredlogs identify==2.5.1 # via pre-commit idna==2.10 @@ -130,7 +136,7 @@ numpy==1.22.0 # matplotlib # mediapipe # numba - # onnxruntime + # onnxruntime-gpu # opencv-contrib-python # opencv-python # pywavelets @@ -138,7 +144,7 @@ numpy==1.22.0 # scipy # tifffile # torchvision -onnxruntime==1.9.0 +onnxruntime-gpu==1.18.0 # via dot (setup.cfg) opencv-contrib-python==4.5.5.62 # via @@ -152,6 +158,7 @@ packaging==21.3 # via # kornia # matplotlib + # onnxruntime-gpu # pytest # scikit-image parso==0.8.3 @@ -183,7 +190,7 @@ protobuf==3.20.2 # via # dot (setup.cfg) # mediapipe - # onnxruntime + # onnxruntime-gpu pure-eval==0.2.2 # via stack-data py==1.11.0 @@ -204,6 +211,8 @@ pyparsing==3.0.9 # via # matplotlib # packaging +pyreadline3==3.4.1 + # via humanfriendly pytest==7.1.2 # via # dot (setup.cfg) @@ -243,7 +252,9 @@ sounddevice==0.4.6 stack-data==0.3.0 # via ipython sympy==1.12 - # via torch + # via + # onnxruntime-gpu + # torch tifffile==2022.5.4 # via scikit-image toml==0.10.2 diff --git a/requirements.txt b/requirements.txt index cdb637a..d637d27 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,6 +21,8 @@ colorama==0.4.6 # click # pytest # tqdm +coloredlogs==15.0.1 + # via onnxruntime-gpu customtkinter==5.2.0 # via dot (setup.cfg) cycler==0.11.0 @@ -31,16 +33,18 @@ dlib==19.19.0 # via dot (setup.cfg) exceptiongroup==1.1.2 # via pytest -face-alignment==1.3.3 +face-alignment==1.4.1 # via dot (setup.cfg) filelock==3.12.2 # via torch flatbuffers==2.0 # via # mediapipe - # onnxruntime + # onnxruntime-gpu fonttools==4.43.0 # via matplotlib +humanfriendly==10.0 + # via coloredlogs idna==2.10 # via requests imageio==2.19.3 @@ -77,7 +81,7 @@ numpy==1.22.0 # matplotlib # mediapipe # numba - # onnxruntime + # onnxruntime-gpu # opencv-contrib-python # opencv-python # pywavelets @@ -85,7 +89,7 @@ numpy==1.22.0 # scipy # tifffile # torchvision -onnxruntime==1.9.0 +onnxruntime-gpu==1.18.0 # via dot (setup.cfg) opencv-contrib-python==4.5.5.62 # via @@ -99,6 +103,7 @@ packaging==21.3 # via # kornia # matplotlib + # onnxruntime-gpu # pytest # scikit-image pillow==10.0.1 @@ -114,13 +119,15 @@ protobuf==3.20.2 # via # dot (setup.cfg) # mediapipe - # onnxruntime + # onnxruntime-gpu pycparser==2.21 # via cffi pyparsing==3.0.9 # via # matplotlib # packaging +pyreadline3==3.4.1 + # via humanfriendly pytest==7.4.0 # via dot (setup.cfg) python-dateutil==2.8.2 @@ -147,7 +154,9 @@ six==1.16.0 sounddevice==0.4.6 # via mediapipe sympy==1.12 - # via torch + # via + # onnxruntime-gpu + # torch tifffile==2022.5.4 # via scikit-image tomli==2.0.1 diff --git a/setup.cfg b/setup.cfg index 399f6df..83a9f12 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,7 +34,7 @@ install_requires = kornia mediapipe numpy - onnxruntime + onnxruntime-gpu==1.18.0 opencv-contrib-python opencv_python Pillow diff --git a/src/dot/fomm/face_alignment.py b/src/dot/fomm/face_alignment.py index 2a89a92..206ebf6 100644 --- a/src/dot/fomm/face_alignment.py +++ b/src/dot/fomm/face_alignment.py @@ -4,7 +4,7 @@ import numpy as np import torch from face_alignment.folder_data import FolderData -from face_alignment.utils import * # noqa +from face_alignment.utils import crop, draw_gaussian, flip, get_image, get_preds_fromhm from packaging import version from tqdm import tqdm