diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0988bdc..477451a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,10 +39,10 @@ jobs: run: | pyinstaller \ --onefile Movie_Data_Capture.py \ - --hidden-import ADC_function.py \ - --hidden-import core.py \ + --hidden-import "ImageProcessing.hog" \ --add-data "$(python -c 'import cloudscraper as _; print(_.__path__[0])' | tail -n 1):cloudscraper" \ --add-data "$(python -c 'import opencc as _; print(_.__path__[0])' | tail -n 1):opencc" \ + --add-data "$(python -c 'import face_recognition_models as _; print(_.__path__[0])' | tail -n 1):face_recognition_models" \ --add-data "Img:Img" \ --add-data "config.ini:." \ @@ -51,10 +51,10 @@ jobs: run: | pyinstaller ` --onefile Movie_Data_Capture.py ` - --hidden-import ADC_function.py ` - --hidden-import core.py ` + --hidden-import "ImageProcessing.hog" ` --add-data "$(python -c 'import cloudscraper as _; print(_.__path__[0])' | tail -n 1);cloudscraper" ` --add-data "$(python -c 'import opencc as _; print(_.__path__[0])' | tail -n 1);opencc" ` + --add-data "$(python -c 'import face_recognition_models as _; print(_.__path__[0])' | tail -n 1):face_recognition_models" ` --add-data "Img;Img" ` --add-data "config.ini;." ` diff --git a/ImageProcessing/__init__.py b/ImageProcessing/__init__.py index 3bf3490..f545e91 100644 --- a/ImageProcessing/__init__.py +++ b/ImageProcessing/__init__.py @@ -86,7 +86,8 @@ def face_center(filename, model): return mod.face_center(filename, model) except Exception as e: print('[-]Model found face ' + filename) - logging.error(e) + if config.getInstance().debug() == 1: + logging.error(e) return (0, 0) if __name__ == '__main__': diff --git a/py_to_exe.ps1 b/py_to_exe.ps1 index c3a41d6..498e7cd 100644 --- a/py_to_exe.ps1 +++ b/py_to_exe.ps1 @@ -3,13 +3,14 @@ $CLOUDSCRAPER_PATH=$(python -c 'import cloudscraper as _; print(_.__path__[0])' | select -Last 1) $OPENCC_PATH=$(python -c 'import opencc as _; print(_.__path__[0])' | select -Last 1) +$FACE_RECOGNITION_MODELS=$(python -c 'import face_recognition_models as _; print(_.__path__[0])' | select -Last 1) mkdir build mkdir __pycache__ pyinstaller --onefile Movie_Data_Capture.py ` - --hidden-import ADC_function.py ` - --hidden-import core.py ` + --hidden-import "ImageProcessing.hog" ` + --add-data "$FACE_RECOGNITION_MODELS;face_recognition_models" ` --add-data "$CLOUDSCRAPER_PATH;cloudscraper" ` --add-data "$OPENCC_PATH;opencc" ` --add-data "Img;Img" `