BSI-OFIQ / OFIQ-Project

Open Source Facial Image Quality
Other
38 stars 12 forks source link

Failure to run "01_conan-install-FaceQAlib.cmd" #8

Closed tadam98 closed 6 months ago

tadam98 commented 6 months ago
  1. There is no pre-requisite for OpenCV 4.5.5
  2. I have the required conan verion

C:>conan --version Conan version 1.59.0

C:>.\01_conan-install-FaceQAlib.cmd The system cannot find the path specified. Configuration (profile_host): [settings] arch=x86_64 arch_build=x86_64 build_type=Debug compiler=Visual Studio compiler.runtime=MDd compiler.version=16 os=Windows os_build=Windows [options] [build_requires] [env]

Configuration (profile_build): [settings] arch=x86_64 arch_build=x86_64 build_type=Debug compiler=Visual Studio compiler.runtime=MDd compiler.version=16 os=Windows os_build=Windows [options] [build_requires] [env]

ERROR: opencv/4.5.5: Cannot load recipe. Error loading conanfile at 'C:\Users\Mickey.conan\data\opencv\4.5.5__\export\conanfile.py': Current Conan version (1.59.0) does not satisfy the defined one (>=1.60.0 <2.0 || >=2.0.5).

C:>.\02_configure_and_build_FaceQAlib.cmd Attempting to build the real implementation Removing build\build_win Generating build files version: 0.1.0 -- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.22631. -- The CXX compiler identification is MSVC 19.29.30153.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done x onnxruntime-win-x64-1.14.1/ x onnxruntime-win-x64-1.14.1/CodeSignSummary-7621b17c-3bd6-4e6d-bbbd-6cf75a0d499e.md x onnxruntime-win-x64-1.14.1/GIT_COMMIT_ID x onnxruntime-win-x64-1.14.1/include/ x onnxruntime-win-x64-1.14.1/include/cpu_provider_factory.h x onnxruntime-win-x64-1.14.1/include/onnxruntime_cxx_api.h x onnxruntime-win-x64-1.14.1/include/onnxruntime_cxx_inline.h x onnxruntime-win-x64-1.14.1/include/onnxruntime_c_api.h x onnxruntime-win-x64-1.14.1/include/onnxruntime_run_options_config_keys.h x onnxruntime-win-x64-1.14.1/include/onnxruntime_session_options_config_keys.h x onnxruntime-win-x64-1.14.1/include/provider_options.h x onnxruntime-win-x64-1.14.1/include/tensorrt_provider_factory.h x onnxruntime-win-x64-1.14.1/lib/ x onnxruntime-win-x64-1.14.1/lib/onnxruntime.dll x onnxruntime-win-x64-1.14.1/lib/onnxruntime.lib x onnxruntime-win-x64-1.14.1/lib/onnxruntime.pdb x onnxruntime-win-x64-1.14.1/lib/onnxruntime_providers_shared.dll x onnxruntime-win-x64-1.14.1/lib/onnxruntime_providers_shared.lib x onnxruntime-win-x64-1.14.1/lib/onnxruntime_providers_shared.pdb x onnxruntime-win-x64-1.14.1/LICENSE x onnxruntime-win-x64-1.14.1/Privacy.md x onnxruntime-win-x64-1.14.1/README.md x onnxruntime-win-x64-1.14.1/ThirdPartyNotices.txt x onnxruntime-win-x64-1.14.1/VERSION_NUMBER -- CMAKE_CURRENT_SOURCE_DIR: C:/Doc/Shanit/2024/Projects/Moin/Projects/OFIQ/OFIQ-Project-develop CMake Error at FaceQAlib/CMakeLists.windows.conan.cmake:25 (find_package): By not providing "Findopencv.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "opencv", but CMake did not find one.

Could not find a package configuration file provided by "opencv" with any of the following names:

opencvConfig.cmake
opencv-config.cmake

Add the installation prefix of "opencv" to CMAKE_PREFIX_PATH or set "opencv_DIR" to a directory containing one of the above files. If "opencv" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): CMakeLists.txt:39 (include)

-- Configuring incomplete, errors occurred!

tadam98 commented 6 months ago

