Skip to content

"make -j8 of face_swap" error / IplImage temp = img #55

@Jackpot2

Description

@Jackpot2

Hello there! Well, i went through your "ubuntu installation" step by step and everything went well until the make of face_swap. (i used opencv 3.4.9 instead of 3.2.0 tho.. but all other versions same as your guide.)

Here is the output from cmake command(maybe it helps your error);
/face_swap/build# cmake -DWITH_BOOST_STATIC=OFF -DBUILD_INTERFACE_PYTHON=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_APPS=ON -DBUILD_TESTS=OFF cmake -DCMAKE_INSTALL_PREFIX=~/installations/face_swap -DCMAKE_BUILD_TYPE=Release ..
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Boost: /usr/local/include (found version "1.65.1") found components: filesystem program_options regex timer thread chrono system date_time atomic
-- Found OpenCV: /usr/local (found version "3.4.9") found components: highgui imgproc imgcodecs calib3d photo
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- HDF5: Using hdf5 compiler wrapper to determine CXX configuration
-- Found HDF5: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_cpp.so;/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.10.4") found components: C CXX HL
-- Found Eigen3: /usr/include/eigen3 (Required is at least version "2.91.0")
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1")
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR)
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.7m.so (found version "3.7.4")
-- Found Boost: /usr/local/include (found version "1.65.1") found components: python numpy
-- Configuring done
-- Generating done
-- Build files have been written to: .../face_swap/build

then when i try to "make -j8" our error shows up..
...../face_swap/build# make -j8
Scanning dependencies of target iris_sfs
[ 3%] Building CXX object iris_sfs/CMakeFiles/iris_sfs.dir/epnp.cpp.o
[ 6%] Building CXX object iris_sfs/CMakeFiles/iris_sfs.dir/utility.cpp.o
[ 10%] Building CXX object iris_sfs/CMakeFiles/iris_sfs.dir/BaselFace.cpp.o
[ 13%] Building CXX object iris_sfs/CMakeFiles/iris_sfs.dir/BaselFaceEstimator.cpp.o
[ 16%] Building CXX object iris_sfs/CMakeFiles/iris_sfs.dir/FaceServices2.cpp.o
[ 20%] Linking CXX static library ../lib/libiris_sfs.a
[ 20%] Built target iris_sfs
[ 23%] Running cpp protocol buffer compiler on face_data.proto
Scanning dependencies of target face_swap
[ 30%] Building CXX object face_swap/CMakeFiles/face_swap.dir/cnn_3dmm.cpp.o
[ 30%] Building CXX object face_swap/CMakeFiles/face_swap.dir/basel_3dmm.cpp.o
[ 33%] Building CXX object face_swap/CMakeFiles/face_swap.dir/face_seg.cpp.o
[ 36%] Building CXX object face_swap/CMakeFiles/face_swap.dir/cnn_3dmm_expr.cpp.o
[ 40%] Building CXX object face_swap/CMakeFiles/face_swap.dir/face_swap_engine_impl.cpp.o
[ 43%] Building CXX object face_swap/CMakeFiles/face_swap.dir/render_utilities.cpp.o
[ 46%] Building CXX object face_swap/CMakeFiles/face_swap.dir/face_swap_c_interface.cpp.o
[ 50%] Building CXX object face_swap/CMakeFiles/face_swap.dir/utilities.cpp.o
[ 53%] Building CXX object face_swap/CMakeFiles/face_swap.dir/face_detection_landmarks.cpp.o
[ 56%] Building CXX object face_swap/CMakeFiles/face_swap.dir/landmarks_utilities.cpp.o
[ 60%] Building CXX object face_swap/CMakeFiles/face_swap.dir/segmentation_utilities.cpp.o
[ 63%] Building CXX object face_swap/CMakeFiles/face_swap.dir/face_data.pb.cc.o
In file included from /usr/local/include/dlib/opencv.h:10,
from .../face_swap/face_swap/face_detection_landmarks.cpp:10:
/usr/local/include/dlib/opencv/cv_image.h: In instantiation of ‘dlib::cv_image<pixel_type>::cv_image(cv::Mat) [with pixel_type = dlib::bgr_pixel]’:
.../face_swap/face_swap/face_detection_landmarks.cpp:54:52: required from here
/usr/local/include/dlib/opencv/cv_image.h:37:29: error: conversion from ‘const cv::Mat’ to non-scalar type ‘IplImage’ {aka ‘_IplImage’} requested
37 | IplImage temp = img;
| ^~~
make[2]: *** [face_swap/CMakeFiles/face_swap.dir/build.make:175: face_swap/CMakeFiles/face_swap.dir/face_detection_landmarks.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:151: face_swap/CMakeFiles/face_swap.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Maybe because of the OpenCV version, i'm missing some modules or differences between versions or what? i'm not sure so i wanted to write here maybe some other person comes with this error or so.. I will try again with other versions of opencv when i have time for that so we can see if its about opencv or not.. But of course it could be about face_swap codes too because it says "conversion from const to non-scalar type etc.." maybe you want to check out. Peace !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions