Closed AndreasRef closed 7 years ago
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?
Yes, also the example-yolo with webcam input without any issues
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.
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.
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...
@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.
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 ../../..
this should now be fixed as of https://github.com/mrzl/ofxDarknet/pull/13, for windows and osx, on the master branch, verified working here. @AndreasRef give it a shot!
When trying to run the example-imagenet I get an error related to the update function of ofQTKitGrabber
Any idea what might be causing this?