I have installed conan 1.60.0 python pip -m install conan==1.60.0 And it downloaded the needed opencv and the 01_conan-install-Fac.eQAlib.cmd executed ok. And also 02_configure_and_build_FaceQAlib.cmd. But 03_build_FaceQAlib.cmd .\run_ctest.cmd Test project C:/Doc/Shanit/2024/Projects/Moin/Projects/OFIQ/OFIQ-Project-develop/build/buildwin Start 1: FaceQAInterface.LoadEmptyConfig 1/7 Test #1: FaceQAInterface.LoadEmptyConfig ..... Passed 0.03 sec Start 2: FaceQAInterface.LoadWorkingConfig 2/7 Test #2: FaceQAInterface.LoadWorkingConfig ...***Failed 0.04 sec Running main() from C:\J\w\prod\BuildSingleReference.conan\data\gtest\cci.20210126_\\build\5ad274d83035c78ba2b205e6cf4f1b317aee8e05\src\googletest\src\gtest_main.cc Note: Google Test filter = FaceQAInterface.LoadWorkingConfig [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from FaceQAInterface [ RUN ] FaceQAInterface.LoadWorkingConfig C:\Doc\Shanit\2024\Projects\Moin\Projects\OFIQ\OFIQ-Project-develop\testing\test_config_and_initialization.cpp(40): error: Value of: ret.code == FACEQA::ReturnCode::Success Actual: false Expected: true [ FAILED ] FaceQAInterface.LoadWorkingConfig (6 ms) [----------] 1 test from FaceQAInterface (6 ms total)

