Git Product home page Git Product logo

Comments (9)

schwittlick avatar schwittlick commented on August 15, 2024

Hm, this seems to be something related to your webcam setup, this is OF internal code that's having a problem.
Can you run the webcam example that comes with OF without errors?

from ofxdarknet.

AndreasRef avatar AndreasRef commented on August 15, 2024

Yes, also the example-yolo with webcam input without any issues

from ofxdarknet.

schwittlick avatar schwittlick commented on August 15, 2024

Interesting, since the webcam related code is identical in those two examples. I can't really do anything useful to help you, maybe clean and recompile the imagenet example, that sometimes does it for me when mystical errors occur.

from ofxdarknet.

AndreasRef avatar AndreasRef commented on August 15, 2024

Okay, I'll try that.
Btw: It runs for 1 frame before it crashes. If I comment out all darknet related stuff (and only draw the webcam image) it runs fine.

from ofxdarknet.

schwittlick avatar schwittlick commented on August 15, 2024

Any news on this, this seems really strange, as this OF code really has nothing to do with ofxDarknet. I'm simply copying the pixels from the webcam (https://github.com/mrzl/ofxDarknet/blob/master/src/ofxDarknet.cpp#L258-L272), so that should not have any effect here...

from ofxdarknet.

genekogan avatar genekogan commented on August 15, 2024

@Mrzl @AndreasRef i found the bug and fixed it in the osx branch. imagenet example now working for me (and very fast!). before i merge it to master i'll let marcel review it because there's a couple other changes there including having simplified the init process. marcel can you see if that works for windows and then we can merge it?

the problem was that in ofxDarknet::classify, the internal pixels of the video were being resized without telling the video object -- so when it went to draw all the pixels, they were gone. A quick fix is doing what's done in the yolo example and copying the pixels to a new ofPixels and resizing those.

from ofxdarknet.

genekogan avatar genekogan commented on August 15, 2024

the changes are in PR 13

from ofxdarknet.

genekogan avatar genekogan commented on August 15, 2024

also just realized, one possible issue with the merge is that one of the changes i made was fixing the following paths at the bottom of yolo9000.cfg.

tree=../../../data/cfg/9k.tree
map=../../../data/cfg/coco9k.map

i think in windows you may need to get rid of the ../../..

from ofxdarknet.

genekogan avatar genekogan commented on August 15, 2024

this should now be fixed as of #13, for windows and osx, on the master branch, verified working here. @AndreasRef give it a shot!

from ofxdarknet.

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.