Giter Club home page Giter Club logo

Comments (2)

YuvalNirkin avatar YuvalNirkin commented on August 21, 2024

Try running on the CPU (gpu = 0).

from face_swap.

chrischen avatar chrischen commented on August 21, 2024

Here’s what I get on CPU mode:

I0102 18:40:37.848453 45822 net.cpp:242] This network produces output score
I0102 18:40:37.848487 45822 net.cpp:255] Network initialization done.
[libprotobuf WARNING google/protobuf/io/coded_stream.cc:537] Reading dangerously large protocol message.  If the message turns out to be larger than 2147483647 bytes, parsing will be halted for security reasons.  To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
[libprotobuf WARNING google/protobuf/io/coded_stream.cc:78] The total number of bytes read was 537966743
I0102 18:41:03.311218 45822 net.cpp:744] Ignoring source layer data
I0102 18:41:03.311244 45822 net.cpp:744] Ignoring source layer data_data_0_split
I0102 18:41:03.410594 45822 net.cpp:744] Ignoring source layer loss
Segmentation fault (core dumped)

Seems to be line 168 in face_swap_image.cpp causing the seg fault so far.

if (!fs.setImages(source_img, target_img, source_seg, target_seg))
                        throw std::runtime_error("Failed to find faces in one of the images!");

Fixed the first seg fault by commenting out if (lmsFrame.faces.empty()) return false; but then another seg fault pops up later.
swap_face.cpp

 bool FaceSwap::preprocessImages(const cv::Mat& img, const cv::Mat& seg,
        std::vector<cv::Point>& landmarks, std::vector<cv::Point>& cropped_landmarks,
        cv::Mat& cropped_img, cv::Mat& cropped_seg, cv::Rect& bbox)
    {
        cout << "Calculate landmarks" << endl;
        // Calculate landmarks
        m_sfl->clear();
        const sfl::Frame& lmsFrame = m_sfl->addFrame(img);
        cout << "Calculate landmarks 2" << endl;
        //if (lmsFrame.faces.empty()) return false;
        cout << "Calculate landmarks 3" << endl;

from face_swap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.