[----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (6 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] FaceQAInterface.LoadWorkingConfig

1 FAILED TEST

Start 3: Facefinder.FindFace

3/7 Test #3: Facefinder.FindFace .................***Failed 0.04 sec Running main() from C:\J\w\prod\BuildSingleReference.conan\data\gtest\cci.20210126__\build\5ad274d83035c78ba2b205e6cf4f1b317aee8e05\src\googletest\src\gtest_main.cc Note: Google Test filter = Facefinder.FindFace [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from Facefinder [ RUN ] Facefinder.FindFace unknown file: error: C++ exception with description "FaceDetectionError: failed to initialize opencv SDD face detector" thrown in the test body. [ FAILED ] Facefinder.FindFace (8 ms) [----------] 1 test from Facefinder (8 ms total)

[----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (8 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] Facefinder.FindFace

1 FAILED TEST

Start 4: LandmarkDetector.ADNetLandmarks

4/7 Test #4: LandmarkDetector.ADNetLandmarks .....***Failed 0.04 sec Running main() from C:\J\w\prod\BuildSingleReference.conan\data\gtest\cci.20210126__\build\5ad274d83035c78ba2b205e6cf4f1b317aee8e05\src\googletest\src\gtest_main.cc Note: Google Test filter = LandmarkDetector.ADNetLandmarks [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from LandmarkDetector [ RUN ] LandmarkDetector.ADNetLandmarks unknown file: error: C++ exception with description "FaceDetectionError: failed to initialize opencv SDD face detector" thrown in the test body. [ FAILED ] LandmarkDetector.ADNetLandmarks (9 ms) [----------] 1 test from LandmarkDetector (10 ms total)

[----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (10 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] LandmarkDetector.ADNetLandmarks

1 FAILED TEST

Start 5: TotalNumberOfFaces.SSD

5/7 Test #5: TotalNumberOfFaces.SSD ..............***Failed 0.46 sec Running main() from C:\J\w\prod\BuildSingleReference.conan\data\gtest\cci.20210126__\build\5ad274d83035c78ba2b205e6cf4f1b317aee8e05\src\googletest\src\gtest_main.cc Note: Google Test filter = TotalNumberOfFaces.SSD [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from TotalNumberOfFaces [ RUN ] TotalNumberOfFaces.SSD C:\Doc\Shanit\2024\Projects\Moin\Projects\OFIQ\OFIQ-Project-develop\testing\test_total_number_of_faces.cpp(46): error: Expected equality of these values: ret.code Which is: Undefined error FACEQA::ReturnCode::Success Which is: Success unknown file: error: SEH exception with code 0xc0000005 thrown in the test body. [ FAILED ] TotalNumberOfFaces.SSD (421 ms) [----------] 1 test from TotalNumberOfFaces (421 ms total)

[----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (421 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] TotalNumberOfFaces.SSD

1 FAILED TEST

Start 6: DynamicRange.WD5

6/7 Test #6: DynamicRange.WD5 ....................***Failed 0.44 sec Running main() from C:\J\w\prod\BuildSingleReference.conan\data\gtest\cci.20210126__\build\5ad274d83035c78ba2b205e6cf4f1b317aee8e05\src\googletest\src\gtest_main.cc Note: Google Test filter = DynamicRange.WD5 [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from DynamicRange [ RUN ] DynamicRange.WD5 C:\Doc\Shanit\2024\Projects\Moin\Projects\OFIQ\OFIQ-Project-develop\testing\test_dynamic_range.cpp(46): error: Expected equality of these values: ret.code Which is: Undefined error FACEQA::ReturnCode::Success Which is: Success unknown file: error: SEH exception with code 0xc0000005 thrown in the test body. [ FAILED ] DynamicRange.WD5 (411 ms) [----------] 1 test from DynamicRange (411 ms total)

[----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (411 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] DynamicRange.WD5

1 FAILED TEST

Start 7: MouthOpen.WD5

7/7 Test #7: MouthOpen.WD5 .......................***Failed 0.47 sec Running main() from C:\J\w\prod\BuildSingleReference.conan\data\gtest\cci.20210126__\build\5ad274d83035c78ba2b205e6cf4f1b317aee8e05\src\googletest\src\gtest_main.cc Note: Google Test filter = MouthOpen.WD5 [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. [----------] 1 test from MouthOpen [ RUN ] MouthOpen.WD5 C:\Doc\Shanit\2024\Projects\Moin\Projects\OFIQ\OFIQ-Project-develop\testing\test_mouth_open.cpp(46): error: Expected equality of these values: ret.code Which is: Undefined error FACEQA::ReturnCode::Success Which is: Success unknown file: error: SEH exception with code 0xc0000005 thrown in the test body. [ FAILED ] MouthOpen.WD5 (434 ms) [----------] 1 test from MouthOpen (434 ms total)

[----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (434 ms total) [ PASSED ] 0 tests. [ FAILED ] 1 test, listed below: [ FAILED ] MouthOpen.WD5

1 FAILED TEST

14% tests passed, 6 tests failed out of 7

Total Test time (real) = 1.60 sec

The following tests FAILED: 2 - FaceQAInterface.LoadWorkingConfig (Failed) 3 - Facefinder.FindFace (Failed) 4 - LandmarkDetector.ADNetLandmarks (Failed) 5 - TotalNumberOfFaces.SSD (Failed) 6 - DynamicRange.WD5 (Failed) 7 - MouthOpen.WD5 (Failed) Errors while running CTest

tadam98 commented 6 months ago

I have renamed the model names and it worked:

adnet.onnx
ssd_facedetect.caffemodel
ssd_facedetect.prototxt.txt

.\run_ctest.cmd Test project C:/Doc/Shanit/2024/Projects/Moin/Projects/OFIQ/OFIQ-Project-develop/build/build_win Start 1: FaceQAInterface.LoadEmptyConfig 1/7 Test #1: FaceQAInterface.LoadEmptyConfig ..... Passed 0.05 sec Start 2: FaceQAInterface.LoadWorkingConfig 2/7 Test #2: FaceQAInterface.LoadWorkingConfig ... Passed 1.96 sec Start 3: Facefinder.FindFace 3/7 Test #3: Facefinder.FindFace ................. Passed 0.68 sec Start 4: LandmarkDetector.ADNetLandmarks 4/7 Test #4: LandmarkDetector.ADNetLandmarks ..... Passed 2.90 sec Start 5: TotalNumberOfFaces.SSD 5/7 Test #5: TotalNumberOfFaces.SSD .............. Passed 2.86 sec Start 6: DynamicRange.WD5 6/7 Test #6: DynamicRange.WD5 .................... Passed 2.71 sec Start 7: MouthOpen.WD5 7/7 Test #7: MouthOpen.WD5 ....................... Passed 2.99 sec

100% tests passed, 0 tests failed out of 7

Total Test time (real) = 14.24 sec

tadam98 commented 6 months ago

.\run_sample.cmd

Image file: '..\data\images\c-07-twofaces.png' scalar quality: 61.3333
-------------------------------------------------------
ImagFile: '..\data\images\c-07-twofaces.png' has attributes:
TotalFacesPresent-> rawScore:  2   scalar: 0
MouthOpen-> rawScore:  0.00295071   scalar: 96
DynamicRange-> rawScore:  6.95627   scalar: 88
-------------------------------------------------------
tadam98 commented 6 months ago

Summary:

use conan=1.60.0 and name the models correctly.
Great work !!! I will now test it on a large database.

Best, Micket