GithubHelp home page GithubHelp logo

Comments (8)

KeepRaamAndCarryOn avatar KeepRaamAndCarryOn commented on April 28, 2024 1

@vishwesh5

My bad, I didn't download the models first. Both python and C++ code can run now. Thanks

from learnopencv.

spmallick avatar spmallick commented on April 28, 2024

@vishwesh5 Can you please check?

from learnopencv.

vishwesh5 avatar vishwesh5 commented on April 28, 2024

Hi @KeepRaamAndCarryOn!
Can you try this out?

g++ -ggdb object_detection_yolo.cpp `pkg-config --cflags --libs /usr/local/lib/pkgconfig/opencv.pc` -o object_detection_yolo.out

Vishwesh

from learnopencv.

KeepRaamAndCarryOn avatar KeepRaamAndCarryOn commented on April 28, 2024

@vishwesh5
Tried:

g++ -ggdb object_detection_yolo.cpp `pkg-config --cflags --libs /usr/local/lib/pkgconfig/opencv.pc` -o object_detection_yolo.out

Error:

object_detection_yolo.cpp:75:31: error: no matching function for call to ‘std::basic_ifstream<char>::basic_ifstream(std::__cxx11::string&)’
             ifstream ifile(str);

from learnopencv.

vishwesh5 avatar vishwesh5 commented on April 28, 2024

@KeepRaamAndCarryOn
Go to line 75, and change ifstream ifile(str); to ifstream ifile(str.c_str());.

from learnopencv.

KeepRaamAndCarryOn avatar KeepRaamAndCarryOn commented on April 28, 2024

@vishwesh5 made the change in line 75 and 85. Compiled successfully. Thanks!

However I'm facing this when I tried to run:

./object_detection_yolo.out --image=bird.jpg

Is it an unrelated issue?

Error:

terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(3.4.2) /opt/opencv/modules/dnn/src/darknet/darknet_io.cpp:784: error: (-212:Parsing error) Failed to parse NetParameter file: yolov3.cfg in function 'ReadNetParamsFromCfgFileOrDie'

Aborted (core dumped)

from learnopencv.

vishwesh5 avatar vishwesh5 commented on April 28, 2024

@KeepRaamAndCarryOn
Can you try the Python code? If that works, we can figure out the issue with C++ code as well.

from learnopencv.

vishwesh5 avatar vishwesh5 commented on April 28, 2024

Great! Glad that the issue was resolved :)

from learnopencv.

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.